title: process.stdin.on('data'...) will not read from console
body: <p>I'm new to node.js and am trying to get a typescript program to read data from the console.  Here's what I have:</p>
  <pre><code>'use strict';
  
  import { WriteStream, createWriteStream } from &quot;fs&quot;;
  
  process.stdin.resume();
  process.stdin.setEncoding('utf-8');
  
  let inputString: string = '';
  let inputLines: string[] = [];
  
  console.debug('made it here');
  process.stdin.on('data', function(inputStdin: string): void {
      inputString += inputStdin;
  });
  
  process.stdin.on('end', function(): void {
      inputLines = inputString.split('\n');
      inputString = '';
  
      main();
  });
  
  function main() {
     // do stuff
  }
  </code></pre>
  <p>When I run the program from the cmdline using <code>ts-node Program.ts</code> it prints the <code>'made it here'</code> in the console and then waits, assumedly for me to type the input.  However, no matter what or how many lines I type it never resumes.</p>
  <p>I feel as if I'm missing what the 'data' or 'end' is trying to do here.</p>
  <p>Any help is greatly appreciated!</p>