summaryrefslogtreecommitdiff
path: root/js/globals.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/globals.ts')
-rw-r--r--js/globals.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/globals.ts b/js/globals.ts
index a6f1b0927..ebfd3d265 100644
--- a/js/globals.ts
+++ b/js/globals.ts
@@ -4,6 +4,7 @@ import { Console } from "./console";
import { RawSourceMap } from "./types";
import * as timers from "./timers";
import { TextEncoder, TextDecoder } from "./text_encoding";
+import * as fetch_ from "./fetch";
declare global {
interface Window {
@@ -18,6 +19,8 @@ declare global {
const console: Console;
const window: Window;
+ const fetch: typeof fetch_.fetch;
+
// tslint:disable:variable-name
let TextEncoder: TextEncoder;
let TextDecoder: TextDecoder;
@@ -58,5 +61,4 @@ window.console = new Console(libdeno.print);
window.TextEncoder = TextEncoder;
window.TextDecoder = TextDecoder;
-// import { fetch } from "./fetch";
-// window["fetch"] = fetch;
+window.fetch = fetch_.fetch;