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

Function transformInitializedVariable

test/fixtures/snapshot/typescript.js:93348–93358  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

93346 }
93347 }
93348 function transformInitializedVariable(node) {
93349 var name = node.name;
93350 if (ts.isBindingPattern(name)) {
93351 return ts.flattenDestructuringAssignment(node, visitor, context, 0 /* FlattenLevel.All */,
93352 /*needsValue*/ false, createNamespaceExportExpression);
93353 }
93354 else {
93355 return ts.setTextRange(factory.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), ts.visitNode(node.initializer, visitor, ts.isExpression)),
93356 /*location*/ node);
93357 }
93358 }
93359 function visitVariableDeclaration(node) {
93360 var updated = factory.updateVariableDeclaration(node, ts.visitNode(node.name, visitor, ts.isBindingName),
93361 /*exclamationToken*/ undefined,

Callers 3

visitVariableStatementFunction · 0.85
visitForInitializerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…