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.
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.
Most helpful comment
Was using RxJS with Typescript and had to
tsd install es6-shim.