Rxjs: Cannot find name 'Promise' in Observable.d.ts

Created on 15 Dec 2015  路  5Comments  路  Source: ReactiveX/rxjs

I am trying RxJS 5.0.0-beta.0 and have installed it via npm via npm install [email protected]. Now I would like to import Subject and Observable from rxjs and did the following import {Observable, Subject} from 'rxjs';. This throws the error that 'Promise' cannot be found in Observable.d.ts. Is this an issue with RxJS or did I forget something? This is the full error:

node_modules\rxjs\Observable.d.ts (154,66): error TS2304: Cannot find name 'Promise'
node_modules\rxjs\CoreOperators.d.ts (77,31): error TS2304: Cannot find name
  'PromiseConstructor'
node_modules\rxjs\CoreOperators.d.ts (22,67): error TS2304: Cannot find name 'Promise'

Maybe the declaration for Promise is missing here.

Most helpful comment

Was using RxJS with Typescript and had to tsd install es6-shim.

All 5 comments

Was using RxJS with Typescript and had to tsd install es6-shim.

Thanks for the issue and the resolution, @d3lm :)

Actually this has been asked before also, https://github.com/ReactiveX/RxJS/issues/592. Maybe better to update README to include typescript example, to notify type declaration for es6 shim is required? @blesh

tsd install es6-shim --save worked for me.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cartant picture cartant  路  3Comments

dooreelko picture dooreelko  路  3Comments

LittleFox94 picture LittleFox94  路  3Comments

cartant picture cartant  路  3Comments

giovannicandido picture giovannicandido  路  4Comments