summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno_runtime.d.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-01-21 01:30:30 +1100
committerRy Dahl <ry@tinyclouds.org>2020-01-20 09:30:30 -0500
commit60b53fd6b6dc2af83a64c332b9f3a1926f43d631 (patch)
tree4f4ef1aadb8c79ef2319d728b9d5b132af40ef83 /cli/js/lib.deno_runtime.d.ts
parent23e67eb5153bd26dbae471b27dc6a21a6d283b0b (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.ts12
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;