MCPcopy Index your code
hub / github.com/nodejs/node / canFollowTypeArgumentsInExpression

Function canFollowTypeArgumentsInExpression

test/fixtures/snapshot/typescript.js:35632–35642  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35630 return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined;
35631 }
35632 function canFollowTypeArgumentsInExpression() {
35633 switch (token()) {
35634 // These tokens can follow a type argument list in a call expression.
35635 case 20 /* SyntaxKind.OpenParenToken */: // foo<x>(
35636 case 14 /* SyntaxKind.NoSubstitutionTemplateLiteral */: // foo<T> `...`
35637 case 15 /* SyntaxKind.TemplateHead */: // foo<T> `...${100}...`
35638 return true;
35639 }
35640 // Consider something a type argument list only if the following token can't start an expression.
35641 return !isStartOfExpression();
35642 }
35643 function parsePrimaryExpression() {
35644 switch (token()) {
35645 case 8 /* SyntaxKind.NumericLiteral */:

Callers 1

Calls 2

isStartOfExpressionFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…