(node)
| 85599 | } |
| 85600 | } |
| 85601 | function checkSourceElementWorker(node) { |
| 85602 | if (ts.isInJSFile(node)) { |
| 85603 | ts.forEach(node.jsDoc, function (_a) { |
| 85604 | var tags = _a.tags; |
| 85605 | return ts.forEach(tags, checkSourceElement); |
| 85606 | }); |
| 85607 | } |
| 85608 | var kind = node.kind; |
| 85609 | if (cancellationToken) { |
| 85610 | // Only bother checking on a few construct kinds. We don't want to be excessively |
| 85611 | // hitting the cancellation token on every node we check. |
| 85612 | switch (kind) { |
| 85613 | case 261 /* SyntaxKind.ModuleDeclaration */: |
| 85614 | case 257 /* SyntaxKind.ClassDeclaration */: |
| 85615 | case 258 /* SyntaxKind.InterfaceDeclaration */: |
| 85616 | case 256 /* SyntaxKind.FunctionDeclaration */: |
| 85617 | cancellationToken.throwIfCancellationRequested(); |
| 85618 | } |
| 85619 | } |
| 85620 | if (kind >= 237 /* SyntaxKind.FirstStatement */ && kind <= 253 /* SyntaxKind.LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { |
| 85621 | errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, ts.Diagnostics.Unreachable_code_detected); |
| 85622 | } |
| 85623 | switch (kind) { |
| 85624 | case 163 /* SyntaxKind.TypeParameter */: |
| 85625 | return checkTypeParameter(node); |
| 85626 | case 164 /* SyntaxKind.Parameter */: |
| 85627 | return checkParameter(node); |
| 85628 | case 167 /* SyntaxKind.PropertyDeclaration */: |
| 85629 | return checkPropertyDeclaration(node); |
| 85630 | case 166 /* SyntaxKind.PropertySignature */: |
| 85631 | return checkPropertySignature(node); |
| 85632 | case 180 /* SyntaxKind.ConstructorType */: |
| 85633 | case 179 /* SyntaxKind.FunctionType */: |
| 85634 | case 174 /* SyntaxKind.CallSignature */: |
| 85635 | case 175 /* SyntaxKind.ConstructSignature */: |
| 85636 | case 176 /* SyntaxKind.IndexSignature */: |
| 85637 | return checkSignatureDeclaration(node); |
| 85638 | case 169 /* SyntaxKind.MethodDeclaration */: |
| 85639 | case 168 /* SyntaxKind.MethodSignature */: |
| 85640 | return checkMethodDeclaration(node); |
| 85641 | case 170 /* SyntaxKind.ClassStaticBlockDeclaration */: |
| 85642 | return checkClassStaticBlockDeclaration(node); |
| 85643 | case 171 /* SyntaxKind.Constructor */: |
| 85644 | return checkConstructorDeclaration(node); |
| 85645 | case 172 /* SyntaxKind.GetAccessor */: |
| 85646 | case 173 /* SyntaxKind.SetAccessor */: |
| 85647 | return checkAccessorDeclaration(node); |
| 85648 | case 178 /* SyntaxKind.TypeReference */: |
| 85649 | return checkTypeReferenceNode(node); |
| 85650 | case 177 /* SyntaxKind.TypePredicate */: |
| 85651 | return checkTypePredicate(node); |
| 85652 | case 181 /* SyntaxKind.TypeQuery */: |
| 85653 | return checkTypeQuery(node); |
| 85654 | case 182 /* SyntaxKind.TypeLiteral */: |
| 85655 | return checkTypeLiteral(node); |
| 85656 | case 183 /* SyntaxKind.ArrayType */: |
| 85657 | return checkArrayType(node); |
| 85658 | case 184 /* SyntaxKind.TupleType */: |
no test coverage detected
searching dependent graphs…