You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typedoc should not produce warning for undocumented void return value of arrow functions.
Actual Behavior
Typedocs warns about void return value not being documented.
Steps to reproduce the bug
index.ts
/** * This one is OK. * * @param value - Value. */exportfunctionvoidFunction(value: unknown): void{// ...}/** * This one produces the following warning: * * > [warning] voidLambda (CallSignature), defined in ./index.ts, does not have any documentation * * @param value - Value. */exportconstvoidLambda=(value: unknown): void=>{// ...};/** * This one does not produce warning. * * @param value - Value. * @returns Workaround (return docs which should not be necessary here). */exportconstvoidLambdaFixed=(value: unknown): void=>{// ...};
This happens because TypeDoc's model for const-functions is slightly different than regular functions. For const-functions, TypeDoc attaches the comment to the ReflectionKind.Function reflection, while for regular functions, TypeDoc attaches it to ReflectionKind.Signature.
The @returns block works around this because it gets copied down to the signature.
What TypeDoc should be doing is not marking the signature as non-documented in this case because the owning reflection contains a comment.
Search terms
notDocumented, void, return warning
Expected Behavior
Typedoc should not produce warning for undocumented void return value of arrow functions.
Actual Behavior
Typedocs warns about void return value not being documented.
Steps to reproduce the bug
index.ts
tsconfig.json
typedoc.json
Environment
The text was updated successfully, but these errors were encountered: