Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS project cannot depend only on es6-promise #1270

Closed
alexeagle opened this issue Jan 31, 2016 · 1 comment
Closed

TS project cannot depend only on es6-promise #1270

alexeagle opened this issue Jan 31, 2016 · 1 comment

Comments

@alexeagle
Copy link
Contributor

Given an angular2 project, relying on rxjs types available from node_modules/rxjs and only user-installed es6 typings (working on angular/angular#5807 )
If we ask users to eg.
$ typings install es6-collections es6-promise --ambient --save
Then we are missing PromiseConstructor:

node_modules/rxjs/CoreOperators.d.ts(77,31): error TS2304: Cannot find name 'PromiseConstructor'.
node_modules/rxjs/Observable.d.ts(65,67): error TS2304: Cannot find name 'PromiseConstructor'.
node_modules/rxjs/Observable.d.ts(159,31): error TS2304: Cannot find name 'PromiseConstructor'.

This type is defined in typescript's distributed lib.es6.d.ts and also in es6-shim.d.ts but not in es6-promise.d.ts

Workaround for now is we require users install typings for all of es6-shim but this has the disadvantage that they may type-check usage of all es6 features, even those not polyfilled at runtime.

@lock
Copy link

lock bot commented Jun 7, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant