diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-08-15 20:57:36 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-08-20 16:53:39 -0400 |
commit | 868e8d88662ad5691212afc733e83f5de1c0979d (patch) | |
tree | b8edff8614255140f1b79f4f563457157a1271f7 /js/globals.ts | |
parent | 7b0618c20b5348230304323efd75bc65361bbe1e (diff) |
First pass at fetch()
With help from Thomas Ghysels <info@thomasg.be>
Diffstat (limited to 'js/globals.ts')
-rw-r--r-- | js/globals.ts | 6 |
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; |