Skip to content

Commit

Permalink
Remove redundant globals code
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Oct 2, 2018
1 parent b712f6a commit 0bbeb37
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions js/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,9 @@ import { libdeno } from "./libdeno";
import * as textEncoding from "./text_encoding";
import * as timers from "./timers";

declare global {
interface Window {
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;
atob: typeof atob;
btoa: typeof btoa;

Headers: typeof Headers;
Blob: typeof Blob;
}

const clearTimeout: typeof timers.clearTimer;
const clearInterval: typeof timers.clearTimer;
const setTimeout: typeof timers.setTimeout;
const setInterval: typeof timers.setInterval;

const console: console.Console;
const window: Window;

const fetch: typeof fetch_.fetch;

// tslint:disable:variable-name
const TextEncoder: typeof textEncoding.TextEncoder;
const TextDecoder: typeof textEncoding.TextDecoder;
const atob: typeof textEncoding.atob;
const btoa: typeof textEncoding.btoa;
const Headers: typeof fetch_.DenoHeaders;
const Blob: typeof blob.DenoBlob;
// tslint:enable:variable-name
}
// During the build process, augmentations to the variable `window` in this
// file are tracked and created as part of default library that is built into
// deno.

// A reference to the global object.
export const window = globalEval("this");
Expand Down

0 comments on commit 0bbeb37

Please sign in to comment.