From 330c820ae8d7826dfe3d88c01ba07728121fa021 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 17 May 2022 21:27:17 +0100 Subject: BREAKING(unstable): Enable Deno namespace in workers by default (#14581) This commit removes "WorkerOptions.deno" option as a boolean, as well as "WorkerOptions.deno.namespace" settings. Starting with this commit all workers have access to "Deno" namespace by default. --- cli/dts/lib.deno.unstable.d.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'cli/dts/lib.deno.unstable.d.ts') diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 6e9cf7789..d5797eb83 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -1134,9 +1134,6 @@ declare function fetch( declare interface WorkerOptions { /** UNSTABLE: New API. - * - * Set deno.namespace to `true` to make `Deno` namespace and all of its - * methods available to the worker environment. Defaults to `false`. * * Configure permissions options to change the level of access the worker will * have. By default it will have no permissions. Note that the permissions @@ -1154,7 +1151,6 @@ declare interface WorkerOptions { * new URL("deno_worker.ts", import.meta.url).href, { * type: "module", * deno: { - * namespace: true, * permissions: { * read: true, * }, @@ -1163,11 +1159,7 @@ declare interface WorkerOptions { * ); * ``` */ - // TODO(Soremwar) - // `deno: boolean` is kept for backwards compatibility with the previous - // worker options implementation. Remove for 2.0. - deno?: boolean | { - namespace?: boolean; + deno?: { /** Set to `"none"` to disable all the permissions in the worker. */ permissions?: Deno.PermissionOptions; }; -- cgit v1.2.3