Skip to content

Ignore newline and asterisk when parsing JSDoc typedef - #26775

Merged
Nathan Shively-Sanders (sandersn) merged 1 commit into
microsoft:masterfrom
tschaub:skip-more-asterisks
Aug 30, 2018
Merged

Nathan Shively-Sanders (sandersn) merged 1 commit into
microsoft:masterfrom
tschaub:skip-more-asterisks

Conversation

@tschaub

Copy link
Copy Markdown
Contributor

This makes it possible to typecheck JSDoc types like this:

/** 
 * @typedef {function(string): boolean}
 * MyType
 */

/**
 * @param {MyType} func The function to call.
 * @param {string} arg The argument to call it with.
 * @returns {boolean} The return.
 */
function callIt(func, arg) {
  return func(arg);
}

Fixes #26774.

See also #26067.

@sandersn
Nathan Shively-Sanders (sandersn) merged commit 20a2b0c into microsoft:master Aug 30, 2018
@tschaub
Tim Schaub (tschaub) deleted the skip-more-asterisks branch August 30, 2018 17:05
@tschaub

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review!

@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
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