summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.worker.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.deno.worker.d.ts')
-rw-r--r--cli/dts/lib.deno.worker.d.ts25
1 files changed, 15 insertions, 10 deletions
diff --git a/cli/dts/lib.deno.worker.d.ts b/cli/dts/lib.deno.worker.d.ts
index 3fc95a97e..a10b1a276 100644
--- a/cli/dts/lib.deno.worker.d.ts
+++ b/cli/dts/lib.deno.worker.d.ts
@@ -7,48 +7,53 @@
/// <reference lib="deno.shared_globals" />
/// <reference lib="esnext" />
-declare interface DedicatedWorkerGlobalScope {
- self: DedicatedWorkerGlobalScope & typeof globalThis;
+declare class WorkerGlobalScope {
+ new(): WorkerGlobalScope;
+ self: WorkerGlobalScope & typeof globalThis;
onmessage:
| ((
- this: DedicatedWorkerGlobalScope & typeof globalThis,
+ this: WorkerGlobalScope & typeof globalThis,
ev: MessageEvent,
) => any)
| null;
onmessageerror:
| ((
- this: DedicatedWorkerGlobalScope & typeof globalThis,
+ this: WorkerGlobalScope & typeof globalThis,
ev: MessageEvent,
) => any)
| null;
onerror:
| ((
- this: DedicatedWorkerGlobalScope & typeof globalThis,
+ this: WorkerGlobalScope & typeof globalThis,
ev: ErrorEvent,
) => any)
| null;
- name: string;
close: () => void;
postMessage: (message: any) => void;
Deno: typeof Deno;
}
-declare var self: DedicatedWorkerGlobalScope & typeof globalThis;
+declare class DedicatedWorkerGlobalScope extends WorkerGlobalScope {
+ new(): DedicatedWorkerGlobalScope;
+ name: string;
+}
+
+declare var self: WorkerGlobalScope & typeof globalThis;
declare var onmessage:
| ((
- this: DedicatedWorkerGlobalScope & typeof globalThis,
+ this: WorkerGlobalScope & typeof globalThis,
ev: MessageEvent,
) => any)
| null;
declare var onmessageerror:
| ((
- this: DedicatedWorkerGlobalScope & typeof globalThis,
+ this: WorkerGlobalScope & typeof globalThis,
ev: MessageEvent,
) => any)
| null;
declare var onerror:
| ((
- this: DedicatedWorkerGlobalScope & typeof globalThis,
+ this: WorkerGlobalScope & typeof globalThis,
ev: ErrorEvent,
) => any)
| null;