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

[helpers TS conversion] async functions/generators #16510

Merged
merged 18 commits into from
Jun 5, 2024

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented May 17, 2024

Q                       A
Fixed Issues? Part of #16500
Patch: Bug Fix? No
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? No
License MIT

Migrate all async functions/generators related Babel helpers to TypeScript with reasonable types (and a huge amount of TypeScript exercise~).

The PR also introduces a small change to the helper building script.

@babel-bot
Copy link
Collaborator

babel-bot commented May 17, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57119

@SukkaW SukkaW marked this pull request as draft May 17, 2024 19:38
@SukkaW SukkaW force-pushed the migrate-async-helper branch 2 times, most recently from 9271b6b to da76b15 Compare May 17, 2024 19:42
@liuxingbaoyu
Copy link
Member

Thank you very much for the extremely high quality PR!
Unfortunately we generally assume that helpers need to support running before execution (i.e. before the global var is initialized), which is used when circular references are used, so we may need to keep the original form here.
❤️

@nicolo-ribaudo
Copy link
Member

Merged, you can rebase

@SukkaW
Copy link
Contributor Author

SukkaW commented May 23, 2024

@nicolo-ribaudo Sorry for the late response. I am a bit busy recently. I am going to continue working on the PR ASAP.

@SukkaW SukkaW marked this pull request as ready for review May 23, 2024 14:31
@ehoogeveen-medweb
Copy link
Contributor

By the way, Ron Buckton has been doing a bunch of work recently to improve the types of iterators in TypeScript itself recently: microsoft/TypeScript#58243 (and related PRs)

I don't know to what extent the babel helper types should equal the standard library types or if there are any lessons that can be learned from that work that would be applicable here, but I wanted to mention it given the timing :)

@SukkaW
Copy link
Contributor Author

SukkaW commented Jun 2, 2024

@nicolo-ribaudo It appears the new helper generation script is not included in the babel-old-version, causing the CI to fail.

Is it a blocking factor?

@nicolo-ribaudo
Copy link
Member

We should get that CI job green, but I can take a look at it tomorrow

@nicolo-ribaudo nicolo-ribaudo force-pushed the migrate-async-helper branch 7 times, most recently from 961d6dc to f63cd60 Compare June 4, 2024 15:21
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and sorry it took so long!

Copy link
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicolo-ribaudo nicolo-ribaudo merged commit 14a0b08 into babel:main Jun 5, 2024
51 checks passed
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

Successfully merging this pull request may close these issues.

None yet

5 participants