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

Function hoistVariable

test/fixtures/snapshot/typescript.js:96192–96205  ·  view source on GitHub ↗
(_a)

Source from the content-addressed store, hash-verified

96190 ts.forEach(node.declarations, hoistVariable);
96191 }
96192 function hoistVariable(_a) {
96193 var name = _a.name;
96194 if (ts.isIdentifier(name)) {
96195 hoistVariableDeclaration(name);
96196 }
96197 else {
96198 for (var _i = 0, _b = name.elements; _i < _b.length; _i++) {
96199 var element = _b[_i];
96200 if (!ts.isOmittedExpression(element)) {
96201 hoistVariable(element);
96202 }
96203 }
96204 }
96205 }
96206 function transformInitializedVariable(node) {
96207 var converted = ts.setSourceMapRange(factory.createAssignment(factory.converters.convertToAssignmentElementTarget(node.name), node.initializer), node);
96208 return ts.visitNode(converted, visitor, ts.isExpression);

Callers

nothing calls this directly

Calls 1

hoistVariableDeclarationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…