title: Rxjs with TypeScript compile errors
body: <p>The following code throws tsc errors and not sure how to correct it.</p>
  
  <p>Using rxjs 5.0.3 with tsc 2.1.5</p>
  
  <pre><code>import { Observable } from 'rxjs/Observable';
  import { Subject } from 'rxjs/Subject';
  import 'rxjs/Rx';
  
  let subject = new Subject();
  
  Observable.merge(subject, Observable.interval(500))
    .startWith(new Date())
    .scan((acc, curr) =&gt; {
      const date = new Date(acc.getTime());
      date.setSeconds(date.getSeconds() + 1);
      return date;
    })
    .subscribe(v =&gt; {
      let today = v.toISOString();
      console.log(today);
    });
  </code></pre>
  
  <p>The errors I see are:</p>
  
  <pre><code>node_modules/rxjs/Observable.d.ts(68,60): error TS2304: Cannot find name 'Promise'.
  node_modules/rxjs/Observable.d.ts(68,70): error TS2304: Cannot find name 'Promise'.
  node_modules/rxjs/observable/PromiseObservable.d.ts(40,31): error TS2304: Cannot find name 'Promise'.
  node_modules/rxjs/observable/PromiseObservable.d.ts(41,26): error TS2304: Cannot find name 'Promise'.
  node_modules/rxjs/operator/toPromise.d.ts(2,60): error TS2304: Cannot find name 'Promise'.
  node_modules/rxjs/operator/toPromise.d.ts(3,79): error TS2304: Cannot find name 'Promise'.
  node_modules/rxjs/operator/toPromise.d.ts(3,89): error TS2304: Cannot find name 'Promise'.
  test.ts(10,31): error TS2339: Property 'getTime' does not exist on type 'number | {}'.
    Property 'getTime' does not exist on type 'number'.
  test.ts(15,19): error TS2339: Property 'toISOString' does not exist on type 'number | {}'.
    Property 'toISOString' does not exist on type 'number'.
  </code></pre>