-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Correctly prints
{ [key in Bar]? }
(#16402)
fix
- Loading branch information
1 parent
dd699a8
commit 38c14c3
Showing
3 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/typescript/mapped-type/input.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
type Bar = { [key in Foo] }; | ||
type Foo2 = { [key in Bar]? }; | ||
type Foo3 = { [key in keyof Bar]-? }; | ||
type Foo4 = { [key in keyof Bar]+? }; |
5 changes: 4 additions & 1 deletion
5
packages/babel-generator/test/fixtures/typescript/mapped-type/output.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
type Bar = { [key in Foo] }; | ||
type Bar = { [key in Foo] }; | ||
type Foo2 = { [key in Bar]? }; | ||
type Foo3 = { [key in keyof Bar]-? }; | ||
type Foo4 = { [key in keyof Bar]+? }; |