MCPcopy Index your code
hub / github.com/nodejs/node / getForInVariableSymbol

Function getForInVariableSymbol

test/fixtures/snapshot/typescript.js:75177–75189  ·  view source on GitHub ↗

* Return the symbol of the for-in variable declared or referenced by the given for-in statement.

(node)

Source from the content-addressed store, hash-verified

75175 * Return the symbol of the for-in variable declared or referenced by the given for-in statement.
75176 */
75177 function getForInVariableSymbol(node) {
75178 var initializer = node.initializer;
75179 if (initializer.kind === 255 /* SyntaxKind.VariableDeclarationList */) {
75180 var variable = initializer.declarations[0];
75181 if (variable && !ts.isBindingPattern(variable.name)) {
75182 return getSymbolOfNode(variable);
75183 }
75184 }
75185 else if (initializer.kind === 79 /* SyntaxKind.Identifier */) {
75186 return getResolvedSymbol(initializer);
75187 }
75188 return undefined;
75189 }
75190 /**
75191 * Return true if the given type is considered to have numeric property names.
75192 */

Calls 2

getSymbolOfNodeFunction · 0.85
getResolvedSymbolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…