Skip to content

Definite assignment assertion in JS not flaggedΒ #48446

@Josh-Cena

Description

@Josh-Cena

Bug Report

Noted by someone on Discord.

πŸ”Ž Search Terms

non null assertion javascript error

Related #17222

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

const a = { a!: 1 };

πŸ™ Actual behavior

There's no error; crashes at runtime

πŸ™‚ Expected behavior

There should be an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions