Skip to content

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

Closed

Description

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationFixedA PR has been merged for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions