From a8e4fc15e516299e9bfc466ae3b2711b6ce2fcd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 18 Jun 2021 21:34:51 +0200 Subject: fix: Worker accepts specifier as URL (#11038) This commit updates type declarations for Worker to accept specifiers as either strings or URL, bringing it in line with TypeScript declarations and browser behavior. --- cli/dts/lib.deno.shared_globals.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/dts/lib.deno.shared_globals.d.ts') diff --git a/cli/dts/lib.deno.shared_globals.d.ts b/cli/dts/lib.deno.shared_globals.d.ts index 9537f8cd8..d46a43e67 100644 --- a/cli/dts/lib.deno.shared_globals.d.ts +++ b/cli/dts/lib.deno.shared_globals.d.ts @@ -405,7 +405,7 @@ declare class Worker extends EventTarget { onmessage?: (e: MessageEvent) => void; onmessageerror?: (e: MessageEvent) => void; constructor( - specifier: string, + specifier: string | URL, options?: WorkerOptions, ); postMessage(message: any, transfer: ArrayBuffer[]): void; -- cgit v1.2.3