(node)
| 46818 | return nodeText === '"use strict"' || nodeText === "'use strict'"; |
| 46819 | } |
| 46820 | function bindWorker(node) { |
| 46821 | switch (node.kind) { |
| 46822 | /* Strict mode checks */ |
| 46823 | case 79 /* SyntaxKind.Identifier */: |
| 46824 | // for typedef type names with namespaces, bind the new jsdoc type symbol here |
| 46825 | // because it requires all containing namespaces to be in effect, namely the |
| 46826 | // current "blockScopeContainer" needs to be set to its immediate namespace parent. |
| 46827 | if (node.isInJSDocNamespace) { |
| 46828 | var parentNode = node.parent; |
| 46829 | while (parentNode && !ts.isJSDocTypeAlias(parentNode)) { |
| 46830 | parentNode = parentNode.parent; |
| 46831 | } |
| 46832 | bindBlockScopedDeclaration(parentNode, 524288 /* SymbolFlags.TypeAlias */, 788968 /* SymbolFlags.TypeAliasExcludes */); |
| 46833 | break; |
| 46834 | } |
| 46835 | // falls through |
| 46836 | case 108 /* SyntaxKind.ThisKeyword */: |
| 46837 | if (currentFlow && (ts.isExpression(node) || parent.kind === 297 /* SyntaxKind.ShorthandPropertyAssignment */)) { |
| 46838 | node.flowNode = currentFlow; |
| 46839 | } |
| 46840 | return checkContextualIdentifier(node); |
| 46841 | case 161 /* SyntaxKind.QualifiedName */: |
| 46842 | if (currentFlow && ts.isPartOfTypeQuery(node)) { |
| 46843 | node.flowNode = currentFlow; |
| 46844 | } |
| 46845 | break; |
| 46846 | case 231 /* SyntaxKind.MetaProperty */: |
| 46847 | case 106 /* SyntaxKind.SuperKeyword */: |
| 46848 | node.flowNode = currentFlow; |
| 46849 | break; |
| 46850 | case 80 /* SyntaxKind.PrivateIdentifier */: |
| 46851 | return checkPrivateIdentifier(node); |
| 46852 | case 206 /* SyntaxKind.PropertyAccessExpression */: |
| 46853 | case 207 /* SyntaxKind.ElementAccessExpression */: |
| 46854 | var expr = node; |
| 46855 | if (currentFlow && isNarrowableReference(expr)) { |
| 46856 | expr.flowNode = currentFlow; |
| 46857 | } |
| 46858 | if (ts.isSpecialPropertyDeclaration(expr)) { |
| 46859 | bindSpecialPropertyDeclaration(expr); |
| 46860 | } |
| 46861 | if (ts.isInJSFile(expr) && |
| 46862 | file.commonJsModuleIndicator && |
| 46863 | ts.isModuleExportsAccessExpression(expr) && |
| 46864 | !lookupSymbolForName(blockScopeContainer, "module")) { |
| 46865 | declareSymbol(file.locals, /*parent*/ undefined, expr.expression, 1 /* SymbolFlags.FunctionScopedVariable */ | 134217728 /* SymbolFlags.ModuleExports */, 111550 /* SymbolFlags.FunctionScopedVariableExcludes */); |
| 46866 | } |
| 46867 | break; |
| 46868 | case 221 /* SyntaxKind.BinaryExpression */: |
| 46869 | var specialKind = ts.getAssignmentDeclarationKind(node); |
| 46870 | switch (specialKind) { |
| 46871 | case 1 /* AssignmentDeclarationKind.ExportsProperty */: |
| 46872 | bindExportsPropertyAssignment(node); |
| 46873 | break; |
| 46874 | case 2 /* AssignmentDeclarationKind.ModuleExports */: |
| 46875 | bindModuleExportsAssignment(node); |
| 46876 | break; |
| 46877 | case 3 /* AssignmentDeclarationKind.PrototypeProperty */: |
no test coverage detected
searching dependent graphs…