diff options
Diffstat (limited to 'prettier')
| -rw-r--r-- | prettier/main_test.ts | 2 | ||||
| -rw-r--r-- | prettier/testdata/opts/0.ts | 8 | ||||
| -rw-r--r-- | prettier/util.ts | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/prettier/main_test.ts b/prettier/main_test.ts index 86d6a75a5..bbd7f4bc1 100644 --- a/prettier/main_test.ts +++ b/prettier/main_test.ts @@ -13,7 +13,7 @@ async function run( ): Promise<{ stdout: string; code: number | undefined }> { const p = xrun({ args, stdout: "piped" }); - const stdout = decoder.decode(await readAll(p.stdout)); + const stdout = decoder.decode(await readAll(p.stdout!)); const { code } = await p.status(); return { stdout, code }; diff --git a/prettier/testdata/opts/0.ts b/prettier/testdata/opts/0.ts index fb85014a5..400e7ee56 100644 --- a/prettier/testdata/opts/0.ts +++ b/prettier/testdata/opts/0.ts @@ -1,2 +1,6 @@ -console.log(0) -console.log([function foo() {}, function baz() {}, a => {}]) +console.log(0); +console.log([ + function foo() {}, + function baz() {}, + a => {} +]); diff --git a/prettier/util.ts b/prettier/util.ts index 1c5513c8d..b8f79005d 100644 --- a/prettier/util.ts +++ b/prettier/util.ts @@ -2,7 +2,7 @@ const { build, run } = Deno; // Runs a command in cross-platform way -export function xrun(opts): Deno.Process { +export function xrun(opts: Deno.RunOptions): Deno.Process { return run({ ...opts, args: build.os === "win" ? ["cmd.exe", "/c", ...opts.args] : opts.args |
