(node)
| 47550 | : bindBlockScopedDeclaration(node, 256 /* SymbolFlags.RegularEnum */, 899327 /* SymbolFlags.RegularEnumExcludes */); |
| 47551 | } |
| 47552 | function bindVariableDeclarationOrBindingElement(node) { |
| 47553 | if (inStrictMode) { |
| 47554 | checkStrictModeEvalOrArguments(node, node.name); |
| 47555 | } |
| 47556 | if (!ts.isBindingPattern(node.name)) { |
| 47557 | var possibleVariableDecl = node.kind === 254 /* SyntaxKind.VariableDeclaration */ ? node : node.parent.parent; |
| 47558 | if (ts.isInJSFile(node) && |
| 47559 | ts.isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && |
| 47560 | !ts.getJSDocTypeTag(node) && |
| 47561 | !(ts.getCombinedModifierFlags(node) & 1 /* ModifierFlags.Export */)) { |
| 47562 | declareSymbolAndAddToSymbolTable(node, 2097152 /* SymbolFlags.Alias */, 2097152 /* SymbolFlags.AliasExcludes */); |
| 47563 | } |
| 47564 | else if (ts.isBlockOrCatchScoped(node)) { |
| 47565 | bindBlockScopedDeclaration(node, 2 /* SymbolFlags.BlockScopedVariable */, 111551 /* SymbolFlags.BlockScopedVariableExcludes */); |
| 47566 | } |
| 47567 | else if (ts.isParameterDeclaration(node)) { |
| 47568 | // It is safe to walk up parent chain to find whether the node is a destructuring parameter declaration |
| 47569 | // because its parent chain has already been set up, since parents are set before descending into children. |
| 47570 | // |
| 47571 | // If node is a binding element in parameter declaration, we need to use ParameterExcludes. |
| 47572 | // Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration |
| 47573 | // For example: |
| 47574 | // function foo([a,a]) {} // Duplicate Identifier error |
| 47575 | // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter |
| 47576 | // // which correctly set excluded symbols |
| 47577 | declareSymbolAndAddToSymbolTable(node, 1 /* SymbolFlags.FunctionScopedVariable */, 111551 /* SymbolFlags.ParameterExcludes */); |
| 47578 | } |
| 47579 | else { |
| 47580 | declareSymbolAndAddToSymbolTable(node, 1 /* SymbolFlags.FunctionScopedVariable */, 111550 /* SymbolFlags.FunctionScopedVariableExcludes */); |
| 47581 | } |
| 47582 | } |
| 47583 | } |
| 47584 | function bindParameter(node) { |
| 47585 | if (node.kind === 340 /* SyntaxKind.JSDocParameterTag */ && container.kind !== 323 /* SyntaxKind.JSDocSignature */) { |
| 47586 | return; |
no test coverage detected