mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
Make window
compatible with ts 3.6 (#2984)
This commit is contained in:
parent
5102eec92b
commit
1b1ae65a4a
3 changed files with 3 additions and 4 deletions
|
@ -10,5 +10,5 @@ declare interface Window {
|
||||||
Deno: typeof Deno;
|
Deno: typeof Deno;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const window: Window;
|
declare const window: Window & typeof globalThis;
|
||||||
[WILDCARD]
|
[WILDCARD]
|
||||||
|
|
|
@ -14,7 +14,6 @@ test(function windowWindowExists(): void {
|
||||||
});
|
});
|
||||||
|
|
||||||
test(function globalThisEqualsWindow(): void {
|
test(function globalThisEqualsWindow(): void {
|
||||||
// @ts-ignore (TypeScript thinks globalThis and window don't match)
|
|
||||||
assert(globalThis === window);
|
assert(globalThis === window);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
4
js/lib.deno_runtime.d.ts
vendored
4
js/lib.deno_runtime.d.ts
vendored
|
@ -1217,7 +1217,7 @@ declare namespace Deno {
|
||||||
// @url js/globals.ts
|
// @url js/globals.ts
|
||||||
|
|
||||||
declare interface Window {
|
declare interface Window {
|
||||||
window: Window;
|
window: Window & typeof globalThis;
|
||||||
atob: typeof textEncoding.atob;
|
atob: typeof textEncoding.atob;
|
||||||
btoa: typeof textEncoding.btoa;
|
btoa: typeof textEncoding.btoa;
|
||||||
fetch: typeof fetchTypes.fetch;
|
fetch: typeof fetchTypes.fetch;
|
||||||
|
@ -1263,7 +1263,7 @@ declare interface Window {
|
||||||
Deno: typeof Deno;
|
Deno: typeof Deno;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const window: Window;
|
declare const window: Window & typeof globalThis;
|
||||||
declare const atob: typeof textEncoding.atob;
|
declare const atob: typeof textEncoding.atob;
|
||||||
declare const btoa: typeof textEncoding.btoa;
|
declare const btoa: typeof textEncoding.btoa;
|
||||||
declare const fetch: typeof fetchTypes.fetch;
|
declare const fetch: typeof fetchTypes.fetch;
|
||||||
|
|
Loading…
Reference in a new issue