Skip to content

Handle @typedef with type on wrong side #16946

Closed
@ghost

Description

TypeScript Version: nightly (2.5.0-dev.20170629)

Code

// @ts-check

/** @typedef Foo {number} */

/** @type {Foo} */
const x = "";

Expected behavior:

Either a syntax error, or correctly set Foo = number and have a type error.

Actual behavior:

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions