summaryrefslogtreecommitdiff
path: root/js/globals.ts
diff options
context:
space:
mode:
authorqti3e <me@qti3e.com>2018-09-12 23:46:42 +0430
committerRyan Dahl <ry@tinyclouds.org>2018-09-12 15:16:42 -0400
commit41c70b154f4dd9adf6df875c653bcf8701511ff0 (patch)
treebddea2fdb2478aab9de7e2a3b092b9295e9b1570 /js/globals.ts
parentcb6c78c6d2dbd7298f27d7a0c3ffaa7ca255dca4 (diff)
Add support for fetch() headers (#727)
Diffstat (limited to 'js/globals.ts')
-rw-r--r--js/globals.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/globals.ts b/js/globals.ts
index cd29d34c7..3805f12f5 100644
--- a/js/globals.ts
+++ b/js/globals.ts
@@ -6,6 +6,7 @@ import * as textEncoding from "./text_encoding";
import * as fetch_ from "./fetch";
import { libdeno } from "./libdeno";
import { globalEval } from "./global-eval";
+import { DenoHeaders } from "./fetch";
declare global {
interface Window {
@@ -23,6 +24,8 @@ declare global {
TextEncoder: typeof TextEncoder;
TextDecoder: typeof TextDecoder;
+
+ Headers: typeof Headers;
}
const clearTimeout: typeof timers.clearTimer;
@@ -38,6 +41,7 @@ declare global {
// tslint:disable:variable-name
const TextEncoder: typeof textEncoding.TextEncoder;
const TextDecoder: typeof textEncoding.TextDecoder;
+ const Headers: typeof DenoHeaders;
// tslint:enable:variable-name
}
@@ -57,3 +61,5 @@ window.TextEncoder = textEncoding.TextEncoder;
window.TextDecoder = textEncoding.TextDecoder;
window.fetch = fetch_.fetch;
+
+window.Headers = DenoHeaders;