Skip to content

Typescript eats Google Closure type cast comment #17532

Closed
@scf37

Description

@scf37

TypeScript Version: 2.4.20

Code

function f() {
    return /* @type {number} */ 42;
}

Expected behavior:
Should be compiled to

function f() {
    return /* @type {number} */ 42;
}

Actual behavior:
Compiled to

function f() {
    return 42;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Comment EmitThe issue relates to the emission of comments when compiling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions