【发布时间】:2014-01-05 22:37:00
【问题描述】:
Typescript intellisense 可以很好地解决这个问题:
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 cmets 使用不同的语法?
【问题讨论】:
标签: visual-studio-2012 typescript jsdoc arrow-functions