-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead
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";
}
}
Metadata
Metadata
Assignees
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead