MCPcopy
hub / github.com/prettier/prettier / initPrinter

Function initPrinter

src/main/parser-and-printer.js:71–78  ·  view source on GitHub ↗
(plugin, astFormat)

Source from the content-addressed store, hash-verified

69}
70
71async function initPrinter(plugin, astFormat) {
72 const printerOrPrinterInitFunction = plugin.printers[astFormat];
73 const printer =
74 typeof printerOrPrinterInitFunction === "function"
75 ? await printerOrPrinterInitFunction()
76 : printerOrPrinterInitFunction;
77 return normalizePrinter(printer);
78}
79
80const PRINTER_NORMALIZED_MARK = Symbol("PRINTER_NORMALIZED_MARK");
81function normalizePrinterWithoutCache(printer) {

Callers 1

normalizeFormatOptionsFunction · 0.90

Calls 1

normalizePrinterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…