FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Correctly generate `TSMappedType` by liuxingbaoyu · Pull Request #16394 · babel/babel · GitHub

/ babel Public

fix: Correctly generate TSMappedType - #16394

Merged
nicolo-ribaudo merged 1 commit into
babel:mainfrom
liuxingbaoyu:fix-TSMappedType
Apr 1, 2024
Merged

nicolo-ribaudo merged 1 commit into
babel:mainfrom
liuxingbaoyu:fix-TSMappedType

Conversation

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #16393
Patch: Bug Fix? √
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? √
Documentation PR Link
Any Dependency Changes?
License MIT

liuxingbaoyu added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: typescript pkg: generator labels Mar 29, 2024

Copy link
Copy Markdown
Collaborator

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

liuxingbaoyu requested a review from JLHwung April 1, 2024 11:12
nicolo-ribaudo merged commit 22725e9 into babel:main Apr 1, 2024

aczekajski commented Apr 1, 2024 •
edited
Loading

Copy link
Copy Markdown

@liuxingbaoyu Thank you for the swift fix!
I looked briefly at the PR and I have a feeling that it won't generate the same TS code in these cases:

type Foo2 = { [key in Bar]? };
type Foo3 = { [key in keyof Bar]-? };
type Foo4 = { [key in keyof Bar]+? };

Copy link
Copy Markdown
Member Author

You are right, thank you! I will open a new PR.

Copy link
Copy Markdown
Member

Ugh, til that's valid TS 😬

Copy link
Copy Markdown

Suprisingly it is 😂

github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 2, 2024
github-actions Bot locked as resolved and limited conversation to collaborators Jul 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: generator PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Typescript mapped type with implicit any results in faulty TS

5 participants


Back | FazBrowse Home | New Git URL