Skip to content

Bug in tsc: can't use @function ... (must use @callback ...) #7

@coolaj86

Description

@coolaj86

See microsoft/TypeScript#50274

❌ Invalid for tsc: @typedef {Function}

/**  * @typedef {Function} PersonGreet  * @param {String} name - other's name  * @returns {String} - the greeting  */
/**  * @function PersonGreet  * @param {String} name - other's name  * @returns {String} - the greeting  */

⚠️ Workaround: @callback

It's confusing, but it's our option.

/**  * @callback PersonGreet  * @param {String} name - other's name  * @returns {String} - the greeting  */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions