diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-01-21 01:30:30 +1100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2020-01-20 09:30:30 -0500 |
commit | 60b53fd6b6dc2af83a64c332b9f3a1926f43d631 (patch) | |
tree | 4f4ef1aadb8c79ef2319d728b9d5b132af40ef83 /cli/js/lib.deno_runtime.d.ts | |
parent | 23e67eb5153bd26dbae471b27dc6a21a6d283b0b (diff) |
Use globalThis to reference global scope (#3719)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/js/lib.deno_runtime.d.ts')
-rw-r--r-- | cli/js/lib.deno_runtime.d.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 6e3e2384a..95c22305b 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -2200,8 +2200,16 @@ declare const TextDecoder: typeof __textEncoding.TextDecoder; 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 let onmessage: ((e: { data: any }) => Promise<void> | void) | undefined; +declare let onerror: + | (( + msg: string, + source: string, + lineno: number, + colno: number, + e: Event + ) => boolean | void) + | undefined; declare const workerMain: typeof __workers.workerMain; declare const workerClose: typeof __workers.workerClose; declare const postMessage: typeof __workers.postMessage; |