title: Exclamation Mark in type definition
body: <p>Currently I stumbled upon the <a href="https://angular.io/api/core/ContentChildren" rel="noreferrer">ContentChildren decorator</a> of Angular. In the first code example the following syntax is used:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {AfterContentInit, ContentChildren, Directive, QueryList} from '@angular/core';
  
  @Directive({selector: 'child-directive'})
  class ChildDirective {
  }
  
  @Directive({selector: 'someDir'})
  class SomeDir implements AfterContentInit {
    @ContentChildren(ChildDirective) contentChildren !: QueryList&lt;ChildDirective&gt;;  // this line is relevant
  
    ngAfterContentInit() {
      // contentChildren is set
    }
  }
  </code></pre>
  
  <p>Note the <strong>exclamation mark followed by a colon</strong> right after the <code>@ContentChildren(ChildDirective) contentChildren</code> variable definition. In <a href="https://stackoverflow.com/questions/42273853/in-typescript-what-is-the-exclamation-mark-bang-operator-when-dereferenci">this StackOverflow thread</a> I discovered that this syntax can be used as a "non-null assertion operator" when accessing a variable or object property.</p>
  
  <p>My question is now whether the exclamation mark before a type definition has exactly the same meaning like in a normal context. Does it simply say the TypeScript compiler: "Okay, don't worry about <code>null</code> or undefined", or does this syntax have another specific meaning in this context?</p>