mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
workers: minimal error handling and async module loading (#3665)
This commit is contained in:
parent
d720309203
commit
5fa056e53b
12 changed files with 300 additions and 60 deletions
6
cli/js/lib.deno_runtime.d.ts
vendored
6
cli/js/lib.deno_runtime.d.ts
vendored
|
@ -1986,6 +1986,7 @@ declare interface Window {
|
|||
Response: typeof __fetch.Response;
|
||||
performance: __performanceUtil.Performance;
|
||||
onmessage: (e: { data: any }) => void;
|
||||
onerror: undefined | typeof onerror;
|
||||
workerMain: typeof __workers.workerMain;
|
||||
workerClose: typeof __workers.workerClose;
|
||||
postMessage: typeof __workers.postMessage;
|
||||
|
@ -2036,6 +2037,7 @@ declare const Request: __domTypes.RequestConstructor;
|
|||
declare const Response: typeof __fetch.Response;
|
||||
declare const performance: __performanceUtil.Performance;
|
||||
declare let onmessage: (e: { data: any }) => void;
|
||||
declare let onerror: (e: Event) => void;
|
||||
declare const workerMain: typeof __workers.workerMain;
|
||||
declare const workerClose: typeof __workers.workerClose;
|
||||
declare const postMessage: typeof __workers.postMessage;
|
||||
|
@ -3293,7 +3295,7 @@ declare namespace __workers {
|
|||
export function workerClose(): void;
|
||||
export function workerMain(): Promise<void>;
|
||||
export interface Worker {
|
||||
onerror?: () => void;
|
||||
onerror?: (e: Event) => void;
|
||||
onmessage?: (e: { data: any }) => void;
|
||||
onmessageerror?: () => void;
|
||||
postMessage(data: any): void;
|
||||
|
@ -3311,7 +3313,7 @@ declare namespace __workers {
|
|||
private readonly id;
|
||||
private isClosing;
|
||||
private readonly isClosedPromise;
|
||||
onerror?: () => void;
|
||||
onerror?: (e: Event) => void;
|
||||
onmessage?: (data: any) => void;
|
||||
onmessageerror?: () => void;
|
||||
constructor(specifier: string, options?: DenoWorkerOptions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue