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

Function recreateBindingElement

test/fixtures/snapshot/typescript.js:109268–109282  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

109266 return ts.flatten(ts.mapDefined(d.elements, function (e) { return recreateBindingElement(e); }));
109267 }
109268 function recreateBindingElement(e) {
109269 if (e.kind === 227 /* SyntaxKind.OmittedExpression */) {
109270 return;
109271 }
109272 if (e.name) {
109273 if (!getBindingNameVisible(e))
109274 return;
109275 if (ts.isBindingPattern(e.name)) {
109276 return recreateBindingPattern(e.name);
109277 }
109278 else {
109279 return factory.createVariableDeclaration(e.name, /*exclamationToken*/ undefined, ensureType(e, /*type*/ undefined), /*initializer*/ undefined);
109280 }
109281 }
109282 }
109283 function checkName(node) {
109284 var oldDiag;
109285 if (!suppressNewDiagnosticContexts) {

Callers 1

recreateBindingPatternFunction · 0.85

Calls 3

getBindingNameVisibleFunction · 0.85
recreateBindingPatternFunction · 0.85
ensureTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…