diff options
Diffstat (limited to 'extensions/web/lib.deno_web.d.ts')
-rw-r--r-- | extensions/web/lib.deno_web.d.ts | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/extensions/web/lib.deno_web.d.ts b/extensions/web/lib.deno_web.d.ts index e91534567..0c3673351 100644 --- a/extensions/web/lib.deno_web.d.ts +++ b/extensions/web/lib.deno_web.d.ts @@ -195,8 +195,8 @@ declare class TextDecoder { readonly fatal: boolean; /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ readonly ignoreBOM = false; - /** Returns the result of running encoding's decoder. */ + /** Returns the result of running encoding's decoder. */ decode(input?: BufferSource, options?: TextDecodeOptions): string; } @@ -207,12 +207,33 @@ declare interface TextEncoderEncodeIntoResult { declare class TextEncoder { /** Returns "utf-8". */ - readonly encoding = "utf-8"; + readonly encoding: "utf-8"; /** Returns the result of running UTF-8's encoder. */ encode(input?: string): Uint8Array; encodeInto(input: string, dest: Uint8Array): TextEncoderEncodeIntoResult; } +declare class TextDecoderStream { + /** Returns encoding's name, lowercased. */ + readonly encoding: string; + /** Returns `true` if error mode is "fatal", and `false` otherwise. */ + readonly fatal: boolean; + /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ + readonly ignoreBOM = false; + constructor(label?: string, options?: TextDecoderOptions); + readonly readable: ReadableStream<string>; + readonly writable: WritableStream<BufferSource>; + readonly [Symbol.toStringTag]: string; +} + +declare class TextEncoderStream { + /** Returns "utf-8". */ + readonly encoding: "utf-8"; + readonly readable: ReadableStream<Uint8Array>; + readonly writable: WritableStream<string>; + readonly [Symbol.toStringTag]: string; +} + /** A controller object that allows you to abort one or more DOM requests as and * when desired. */ declare class AbortController { |