Skip to content

[JSDoc] @returns doesn't type check the return type of the function #16109

@yuit

Description

@yuit
// @ts-check
/**
 * @returns {string} This comment is not currently exposed
 */
function f() {
    return 5;  // this should be an error
}

Metadata

Metadata

Assignees

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