(node, checkMode, forceTuple)
| 79895 | return checkExpression(node.expression, checkMode); |
| 79896 | } |
| 79897 | function checkExpressionWorker(node, checkMode, forceTuple) { |
| 79898 | var kind = node.kind; |
| 79899 | if (cancellationToken) { |
| 79900 | // Only bother checking on a few construct kinds. We don't want to be excessively |
| 79901 | // hitting the cancellation token on every node we check. |
| 79902 | switch (kind) { |
| 79903 | case 226 /* SyntaxKind.ClassExpression */: |
| 79904 | case 213 /* SyntaxKind.FunctionExpression */: |
| 79905 | case 214 /* SyntaxKind.ArrowFunction */: |
| 79906 | cancellationToken.throwIfCancellationRequested(); |
| 79907 | } |
| 79908 | } |
| 79909 | switch (kind) { |
| 79910 | case 79 /* SyntaxKind.Identifier */: |
| 79911 | return checkIdentifier(node, checkMode); |
| 79912 | case 80 /* SyntaxKind.PrivateIdentifier */: |
| 79913 | return checkPrivateIdentifierExpression(node); |
| 79914 | case 108 /* SyntaxKind.ThisKeyword */: |
| 79915 | return checkThisExpression(node); |
| 79916 | case 106 /* SyntaxKind.SuperKeyword */: |
| 79917 | return checkSuperExpression(node); |
| 79918 | case 104 /* SyntaxKind.NullKeyword */: |
| 79919 | return nullWideningType; |
| 79920 | case 14 /* SyntaxKind.NoSubstitutionTemplateLiteral */: |
| 79921 | case 10 /* SyntaxKind.StringLiteral */: |
| 79922 | return getFreshTypeOfLiteralType(getStringLiteralType(node.text)); |
| 79923 | case 8 /* SyntaxKind.NumericLiteral */: |
| 79924 | checkGrammarNumericLiteral(node); |
| 79925 | return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); |
| 79926 | case 9 /* SyntaxKind.BigIntLiteral */: |
| 79927 | checkGrammarBigIntLiteral(node); |
| 79928 | return getFreshTypeOfLiteralType(getBigIntLiteralType({ |
| 79929 | negative: false, |
| 79930 | base10Value: ts.parsePseudoBigInt(node.text) |
| 79931 | })); |
| 79932 | case 110 /* SyntaxKind.TrueKeyword */: |
| 79933 | return trueType; |
| 79934 | case 95 /* SyntaxKind.FalseKeyword */: |
| 79935 | return falseType; |
| 79936 | case 223 /* SyntaxKind.TemplateExpression */: |
| 79937 | return checkTemplateExpression(node); |
| 79938 | case 13 /* SyntaxKind.RegularExpressionLiteral */: |
| 79939 | return globalRegExpType; |
| 79940 | case 204 /* SyntaxKind.ArrayLiteralExpression */: |
| 79941 | return checkArrayLiteral(node, checkMode, forceTuple); |
| 79942 | case 205 /* SyntaxKind.ObjectLiteralExpression */: |
| 79943 | return checkObjectLiteral(node, checkMode); |
| 79944 | case 206 /* SyntaxKind.PropertyAccessExpression */: |
| 79945 | return checkPropertyAccessExpression(node, checkMode); |
| 79946 | case 161 /* SyntaxKind.QualifiedName */: |
| 79947 | return checkQualifiedName(node, checkMode); |
| 79948 | case 207 /* SyntaxKind.ElementAccessExpression */: |
| 79949 | return checkIndexedAccess(node, checkMode); |
| 79950 | case 208 /* SyntaxKind.CallExpression */: |
| 79951 | if (node.expression.kind === 100 /* SyntaxKind.ImportKeyword */) { |
| 79952 | return checkImportCallExpression(node); |
| 79953 | } |
| 79954 | // falls through |
no test coverage detected
searching dependent graphs…