1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

Make window compatible with ts 3.6 (#2984)

This commit is contained in:
迷渡 2019-09-19 23:40:52 +08:00 committed by Ryan Dahl
parent 5102eec92b
commit 1b1ae65a4a
3 changed files with 3 additions and 4 deletions

View file

@ -10,5 +10,5 @@ declare interface Window {
Deno: typeof Deno;
}
declare const window: Window;
declare const window: Window & typeof globalThis;
[WILDCARD]

View file

@ -14,7 +14,6 @@ test(function windowWindowExists(): void {
});
test(function globalThisEqualsWindow(): void {
// @ts-ignore (TypeScript thinks globalThis and window don't match)
assert(globalThis === window);
});

View file

@ -1217,7 +1217,7 @@ declare namespace Deno {
// @url js/globals.ts
declare interface Window {
window: Window;
window: Window & typeof globalThis;
atob: typeof textEncoding.atob;
btoa: typeof textEncoding.btoa;
fetch: typeof fetchTypes.fetch;
@ -1263,7 +1263,7 @@ declare interface Window {
Deno: typeof Deno;
}
declare const window: Window;
declare const window: Window & typeof globalThis;
declare const atob: typeof textEncoding.atob;
declare const btoa: typeof textEncoding.btoa;
declare const fetch: typeof fetchTypes.fetch;