summaryrefslogtreecommitdiff
path: root/js/globals.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-12-07 05:01:15 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-12-06 10:01:15 -0800
commit6cc89b9e272440d93b6354f098031c3a22803686 (patch)
tree4589fb19088386f049ed8c6f488386772dd27684 /js/globals.ts
parent60c008d23b2bdad333711b43148a5053e83a62cc (diff)
Use alternate TextEncoder/TextDecoder implementation (#1281)
This is faster and smaller.
Diffstat (limited to 'js/globals.ts')
-rw-r--r--js/globals.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/js/globals.ts b/js/globals.ts
index 6f29d97d4..cf45b4239 100644
--- a/js/globals.ts
+++ b/js/globals.ts
@@ -29,8 +29,6 @@ import { libdeno } from "./libdeno";
declare global {
const console: consoleTypes.Console;
const setTimeout: typeof timers.setTimeout;
- // tslint:disable-next-line:variable-name
- const TextEncoder: typeof textEncoding.TextEncoder;
}
// A reference to the global object.
@@ -69,7 +67,7 @@ export type Headers = domTypes.Headers;
window.FormData = formData.FormData as domTypes.FormDataConstructor;
export type FormData = domTypes.FormData;
-// While these are classes, they have their global instance types created in
-// other type definitions, therefore we do not have to include them here.
window.TextEncoder = textEncoding.TextEncoder;
+export type TextEncoder = textEncoding.TextEncoder;
window.TextDecoder = textEncoding.TextDecoder;
+export type TextDecoder = textEncoding.TextDecoder;