mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-01-12 22:46:38 +08:00
Updated index.d.ts to match text-encoding npm module (#29404)
This commit is contained in:
committed by
Wesley Wigham
parent
00e1cc7c32
commit
0b0f2e82aa
10
types/text-encoding/index.d.ts
vendored
10
types/text-encoding/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user