Skip to content

JSDoc function type doesn't parse jsdoc function types as parameters #25800

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

Closed
sandersn opened this issue Jul 19, 2018 · 0 comments
Closed

JSDoc function type doesn't parse jsdoc function types as parameters #25800

sandersn opened this issue Jul 19, 2018 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue

Comments

@sandersn
Copy link
Member

In other words, higher order functions don't work using only closure syntax:

/** @type {function(string[], function(string): string): string[]} */
var stringmap = function(strings, f) {
    // ...
}

Expected behavior:
stringmap: (arg0: string[], arg1: (arg0: string) => string) => string[]

Actual behavior:
Parse error at the second function keyword: "Parameter expected".

@mhegazy mhegazy added Bug A bug in TypeScript Salsa Domain: JSDoc Relates to JSDoc parsing and type generation labels Jul 19, 2018
@mhegazy mhegazy added this to the TypeScript 3.1 milestone Jul 19, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants