Typescript intellisense works fine for this:
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");
However switching to use the fat arrow seems to break the jsdoc intellisense (the method signature still appears, but none of the jsdoc descriptions do):
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");
I'm using Visual Studio 2012 Update 4; TypeScript 0.9.5.
Is this a bug, or do I need to use a different syntax for the jsdoc comments?
I'm honestly very confused why this works in the TypeScript Playground.
To have this work in Visual Studio, the function documentation needs to be on the function expression itself:
class SampleClass2 {
public doStuff =
/**
* Does stuff
*
* @param blah stuff needing done
*/
(blah: string) => {
}
}
var sample2 = new SampleClass2();
sample2.doStuff("hello");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With