Skip to content

Check typeof operator result  #12697

@mohsen1

Description

@mohsen1

Throw a compiler error if typeof operator is compared to strings other than typeof operator results

TypeScript Version: 2.1.1

Code

typeof a === 'String' // error
typeof b === 'null' // error

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