Skip to content
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

Properly stringify function types with signature #1735

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

codeworrior
Copy link

@codeworrior codeworrior commented Jan 10, 2020

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 #1510 .

Q A
Bug fix? yes
New feature? no
Breaking change? maybe, see #1510
Deprecations? no
Tests added? no (sorry)
Fixed issues comma-separated list of issues fixed by the pull request, if any
License Apache-2.0

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 .
openui5bot pushed a commit to SAP/openui5 that referenced this pull request Jun 25, 2021
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
codeworrior added a commit to SAP/ui5-builder that referenced this pull request Jun 9, 2022
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
codeworrior added a commit to SAP/ui5-builder that referenced this pull request Jun 13, 2022
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
RandomByte pushed a commit to SAP/ui5-builder that referenced this pull request Jun 14, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"@param {function(number)} myParam" only renders as "function"
1 participant