打字稿智能感知适用于此:
class SampleClass {
/**
* Does stuff
*
* @param blah stuff needing done
*/
public doStuff(blah: string) {
}
}
var sample = new SampleClass();
// intellisense works correctly and shows parameter description:
sample.doStuff("hello");
然而,切换到使用胖箭头似乎破坏了 jsdoc 智能感知(方法签名仍然出现,但没有任何 jsdoc 描述出现):
class SampleClass2 {
/**
* Does stuff
*
* @param blah stuff needing done
*/
public doStuff = (blah: string) => {
}
}
var sample2 = new SampleClass2();
// intellisense gives the method signature still but no longer picks up any of the jsdoc descriptions:
sample2.doStuff("hello");
我正在使用 Visual Studio 2012 Update 4;打字稿 0.9.5。
这是一个错误,还是我需要为 jsdoc 注释使用不同的语法?