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
Anonymous function, function return, currying, inherit
Expected Behavior
When a class method returns an anonymous function, the anonymous function should either have no documentation (besides the method's @return annotation) or its own documentation.
Actual Behavior
When a class method returns an anonymous function, the anonymous function copies the method's docs.
Example code:
exportclassClassVersion{/** * This is the outer function. * * @returns The inner function. */outer(): ()=>void{/** Docs for the inner function? */return()=>{};}}
If the outer function is a standalone function instead of a class method, it behaves as I would expect:
/** * This is the outer function. * * @returns The inner function. */exportfunctionouterAsFunction(): ()=>void{/** Docs for the inner function? */return()=>{};}
Search terms
Anonymous function, function return, currying, inherit
Expected Behavior
When a class method returns an anonymous function, the anonymous function should either have no documentation (besides the method's
@return
annotation) or its own documentation.Actual Behavior
When a class method returns an anonymous function, the anonymous function copies the method's docs.
Example code:
Generated docs:
Steps to reproduce the bug
https://github.com/mweidner037/mwe-typedoc-returned-function
Environment
More info
If the outer function is a standalone function instead of a class method, it behaves as I would expect:
Generated docs:
Potentially related issue: #2283 (comment)
The text was updated successfully, but these errors were encountered: