Closed
Description
Search Terms
[warning] functions/someFile.foo (CallSignature), defined in ./src/functions/someFile.ts, does not have any documentation
Problem
Given the following code, TypeDoc complains that the second signature is missing a comment.
/** Helper function to do something. */
export function foo(fatal: true): string;
export function foo(fatal: false): string | undefined;
export function foo(fatal: boolean): string | undefined {
return "";
}
TypeScript copies the comment from the first signature to other signatures when a function is overloaded and they do not specify a separate comment.
Suggested Solution
TypeDoc should copy the comment from the first signature to other signatures when a function is overloaded and they do not specify a separate comment.
This should also work for method declarations, Array.reduce
in the standard library has a similar structure.
Reported on discord by @Zamiell