Closed
Description
When adding JSDoc to an overloaded function, It seems that the JSDoc comment must immediately precede the actual function. When preceding the list of overloads, the JSDoc comment is dropped after compilation.
Example:
module app {
/**
* Returns "foo"
*
* this doesn't output.
*/
export function foo(x: string): string;
export function foo(x: number): string;
export function foo(x: any): string {
return "foo";
}
export function bar(x: string): string;
export function bar(x: number): string;
/**
* Returns "bar"
*
* this will output. but I don't like my overloads detached.
*/
export function bar(x: any): string {
return "bar";
}
}