MCPcopy Create free account
hub / github.com/nodejs/node / getVariableDeclaration

Function getVariableDeclaration

test/fixtures/snapshot/typescript.js:135451–135458  ·  view source on GitHub ↗
(property)

Source from the content-addressed store, hash-verified

135449 return !((_a = ts.tryCast(ts.isExternalModuleReference(specifier) ? specifier.expression : specifier, ts.isStringLiteralLike)) === null || _a === void 0 ? void 0 : _a.text);
135450 }
135451 function getVariableDeclaration(property) {
135452 var variableDeclaration = ts.findAncestor(property, function (node) {
135453 return ts.isFunctionBlock(node) || isArrowFunctionBody(node) || ts.isBindingPattern(node)
135454 ? "quit"
135455 : ts.isVariableDeclaration(node);
135456 });
135457 return variableDeclaration;
135458 }
135459 function isArrowFunctionBody(node) {
135460 return node.parent && ts.isArrowFunction(node.parent) && node.parent.body === node;
135461 }

Callers 1

Calls 1

isArrowFunctionBodyFunction · 0.85

Tested by

no test coverage detected