From d632cce129cb7025a34cf0aa7262a38fb12f47c4 Mon Sep 17 00:00:00 2001 From: ud2 Date: Tue, 4 Jul 2023 02:36:55 +0800 Subject: fix(dts): make globals available on globalThis (#19438) This PR changes Web IDL interfaces to be declared with `var` instead of `class`, so that accessing them via `globalThis` does not raise type errors. Closes #13390. --- ext/webstorage/lib.deno_webstorage.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/webstorage/lib.deno_webstorage.d.ts') diff --git a/ext/webstorage/lib.deno_webstorage.d.ts b/ext/webstorage/lib.deno_webstorage.d.ts index d591cdcfa..781b3ffb4 100644 --- a/ext/webstorage/lib.deno_webstorage.d.ts +++ b/ext/webstorage/lib.deno_webstorage.d.ts @@ -11,7 +11,7 @@ * * @category Web Storage API */ -interface Storage { +declare interface Storage { /** * Returns the number of key/value pairs currently present in the list associated with the object. */ @@ -43,6 +43,6 @@ interface Storage { /** @category Web Storage API */ declare var Storage: { - prototype: Storage; - new (): Storage; + readonly prototype: Storage; + new (): never; }; -- cgit v1.2.3