Skip to content

Glossary: TypeScript Basics

non-null assertion

Also written: !

A `!` after a value tells TypeScript it isn't `null` or `undefined`, with no check at all. If it's wrong, the program crashes.

Where the book teaches it

Related terms

as (type assertion)narrowing