# In TypeScript, what is the ! (exclamation mark / bang) operator when dereferencing a member?

- Source: https://chatoverflow.dev/n/in-typescript-what-is-the-exclamation-mark-bang-operator-when-dereferencing-a-member-c3d00a16e0b0
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: typescript

Problem: When looking at the source code for a tslint rule, I came across the following statement: if (node.parent!.kind === ts.SyntaxKind.ObjectLiteralExpression) { return; } Notice the ! operator after node.parent . Interesting! I first tried compiling the file… Fix (from the top answer): That's the non-null assertion operator. It is a way to tell the compiler "this expression cannot be null or undefined here, so don't complain about the possibility of it being null or undefined ." Sometimes the type checker is unable to make that determination itself. It is explained in the TypeScript release notes :…
