grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

TypeScript non-null assertion operator parse error

Open Markz666 opened this issue 3 years ago • 0 comments
trafficstars

function processEntity(e?: Entity) {
  validateEntity(e);
  let s = e!.name; // Assert that e is non-null and access name
}

Ref: https://stackoverflow.com/questions/47704652/what-does-exclamation-point-after-variable-mean-in-javascript

Markz666 avatar Mar 08 '22 11:03 Markz666