Skip to content

Consider making "a" as "b" a compile error #22150

Closed
@ghost

Description

TypeScript Version: 2.8.0-dev.20180223

Search Terms: string literal type assertion

Code

"a" as "b"

Expected behavior:

Error: type "a" can not be converted to type "b".

Actual behavior:

No error.

Related Issues: #10195, which would make it so that no one would need to write "a" as "a".

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions