diff --git a/src/def/typescript.ts b/src/def/typescript.ts index c050529e..97bc8877 100644 --- a/src/def/typescript.ts +++ b/src/def/typescript.ts @@ -519,6 +519,9 @@ export default function (fork: Fork) { def("TSDeclareMethod"), TSTypeMember )]); + + def("CallExpression") + .bases("TSHasOptionalTypeParameterInstantiation"); }; maybeSetModuleExports(() => module); diff --git a/src/test/typescript.ts b/src/test/typescript.ts index a9c2b4c4..31f168cd 100644 --- a/src/test/typescript.ts +++ b/src/test/typescript.ts @@ -407,5 +407,19 @@ glob("**/*.ts", { } }); }); + + it("visits type parameters of call expressions", function () { + const program = babelParse([ + "fn(808)", + ].join("\n"), { + plugins: ["typescript"] + }); + + assertVisited(program, { + visitTSTypeParameterInstantiation(path) { + this.traverse(path); + } + }); + }); }); -}); \ No newline at end of file +});