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

Can't load the plugin with typescript 3.2.2 #39

Closed
azakaryan opened this issue Nov 7, 2019 · 4 comments · Fixed by #40
Closed

Can't load the plugin with typescript 3.2.2 #39

azakaryan opened this issue Nov 7, 2019 · 4 comments · Fixed by #40
Assignees
Labels
Milestone

Comments

@azakaryan
Copy link

When I try to load the plugin into angular7 project I get an Error
ERROR in node_modules/web-streams-polyfill/dist/types/polyfill.d.ts(1,21): error TS2727: Cannot find lib definition for 'es2018.asynciterable'. Did you mean 'esnext.asynciterable'?

I did some investigations and it seems the cause is typescript version I have. 3.2.2

NOTE it works as expected with typescript version 3.5.3 that I have in angular 8 app

I can't upgrade typescript version since it's required by angular 7. The only way to make your polyfill to work is to upgrade to angular 8.

It seems that in typescript 3.2 asynciterable is under esnext.asynciterable instead of es2018.asynciterable.

Please advise. Thank you in advanced.

@MattiasBuelens
Copy link
Owner

MattiasBuelens commented Nov 7, 2019

Indeed, TypeScript 3.2 still considered async iterables to be an upcoming JavaScript feature, so they were still in esnext.asynciterable.

Interestingly, TypeScript 3.5 has both es2018.asynciterable and esnext.asynciterable for backwards compatibility. So I can make the polyfill use the old name and support both old and new TypeScript versions.

I'll look into it. Thanks for reporting! 🙂

@azakaryan
Copy link
Author

@MattiasBuelens when do you think it will be released ?

@MattiasBuelens
Copy link
Owner

I was considering if I wanted to put anything else in this release. But I can always make another release later. 😄

Released as v2.0.6.

@MattiasBuelens MattiasBuelens added this to the v2.0.6 milestone Nov 8, 2019
@azakaryan
Copy link
Author

Thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants