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

Function symbolToStringWorker

test/fixtures/snapshot/typescript.js:52231–52238  ·  view source on GitHub ↗
(writer)

Source from the content-addressed store, hash-verified

52229 var builder = flags & 4 /* SymbolFormatFlags.AllowAnyNodeKind */ ? nodeBuilder.symbolToExpression : nodeBuilder.symbolToEntityName;
52230 return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
52231 function symbolToStringWorker(writer) {
52232 var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); // TODO: GH#18217
52233 // add neverAsciiEscape for GH#39027
52234 var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 305 /* SyntaxKind.SourceFile */ ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
52235 var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
52236 printer.writeNode(4 /* EmitHint.Unspecified */, entity, /*sourceFile*/ sourceFile, writer);
52237 return writer;
52238 }
52239 }
52240 function signatureToString(signature, enclosingDeclaration, flags, kind, writer) {
52241 if (flags === void 0) { flags = 0 /* TypeFormatFlags.None */; }

Callers 1

symbolToStringFunction · 0.85

Calls 1

builderFunction · 0.50

Tested by

no test coverage detected