Skip to content

Easy misunderstanding: "! ===" #37837

Closed
@zhangciwu

Description

@zhangciwu

When reading source code, I got confused when reading this line:

languageVersion! === ScriptTarget.ES5 ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) :

And I finally realized that it's ! === (equals) than !== (not equals)
I think this writing would confuse many people

TypeScript Version: from 3.6 to current(3.8.3)

Search Terms: ! ===

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions