title: VScode API why can't I get the current line?
body: <p>I am using typescript to write a vs code extension and for some reason I am unable to get the current line.</p>
  
  <p>The function I am trying to make is:</p>
  
  <pre><code>function makeFrame()
  {
      vscode.window.activeTextEditor.selection.active.line;
  }
  </code></pre>
  
  <p>Which fails with error: Object is possibly undefined
  The import statement is:</p>
  
  <pre><code>import {window, commands, Disposable, ExtensionContext, StatusBarAlignment, StatusBarItem, TextDocument} from 'vscode';
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>(I am both new to TypeScript and writing extensions for VS code)</p>