Skip to content

Commit

Permalink
lib/node: Add util.TextDecoder/TextEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
cakoose committed May 10, 2019
1 parent a942fb6 commit 804c6cc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,25 @@ declare module "util" {
declare function deprecate(f: Function, string: string): Function;
declare function promisify(f: Function): Function;
declare function callbackify(f: Function): Function;

declare class TextDecoder {
constructor(encoding?: string, options: {
fatal?: boolean,
ignoreBOM?: boolean,
});
decode(input?: ArrayBuffer | DataView | $TypedArray, options?: {
stream?: boolean,
}): string;
encoding: string;
fatal: boolean;
ignoreBOM: boolean;
}

declare class TextEncoder {
constructor();
encode(input?: string): Uint8Array;
encoding: string;
}
}

type vm$ScriptOptions = {
Expand Down

0 comments on commit 804c6cc

Please sign in to comment.