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

Function createVariableAssignment

test/fixtures/snapshot/typescript.js:106454–106459  ·  view source on GitHub ↗

* Creates an assignment expression for a variable declaration. * * @param name The name of the variable. * @param value The value of the variable's initializer. * @param location The source map location for the assignment. * @param isExportedDeclaration A

(name, value, location, isExportedDeclaration)

Source from the content-addressed store, hash-verified

106452 * @param isExportedDeclaration A value indicating whether the variable is exported.
106453 */
106454 function createVariableAssignment(name, value, location, isExportedDeclaration) {
106455 hoistVariableDeclaration(factory.cloneNode(name));
106456 return isExportedDeclaration
106457 ? createExportExpression(name, preventSubstitution(ts.setTextRange(factory.createAssignment(name, value), location)))
106458 : preventSubstitution(ts.setTextRange(factory.createAssignment(name, value), location));
106459 }
106460 /**
106461 * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged
106462 * and transformed declaration.

Calls 3

hoistVariableDeclarationFunction · 0.85
createExportExpressionFunction · 0.85
preventSubstitutionFunction · 0.85

Tested by

no test coverage detected