diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-05-19 20:15:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 08:15:35 -0400 |
commit | 3af44a26eb9426603c265e800176603518f85981 (patch) | |
tree | c321c3d70170d55601b86fcd3ad91df64392b2f6 | |
parent | 7f94db1bfd0417c37a4eb9c6161a43c6ed6867aa (diff) |
docs(cli/dts): make worker example pass (#10703)
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 5a3547a6b..b64117c23 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -1351,28 +1351,6 @@ declare interface WorkerOptions { * }, * } * ); - * worker.postMessage({ cmd: "readFile", fileName: "./log.txt" }); - * - * // deno_worker.ts - * - * - * self.onmessage = async function (e) { - * const { cmd, fileName } = e.data; - * if (cmd !== "readFile") { - * throw new Error("Invalid command"); - * } - * const buf = await Deno.readFile(fileName); - * const fileContents = new TextDecoder().decode(buf); - * console.log(fileContents); - * } - * - * // $ cat log.txt - * // hello world - * // hello world 2 - * - * // $ deno run --allow-read mod.ts - * // hello world - * // hello world2 * ``` */ // TODO(Soremwar) |