mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
Use alternate TextEncoder/TextDecoder implementation (#1281)
This is faster and smaller.
This commit is contained in:
parent
60c008d23b
commit
6cc89b9e27
9 changed files with 366 additions and 42 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue