MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / createPrinter

Function createPrinter

src/LuaPrinter.ts:85–93  ·  view source on GitHub ↗
(printers: Printer[])

Source from the content-addressed store, hash-verified

83}
84
85export function createPrinter(printers: Printer[]): Printer {
86 if (printers.length === 0) {
87 return (program, emitHost, fileName, file) => new LuaPrinter(emitHost, program, fileName).print(file);
88 } else if (printers.length === 1) {
89 return printers[0];
90 } else {
91 throw new Error("Only one plugin can specify 'printer'");
92 }
93}
94
95export class LuaPrinter {
96 private static operatorMap: Record<lua.Operator, string> = {

Callers 1

Calls 1

printMethod · 0.80

Tested by

no test coverage detected