Updated index.d.ts to match text-encoding npm module (#29404)

This commit is contained in:
Thomas Nicollet
2018-10-04 02:06:07 +02:00
committed by Wesley Wigham
parent 00e1cc7c32
commit 0b0f2e82aa

View File

@@ -2,6 +2,7 @@
// Project: https://github.com/inexorabletash/text-encoding
// Definitions by: MIZUNE Pine <https://github.com/pine613>
// Mohsen Azimi <https://github.com/mohsen1>
// Thomas Nicollet <https://github.com/nwmqpa>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -31,11 +32,20 @@ interface TextEncodeOptions {
stream?: boolean;
}
interface TextDecoderOptions {
stream?: boolean;
}
interface TextEncoder {
readonly encoding: string;
encode(input?: string, options?: TextEncodeOptions): Uint8Array;
}
interface TextDecoder {
readonly encoding: string;
decode(input?: Uint8Array, options?: TextDecoderOptions): string;
}
declare module "text-encoding" {
export = TextEncoding;
}