Skip to content

JSDoc /** @type */ tags don't check return types #25424

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
// @ts-check

/** @type {(x: number, y: number, z: number) => string} */
function foo(x, y, z) {
    return 100;
}

Expected: Error.
Actual: No error.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issuecheckJsRelates to checking JavaScript using TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions