summaryrefslogtreecommitdiff
path: root/js/globals.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-10-23 22:43:43 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-10-23 04:43:43 -0700
commitc0492ef061afd5af2044d5952432d223615841a7 (patch)
treef7c0c30e4fd25868b4d3f8e1913d04a655cebc2a /js/globals.ts
parentde85f9443598ba5a75102be77f6f27a5cf0c0a9a (diff)
Make Headers more idiomatic (#1062)
Diffstat (limited to 'js/globals.ts')
-rw-r--r--js/globals.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/globals.ts b/js/globals.ts
index 401819ac6..d29d3b3da 100644
--- a/js/globals.ts
+++ b/js/globals.ts
@@ -7,6 +7,7 @@ import { libdeno } from "./libdeno";
import * as textEncoding from "./text_encoding";
import * as timers from "./timers";
import * as urlSearchParams from "./url_search_params";
+import * as domTypes from "./dom_types";
// During the build process, augmentations to the variable `window` in this
// file are tracked and created as part of default library that is built into
@@ -38,5 +39,7 @@ window.URLSearchParams = urlSearchParams.URLSearchParams;
window.fetch = fetch_.fetch;
-window.Headers = fetch_.DenoHeaders;
+// using the `as` keyword to mask the internal types when generating the
+// runtime library
+window.Headers = fetch_.Headers as domTypes.HeadersConstructor;
window.Blob = blob.DenoBlob;