From 3af44a26eb9426603c265e800176603518f85981 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Wed, 19 May 2021 20:15:35 +0800 Subject: [PATCH] docs(cli/dts): make worker example pass (#10703) --- cli/dts/lib.deno.unstable.d.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 5a3547a6b3..b64117c23e 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)