Skip to content

getJSDocParameterTags: no need to handle JSDocFunctionType, just return undefined#16837

Merged
2 commits merged into
masterfrom
getJSDocParameterTags
Jul 18, 2017
Merged

getJSDocParameterTags: no need to handle JSDocFunctionType, just return undefined#16837
2 commits merged into
masterfrom
getJSDocParameterTags

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 29, 2017

This was effectively dead code as getJSDocTags would never return a defined result if we were already in a JSDocFunctionType (which is the only time param.name would be undefined).

@ghost ghost force-pushed the getJSDocParameterTags branch from 7a60bd1 to 75ca885 Compare July 13, 2017 14:43
@ghost ghost requested a review from rbuckton July 13, 2017 14:43
@sandersn
Copy link
Copy Markdown
Member

sandersn commented Jul 18, 2017

I thought that this was legal too:

/** @param {string} */
function f(a) {}

(Contra the comment in the code, but that may be inaccurate)

Copy link
Copy Markdown
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, turns out that /** @param {string} */ is a parse error.

@ghost ghost merged commit 0a8ddca into master Jul 18, 2017
@ghost ghost deleted the getJSDocParameterTags branch July 18, 2017 17:22
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants