Skip to content

Commit

Permalink
Typescript transform now removes generic arguments from optional calls (
Browse files Browse the repository at this point in the history
Fixes #11813) (#11816)
  • Loading branch information
RafaelSalguero committed Jul 9, 2020
1 parent 55ce749 commit f32d5de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/babel-plugin-transform-typescript/src/index.js
Expand Up @@ -419,6 +419,10 @@ export default declare(
path.node.typeParameters = null;
},

OptionalCallExpression(path) {
path.node.typeParameters = null;
},

NewExpression(path) {
path.node.typeParameters = null;
},
Expand Down
@@ -0,0 +1 @@
x?.f<T>();
@@ -0,0 +1 @@
x?.f();

0 comments on commit f32d5de

Please sign in to comment.