-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(babel-plugin-jsx-pragmatic): migrate to typescript #2570
feat(babel-plugin-jsx-pragmatic): migrate to typescript #2570
Conversation
🦋 Changeset detectedLatest commit: 7a491b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7a491b3:
|
btw this should also allow me to do |
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@G-Rath Looks good. Was there any progress on getting some of these types into DefinitelyTyped so they can be removed from the Emotion code?
Edit: I see you now that you got the PluginPass
stuff merged in DefinitelyTyped. Could you update this PR to take advantage of that change? Thanks.
Edit 2: Ideally the tests for babel-plugin-jsx-pragmatic
should be converted to TypeScript too for this change. The code for babel-tester
is in scripts/babel-tester/src/index.js
. If you change that file to .ts
it should "just work".
I don't mind doing converting |
OK, since it is a bigger change, doing it in a separate PR is fine 👍 @Andarist I believe this is ready to be merged. |
"@types/babel__generator" "*" | ||
"@types/babel__template" "*" | ||
"@types/babel__traverse" "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet, sweet little lies 😅
What:
Migrates
@emotion/babel-plugin-jsx-pragmatic
to TypeScript.Why:
Part of #2358
How:
Renamed the js file to ts, and made changes to make TS happy.
Checklist:
I've not converted the tests because I don't know how to handle
babel-tester
since it's apparently coming in as some magical workspace thing (I've not worked with workspaces a lot 😅).I'm sure there will be a way to tell TypeScript that it exists, but that probably will need either a type definition written or the package converted to TypeScript, so have left it for now.
I'll be making a few follow-up PRs to DefinitelyTyped that'll remove the need for some of the types, but they probably won't land for at least a month.