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

Function runCli

test/cli/run.ts:21–31  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

19}
20
21export async function runCli(args: string[]): Promise<CliResult> {
22 const child = forkCli(args);
23
24 let output = "";
25 child.stdout!.on("data", (data: Buffer) => (output += data.toString()));
26 child.stderr!.on("data", (data: Buffer) => (output += data.toString()));
27
28 return new Promise(resolve => {
29 child.on("close", exitCode => resolve({ exitCode: exitCode ?? 1, output }));
30 });
31}

Callers 1

errors.spec.tsFile · 0.90

Calls 2

forkCliFunction · 0.85
toStringMethod · 0.80

Tested by

no test coverage detected