mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
Improve global types
This commit is contained in:
parent
05f87a0cf2
commit
806385543c
1 changed files with 15 additions and 3 deletions
|
@ -9,8 +9,20 @@ import { globalEval } from "./global-eval";
|
|||
|
||||
declare global {
|
||||
interface Window {
|
||||
console: Console;
|
||||
define: Readonly<unknown>;
|
||||
|
||||
clearTimeout: typeof clearTimeout;
|
||||
clearInterval: typeof clearInterval;
|
||||
setTimeout: typeof setTimeout;
|
||||
setInterval: typeof setInterval;
|
||||
|
||||
console: typeof console;
|
||||
window: typeof window;
|
||||
|
||||
fetch: typeof fetch;
|
||||
|
||||
TextEncoder: typeof TextEncoder;
|
||||
TextDecoder: typeof TextDecoder;
|
||||
}
|
||||
|
||||
const clearTimeout: typeof timers.clearTimer;
|
||||
|
@ -24,8 +36,8 @@ declare global {
|
|||
const fetch: typeof fetch_.fetch;
|
||||
|
||||
// tslint:disable:variable-name
|
||||
let TextEncoder: typeof textEncoding.TextEncoder;
|
||||
let TextDecoder: typeof textEncoding.TextDecoder;
|
||||
const TextEncoder: typeof textEncoding.TextEncoder;
|
||||
const TextDecoder: typeof textEncoding.TextDecoder;
|
||||
// tslint:enable:variable-name
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue