2020-01-29 12:54:23 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
2020-04-10 14:24:42 -04:00
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
|
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-04-10 14:24:42 -04:00
|
|
|
declare interface DedicatedWorkerGlobalScope {
|
|
|
|
self: DedicatedWorkerGlobalScope & typeof globalThis;
|
2020-10-08 05:43:26 -04:00
|
|
|
onmessage:
|
|
|
|
| ((
|
|
|
|
this: DedicatedWorkerGlobalScope & typeof globalThis,
|
|
|
|
ev: MessageEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
onmessageerror:
|
|
|
|
| ((
|
|
|
|
this: DedicatedWorkerGlobalScope & typeof globalThis,
|
|
|
|
ev: MessageEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
onerror:
|
|
|
|
| ((
|
|
|
|
this: DedicatedWorkerGlobalScope & typeof globalThis,
|
|
|
|
ev: ErrorEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
name: string;
|
|
|
|
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-09-25 17:23:35 -04:00
|
|
|
declare var self: DedicatedWorkerGlobalScope & typeof globalThis;
|
2020-10-08 05:43:26 -04:00
|
|
|
declare var onmessage:
|
|
|
|
| ((
|
|
|
|
this: DedicatedWorkerGlobalScope & typeof globalThis,
|
|
|
|
ev: MessageEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
declare var onmessageerror:
|
|
|
|
| ((
|
|
|
|
this: DedicatedWorkerGlobalScope & typeof globalThis,
|
|
|
|
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-08 05:43:26 -04:00
|
|
|
this: DedicatedWorkerGlobalScope & typeof globalThis,
|
|
|
|
ev: ErrorEvent,
|
|
|
|
) => any)
|
|
|
|
| null;
|
|
|
|
declare var close: () => void;
|
|
|
|
declare var name: string;
|
|
|
|
declare var postMessage: (message: any) => void;
|
2020-01-29 12:54:23 -05:00
|
|
|
|
2020-04-10 14:24:42 -04:00
|
|
|
/* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
|