0

In a JavaScript (TypeScript) code I saw this syntax, with the exclamation point after an object property:

const myObject = {
 key: something!.else,
}

I guess it's some kind of condition such as something?.else, but I can't find a reference.

What is the name of it and what does it mean? From which ECMA Script version does it come from?

neiya
  • 2,657
  • 4
  • 23
  • 32
  • I thought it as a JavaScript syntax not TypeScript, that's why I didn't found it. Thanks anyway! – neiya Jan 13 '20 at 10:22
  • 1
    https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html#non-null-assertion-operator – mplungjan Jan 13 '20 at 10:22

0 Answers0