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

Function emitBlockFunctionBody

test/fixtures/snapshot/typescript.js:112827–112839  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

112825 return true;
112826 }
112827 function emitBlockFunctionBody(body) {
112828 onBeforeEmitNode === null || onBeforeEmitNode === void 0 ? void 0 : onBeforeEmitNode(body);
112829 writeSpace();
112830 writePunctuation("{");
112831 increaseIndent();
112832 var emitBlockFunctionBody = shouldEmitBlockFunctionBodyOnSingleLine(body)
112833 ? emitBlockFunctionBodyOnSingleLine
112834 : emitBlockFunctionBodyWorker;
112835 emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
112836 decreaseIndent();
112837 writeToken(19 /* SyntaxKind.CloseBraceToken */, body.statements.end, writePunctuation, body);
112838 onAfterEmitNode === null || onAfterEmitNode === void 0 ? void 0 : onAfterEmitNode(body);
112839 }
112840 function emitBlockFunctionBodyOnSingleLine(body) {
112841 emitBlockFunctionBodyWorker(body, /*emitBlockFunctionBodyOnSingleLine*/ true);
112842 }

Callers 2

emitSignatureAndBodyFunction · 0.85

Calls 9

onBeforeEmitNodeFunction · 0.85
writeSpaceFunction · 0.85
writePunctuationFunction · 0.85
increaseIndentFunction · 0.85
decreaseIndentFunction · 0.85
writeTokenFunction · 0.85
onAfterEmitNodeFunction · 0.85

Tested by

no test coverage detected