What does an exclamation mark after a variable definition mean in TypeScript

Viewed 25

I'm trying to learn TypeScript by going through some code in an application and I keep seeing variable! when defining a varialbe. For example:

protected _db!: CheckpointDB
1 Answers

It has a value, so it can not be null or undefined.

Also called: "The non-null assertion operator"

Related