diff options
author | Axetroy <axetroy.dev@gmail.com> | 2019-06-30 23:10:00 +0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-30 11:10:00 -0400 |
commit | 78a9a27e6fcecdac9a11cb01adf585feceed9e18 (patch) | |
tree | ee9f3abb0a209f3767d500e5153fbc95c8b5c77e /prettier/testdata/echox.ts | |
parent | 6d4473324f4fd20a2d138bb6dc264bc4d9337868 (diff) |
prettier: support reading code from stdin (denoland/deno_std#498)
Original: https://github.com/denoland/deno_std/commit/85db520b60053db5dc9b56972bfb6bee506dc158
Diffstat (limited to 'prettier/testdata/echox.ts')
-rw-r--r-- | prettier/testdata/echox.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/prettier/testdata/echox.ts b/prettier/testdata/echox.ts new file mode 100644 index 000000000..68c54b999 --- /dev/null +++ b/prettier/testdata/echox.ts @@ -0,0 +1,8 @@ +async function echox(args: string[]) { + for (const arg of args) { + await Deno.stdout.write(new TextEncoder().encode(arg)); + } + Deno.exit(0); +} + +echox(Deno.args.slice(1)); |