diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-05-19 20:15:35 +0800 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2021-05-31 16:37:29 +0200 |
commit | 073e05f9fbf54f4de6e8a033d157e61969f1335c (patch) | |
tree | 9cf02c6f3019505693c85765d47a75088945a535 | |
parent | 736b73647989bb51f2f9737b4a2bc27c3f336aed (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) |