From 41c70b154f4dd9adf6df875c653bcf8701511ff0 Mon Sep 17 00:00:00 2001 From: qti3e Date: Wed, 12 Sep 2018 23:46:42 +0430 Subject: Add support for fetch() headers (#727) --- js/globals.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/globals.ts') 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; -- cgit v1.2.3