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

"XXX" is not declared in Babel's scope tracker #38

Closed
Darmody opened this issue Aug 15, 2019 · 8 comments
Closed

"XXX" is not declared in Babel's scope tracker #38

Darmody opened this issue Aug 15, 2019 · 8 comments

Comments

@Darmody
Copy link

Darmody commented Aug 15, 2019

屏幕快照 2019-08-15 14 33 14

export async function in ts get this warning.

@rpetrich
Copy link
Owner

Can you attach a test case? On the surface this issue doesn’t seem like a problem with async-to-promises

@Darmody
Copy link
Author

Darmody commented Aug 15, 2019

Because My repo is private, I can't upload it. And I can't reproduce it when setup a demo...
But warning disappear when I remove the plugin.

babel/babel#10264 does this helpful?

@rpetrich
Copy link
Owner

I'll review the source to make sure all declarations are being registers, but I think they already should be. If you could get a repro case together that would make it much easier to resolve.

@Darmody
Copy link
Author

Darmody commented Aug 15, 2019

I'll review the source to make sure all declarations are being registers, but I think they already should be. If you could get a repro case together that would make it much easier to resolve.

Thanks a lot! I keep trying too.

@Darmody
Copy link
Author

Darmody commented Aug 16, 2019

屏幕快照 2019-08-16 19 12 22

Hi, @rpetrich I figure out warning disappear when I remove all variable definition before the async function.

Once I add variable definition before, warning show up.

Hope this is helpful

@Darmody
Copy link
Author

Darmody commented Aug 16, 2019

屏幕快照 2019-08-16 19 15 51

This is my babel config

@Darmody
Copy link
Author

Darmody commented Aug 16, 2019

https://github.com/Darmody/async-to-promise-demo

@rpetrich Here is a simple reproduce demo

@rpetrich
Copy link
Owner

Thanks for providing a repro. This has now been fixed in master.

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

No branches or pull requests

2 participants