()
| 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 */: |
no test coverage detected
searching dependent graphs…