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/cache/lib.deno_cache.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/cache') diff --git a/ext/cache/lib.deno_cache.d.ts b/ext/cache/lib.deno_cache.d.ts index 0834d7f20..ca0218bf5 100644 --- a/ext/cache/lib.deno_cache.d.ts +++ b/ext/cache/lib.deno_cache.d.ts @@ -54,18 +54,18 @@ declare interface Cache { /** @category Cache API */ declare var Cache: { - prototype: Cache; - new (name: string): Cache; + readonly prototype: Cache; + new (): never; }; /** @category Cache API */ declare var CacheStorage: { - prototype: CacheStorage; - new (): CacheStorage; + readonly prototype: CacheStorage; + new (): never; }; /** @category Cache API */ -interface CacheQueryOptions { +declare interface CacheQueryOptions { ignoreMethod?: boolean; ignoreSearch?: boolean; ignoreVary?: boolean; -- cgit v1.2.3