title: Explicitly Unwrapped Optionals in Typescript?
body: <p>In Swift, if I have a property of a class that is another class, I declare it as an implicitly unwrapped optional:</p>
  
  <pre class="lang-swift prettyprint-override"><code>class MyClass {
    var prop: OtherClass!
  
    init(prop: OtherClass) {
      self.prop = prop
    }
  
    explodeProp() {
      // don't need to unwrap it, because it's implicitly unwrapped
      // which is safe because it's always assigned in the initializer
      prop.explode() 
    }
  }
  </code></pre>
  
  <p>In Typescript, I think I have to do it this way:</p>
  
  <pre class="lang-js prettyprint-override"><code>export class MarkdownNode {
    tag = "";
    text = "";
    document: FoldingDocument | null = null; // will never actually be null
    parent: MarkdownNode | null = null; // could indeed be null
  
    constructor(tag: string, text: string, document: FoldingDocument) {
      this.tag = tag;
      this.text = text;
      this.document = document;
    }
  
    addSibling(node: MarkdownNode) {
      if (!this.parent) {
        this.document!.nodes.push(node) // no choice but to force-unwrap?
      } else {
        this.parent.children.push(node
      }
    }
  }
  </code></pre>
  
  <p>Is there a way to do implicitly unwrapped optionals in TypeScript? Is it maybe on the way?</p>