diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-18 00:43:53 +0100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2020-01-17 18:43:53 -0500 |
commit | 5fa056e53be6d17ab746629ea0eaa89fe817141b (patch) | |
tree | c32c4ab39577a2dc14da3843e3223395c5a7ea54 /cli/js/lib.deno_runtime.d.ts | |
parent | d7203092039d3c46ca8480ff8eecf612deb2b2f6 (diff) |
workers: minimal error handling and async module loading (#3665)
Diffstat (limited to 'cli/js/lib.deno_runtime.d.ts')
-rw-r--r-- | cli/js/lib.deno_runtime.d.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 8740af062..109c0367d 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -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); |