diff --git a/languages/tree-sitter-stack-graphs-typescript/src/stack-graphs.tsg b/languages/tree-sitter-stack-graphs-typescript/src/stack-graphs.tsg index 773abde7c..fbc1a55a6 100644 --- a/languages/tree-sitter-stack-graphs-typescript/src/stack-graphs.tsg +++ b/languages/tree-sitter-stack-graphs-typescript/src/stack-graphs.tsg @@ -2678,6 +2678,7 @@ if none @is_async { (ternary_expression) (this) (true) + (instantiation_expression) ; #dialect typescript (type_assertion) ; #end diff --git a/languages/tree-sitter-stack-graphs-typescript/test/expressions/instantiation.ts b/languages/tree-sitter-stack-graphs-typescript/test/expressions/instantiation.ts new file mode 100644 index 000000000..65c217300 --- /dev/null +++ b/languages/tree-sitter-stack-graphs-typescript/test/expressions/instantiation.ts @@ -0,0 +1,4 @@ +function foo unknown>(x: T) {} +class Bar<_T> {} +foo(Bar); +// ^TODO defined: 2