Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ts] Add support for instantiation expressions (#14457)
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
- Loading branch information
1 parent
92ffff4
commit d6ff919
Showing
56 changed files
with
981 additions
and
90 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
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
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
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
7 changes: 7 additions & 0 deletions
7
packages/babel-generator/test/fixtures/typescript/instantiation-expression/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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
a<b>; | ||
|
||
(a<b>)<c>; | ||
(a<b>)<c>(); | ||
(a<b>)<c>?.(); | ||
(a?.b<c>)<d>(); | ||
new (a<b>)<c>(); |
6 changes: 6 additions & 0 deletions
6
packages/babel-generator/test/fixtures/typescript/instantiation-expression/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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
a<b>; | ||
(a<b>)<c>; | ||
(a<b>)<c>(); | ||
(a<b>)<c>?.(); | ||
(a?.b<c>)<d>(); | ||
new (a<b>)<c>(); |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/typescript/type-arguments-new/input.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,2 +1,3 @@ | ||
new C<T>(); | ||
new C<T, U>(); | ||
new C<T>; |
3 changes: 2 additions & 1 deletion
3
packages/babel-generator/test/fixtures/typescript/type-arguments-new/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,2 +1,3 @@ | ||
new C<T>(); | ||
new C<T, U>(); | ||
new C<T, U>(); | ||
new C<T>(); |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/typescript/types-typeof/input.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,2 @@ | ||
let x: typeof y.z; | ||
let a: typeof b.c<d>; |
3 changes: 2 additions & 1 deletion
3
packages/babel-generator/test/fixtures/typescript/types-typeof/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,2 @@ | ||
let x: typeof y.z; | ||
let x: typeof y.z; | ||
let a: typeof b.c<d>; |
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
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
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
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
Oops, something went wrong.