mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
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.
This commit is contained in:
parent
e8a866ca8a
commit
d632cce129
15 changed files with 735 additions and 393 deletions
10
ext/cache/lib.deno_cache.d.ts
vendored
10
ext/cache/lib.deno_cache.d.ts
vendored
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue