0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/cli/dts/lib.deno.worker.d.ts

60 lines
1.5 KiB
TypeScript
Raw Normal View History

// 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 */
/// <reference no-default-lib="true" />
/// <reference lib="deno.ns" />
/// <reference lib="deno.shared_globals" />
/// <reference lib="esnext" />
2020-04-10 14:24:42 -04:00
declare interface DedicatedWorkerGlobalScope {
self: DedicatedWorkerGlobalScope & typeof globalThis;
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;
Deno: typeof Deno;
}
declare var self: DedicatedWorkerGlobalScope & typeof globalThis;
declare var onmessage:
| ((
this: DedicatedWorkerGlobalScope & typeof globalThis,
ev: MessageEvent,
) => any)
| null;
declare var onmessageerror:
| ((
this: DedicatedWorkerGlobalScope & typeof globalThis,
ev: MessageEvent,
) => any)
| null;
declare var onerror:
| ((
this: DedicatedWorkerGlobalScope & typeof globalThis,
ev: ErrorEvent,
) => any)
| null;
declare var close: () => void;
declare var name: string;
declare var postMessage: (message: any) => void;
2020-04-10 14:24:42 -04:00
/* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */