summaryrefslogtreecommitdiff
path: root/js/globals.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-08-15 20:57:36 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-08-20 16:53:39 -0400
commit868e8d88662ad5691212afc733e83f5de1c0979d (patch)
treeb8edff8614255140f1b79f4f563457157a1271f7 /js/globals.ts
parent7b0618c20b5348230304323efd75bc65361bbe1e (diff)
First pass at fetch()
With help from Thomas Ghysels <info@thomasg.be>
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;