diff options
Diffstat (limited to 'cli/dts')
-rw-r--r-- | cli/dts/lib.deno.window.d.ts | 3 | ||||
-rw-r--r-- | cli/dts/lib.deno.worker.d.ts | 25 |
2 files changed, 17 insertions, 11 deletions
diff --git a/cli/dts/lib.deno.window.d.ts b/cli/dts/lib.deno.window.d.ts index 5c113cd0d..03341636f 100644 --- a/cli/dts/lib.deno.window.d.ts +++ b/cli/dts/lib.deno.window.d.ts @@ -7,7 +7,8 @@ /// <reference lib="deno.shared_globals" /> /// <reference lib="esnext" /> -declare interface Window extends EventTarget { +declare class Window extends EventTarget { + new(): Window; readonly window: Window & typeof globalThis; readonly self: Window & typeof globalThis; onload: ((this: Window, ev: Event) => any) | null; diff --git a/cli/dts/lib.deno.worker.d.ts b/cli/dts/lib.deno.worker.d.ts index 3fc95a97e..a10b1a276 100644 --- a/cli/dts/lib.deno.worker.d.ts +++ b/cli/dts/lib.deno.worker.d.ts @@ -7,48 +7,53 @@ /// <reference lib="deno.shared_globals" /> /// <reference lib="esnext" /> -declare interface DedicatedWorkerGlobalScope { - self: DedicatedWorkerGlobalScope & typeof globalThis; +declare class WorkerGlobalScope { + new(): WorkerGlobalScope; + self: WorkerGlobalScope & typeof globalThis; onmessage: | (( - this: DedicatedWorkerGlobalScope & typeof globalThis, + this: WorkerGlobalScope & typeof globalThis, ev: MessageEvent, ) => any) | null; onmessageerror: | (( - this: DedicatedWorkerGlobalScope & typeof globalThis, + this: WorkerGlobalScope & typeof globalThis, ev: MessageEvent, ) => any) | null; onerror: | (( - this: DedicatedWorkerGlobalScope & typeof globalThis, + this: WorkerGlobalScope & typeof globalThis, ev: ErrorEvent, ) => any) | null; - name: string; close: () => void; postMessage: (message: any) => void; Deno: typeof Deno; } -declare var self: DedicatedWorkerGlobalScope & typeof globalThis; +declare class DedicatedWorkerGlobalScope extends WorkerGlobalScope { + new(): DedicatedWorkerGlobalScope; + name: string; +} + +declare var self: WorkerGlobalScope & typeof globalThis; declare var onmessage: | (( - this: DedicatedWorkerGlobalScope & typeof globalThis, + this: WorkerGlobalScope & typeof globalThis, ev: MessageEvent, ) => any) | null; declare var onmessageerror: | (( - this: DedicatedWorkerGlobalScope & typeof globalThis, + this: WorkerGlobalScope & typeof globalThis, ev: MessageEvent, ) => any) | null; declare var onerror: | (( - this: DedicatedWorkerGlobalScope & typeof globalThis, + this: WorkerGlobalScope & typeof globalThis, ev: ErrorEvent, ) => any) | null; |