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

Function emitVariableDeclaration

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

Source from the content-addressed store, hash-verified

112737 // Declarations
112738 //
112739 function emitVariableDeclaration(node) {
112740 var _a, _b, _c, _d, _e;
112741 emit(node.name);
112742 emit(node.exclamationToken);
112743 emitTypeAnnotation(node.type);
112744 emitInitializer(node.initializer, (_e = (_b = (_a = node.type) === null || _a === void 0 ? void 0 : _a.end) !== null && _b !== void 0 ? _b : (_d = (_c = node.name.emitNode) === null || _c === void 0 ? void 0 : _c.typeNode) === null || _d === void 0 ? void 0 : _d.end) !== null && _e !== void 0 ? _e : node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma);
112745 }
112746 function emitVariableDeclarationList(node) {
112747 writeKeyword(ts.isLet(node) ? "let" : ts.isVarConst(node) ? "const" : "var");
112748 writeSpace();

Callers 1

Calls 3

emitTypeAnnotationFunction · 0.85
emitInitializerFunction · 0.85
emitFunction · 0.70

Tested by

no test coverage detected