0

I'm trying to understand some typescript code and was wondering what this ! means:

let display = new DisplayContext(document.getElementById('container')!);

I know that ! can mean not in conditional statements and it can be used to allow a function to be called immediately after being defined. But in both cases I've seen in in front what does it mean if it's after a function?

Hakaishin
  • 2,550
  • 3
  • 27
  • 45
  • I swear I did not see that other question, thanks. What do I do in such a case just delete my question? – Hakaishin Jan 16 '17 at 22:45
  • There's already a question for that as well: [How should duplicate questions be handled?](http://meta.stackexchange.com/questions/10841/how-should-duplicate-questions-be-handled) :) But no, keep it around, it's good for search – Nitzan Tomer Jan 16 '17 at 22:50

0 Answers0