summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.worker.d.ts
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-10-11 23:04:43 +0100
committerGitHub <noreply@github.com>2020-10-12 09:04:43 +1100
commit5f3028af13c25fb3af8f36d3d5913ef0688e5ce7 (patch)
treed997dc40bb558345fa490eaa04730c629c5275f8 /cli/dts/lib.deno.worker.d.ts
parent265a9fb9323a11067b4b826acc7624f2e62f1102 (diff)
fix(cli/rt/main): Add global interface objects (#7875)
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;