2021-01-11 12:13:41 -05:00
|
|
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
2020-01-29 12:54:23 -05:00
|
|
|
|
|
|
|
/// <reference no-default-lib="true" />
|
2020-04-16 17:40:29 -04:00
|
|
|
/// <reference lib="deno.ns" />
|
2020-02-19 00:34:11 -05:00
|
|
|
/// <reference lib="deno.shared_globals" />
|
2020-01-29 12:54:23 -05:00
|
|
|
/// <reference lib="esnext" />
|
|
|
|
|
2020-10-11 18:04:43 -04:00
|
|
|
declare class WorkerGlobalScope {
|
|
|
|
new(): WorkerGlobalScope;
|
|
|
|
self: WorkerGlobalScope & typeof globalThis;
|
2020-10-08 05:43:26 -04:00
|
|
|
onmessage:
|
|
|
|
| ((
|
2020-10-11 18:04:43 -04:00
|
|
|
this: WorkerGlobalScope & typeof globalThis,
|
2020-10-08 05:43:26 -04:00
|
|
|
ev: MessageEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
onmessageerror:
|
|
|
|
| ((
|
2020-10-11 18:04:43 -04:00
|
|
|
this: WorkerGlobalScope & typeof globalThis,
|
2020-10-08 05:43:26 -04:00
|
|
|
ev: MessageEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
onerror:
|
|
|
|
| ((
|
2020-10-11 18:04:43 -04:00
|
|
|
this: WorkerGlobalScope & typeof globalThis,
|
2020-10-08 05:43:26 -04:00
|
|
|
ev: ErrorEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
close: () => void;
|
|
|
|
postMessage: (message: any) => void;
|
2020-04-16 17:40:29 -04:00
|
|
|
Deno: typeof Deno;
|
2020-01-29 12:54:23 -05:00
|
|
|
}
|
|
|
|
|
2020-10-11 18:04:43 -04:00
|
|
|
declare class DedicatedWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
|
new(): DedicatedWorkerGlobalScope;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var self: WorkerGlobalScope & typeof globalThis;
|
2020-10-08 05:43:26 -04:00
|
|
|
declare var onmessage:
|
|
|
|
| ((
|
2020-10-11 18:04:43 -04:00
|
|
|
this: WorkerGlobalScope & typeof globalThis,
|
2020-10-08 05:43:26 -04:00
|
|
|
ev: MessageEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
declare var onmessageerror:
|
|
|
|
| ((
|
2020-10-11 18:04:43 -04:00
|
|
|
this: WorkerGlobalScope & typeof globalThis,
|
2020-10-08 05:43:26 -04:00
|
|
|
ev: MessageEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
2020-09-25 17:23:35 -04:00
|
|
|
declare var onerror:
|
2020-01-29 12:54:23 -05:00
|
|
|
| ((
|
2020-10-11 18:04:43 -04:00
|
|
|
this: WorkerGlobalScope & typeof globalThis,
|
2020-10-08 05:43:26 -04:00
|
|
|
ev: ErrorEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
declare var close: () => void;
|
|
|
|
declare var name: string;
|
|
|
|
declare var postMessage: (message: any) => void;
|