New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"@param {function(number)} myParam" only renders as "function" #1510
Comments
When function types contain a signature (e.g. `function(string, boolean): string`), `catharsis` parses them correctly, but the type handling in JSDoc stringified them as `function`, the signature was omitted. With this change, the signature is added, too. Fixes jsdoc#1510 .
I understand that using At a first glance, a fix seems to be as simple as PR #1735. However, fixing this might cause regressions for other users, e.g. when they post-process the symbol information provided by JSDoc and can't handle the signatures. If this is considered a bigger issue, some kind of feature switch might be needed in addition. |
I am also interested in this fix. @codeworrior any chance to make the crosslinks working for the callback argument types in that PR #1735 ? |
JSDoc reduces function types to the keyword "function", all other details of the signature (parameters, return type, constructor type) are lost. This has been reported as jsdoc/jsdoc#1510 and a fix has been proposed in jsdoc/jsdoc#1735 . This change monkey patches JSDoc 3.6.x with the change from the mentioned PR 1735. At the same time, a similar problem regarding record types (structures) is fixed. Change-Id: I0e8de19cedf13751ff512f6c8900d441a5862435
JSDoc reduces function types to the keyword "function", all other details of the signature (parameters, return type, constructor type) are lost. This has been reported as jsdoc/jsdoc#1510 and a fix has been proposed in jsdoc/jsdoc#1735 . This change monkey patches JSDoc 3.6.x with the change from the mentioned PR 1735. At the same time, a similar problem regarding record types (structures) is fixed. Cherry picked from SAP/openui5@ff8dec90f
JSDoc reduces function types to the keyword "function", all other details of the signature (parameters, return type, constructor type) are lost. This has been reported as jsdoc/jsdoc#1510 and a fix has been proposed in jsdoc/jsdoc#1735 . This change monkey patches JSDoc 3.6.x with the change from the mentioned PR 1735. At the same time, a similar problem regarding record types (structures) is fixed. Cherry picked from SAP/openui5@ff8dec90f
JSDoc reduces function types to the keyword "function", all other details of the signature (parameters, return type, constructor type) are lost. This has been reported as jsdoc/jsdoc#1510 and a fix has been proposed in jsdoc/jsdoc#1735 . This change monkey patches JSDoc 3.6.x with the change from the mentioned PR 1735. At the same time, a similar problem regarding record types (structures) is fixed. Cherry picked from SAP/openui5@ff8dec90f
Functions with types like
function(number):boolean
are only rendered as the single word "function".Using Closure compiler syntax for function annotations: https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler
Input code
JSDoc configuration
JSDoc debug output
Expected behavior
Render the full function including its types.
Current behavior
See screenshot.
Your environment
The text was updated successfully, but these errors were encountered: