mirror of
https://github.com/denoland/deno.git
synced 2025-02-07 23:06:50 -05:00
Fmt
This commit is contained in:
parent
92e97bca41
commit
3d76dc51b7
1 changed files with 39 additions and 37 deletions
76
text-encoding.d.ts
vendored
76
text-encoding.d.ts
vendored
|
@ -1,53 +1,55 @@
|
||||||
|
|
||||||
// Type definitions for text-encoding
|
// Type definitions for text-encoding
|
||||||
// Project: https://github.com/inexorabletash/text-encoding
|
// Project: https://github.com/inexorabletash/text-encoding
|
||||||
// Definitions by: MIZUNE Pine <https://github.com/pine613>
|
// Definitions by: MIZUNE Pine <https://github.com/pine613>
|
||||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||||
|
|
||||||
declare namespace TextEncoding {
|
declare namespace TextEncoding {
|
||||||
interface TextDecoderOptions {
|
interface TextDecoderOptions {
|
||||||
fatal?: boolean;
|
fatal?: boolean;
|
||||||
ignoreBOM?: boolean;
|
ignoreBOM?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TextDecodeOptions {
|
interface TextDecodeOptions {
|
||||||
stream?: boolean;
|
stream?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TextEncoderOptions {
|
interface TextEncoderOptions {
|
||||||
NONSTANDARD_allowLegacyEncoding?: boolean;
|
NONSTANDARD_allowLegacyEncoding?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TextDecoder {
|
interface TextDecoder {
|
||||||
encoding: string;
|
encoding: string;
|
||||||
fatal: boolean;
|
fatal: boolean;
|
||||||
ignoreBOM: boolean;
|
ignoreBOM: boolean;
|
||||||
decode(input?: ArrayBuffer | ArrayBufferView, options?: TextDecodeOptions): string;
|
decode(
|
||||||
}
|
input?: ArrayBuffer | ArrayBufferView,
|
||||||
|
options?: TextDecodeOptions
|
||||||
|
): string;
|
||||||
|
}
|
||||||
|
|
||||||
interface TextEncoder {
|
interface TextEncoder {
|
||||||
encoding: string;
|
encoding: string;
|
||||||
encode(input?: string, options?: TextEncodeOptions): Uint8Array;
|
encode(input?: string, options?: TextEncodeOptions): Uint8Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TextEncodeOptions {
|
interface TextEncodeOptions {
|
||||||
stream?: boolean;
|
stream?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TextEncoderStatic {
|
interface TextEncoderStatic {
|
||||||
(utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
|
(utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
|
||||||
new (utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
|
new (utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TextDecoderStatic {
|
interface TextDecoderStatic {
|
||||||
(label?: string, options?: TextDecoderOptions): TextDecoder;
|
(label?: string, options?: TextDecoderOptions): TextDecoder;
|
||||||
new (label?: string, options?: TextDecoderOptions): TextDecoder;
|
new (label?: string, options?: TextDecoderOptions): TextDecoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TextEncodingStatic {
|
interface TextEncodingStatic {
|
||||||
TextEncoder: TextEncoderStatic;
|
TextEncoder: TextEncoderStatic;
|
||||||
TextDecoder: TextDecoderStatic;
|
TextDecoder: TextDecoderStatic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Removed following lines to workaround this bug:
|
/* Removed following lines to workaround this bug:
|
||||||
|
@ -63,5 +65,5 @@ declare namespace TextEncoding {
|
||||||
declare var TextEncoding: TextEncoding.TextEncodingStatic;
|
declare var TextEncoding: TextEncoding.TextEncodingStatic;
|
||||||
|
|
||||||
declare module "text-encoding" {
|
declare module "text-encoding" {
|
||||||
export = TextEncoding;
|
export = TextEncoding;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue