Content-Length: 313436 | pFad | http://github.com/nodejs/node/pull/61368/files

7E typings: add typing for string_decoder by kimtaejin3 · Pull Request #61368 · nodejs/node · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions typings/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { OSBinding } from './internalBinding/os';
import { ProcessBinding } from './internalBinding/process';
import { SeaBinding } from './internalBinding/sea';
import { SerdesBinding } from './internalBinding/serdes';
import { StringDecoderBinding } from './internalBinding/string_decoder';
import { SymbolsBinding } from './internalBinding/symbols';
import { TimersBinding } from './internalBinding/timers';
import { TypesBinding } from './internalBinding/types';
Expand Down Expand Up @@ -52,6 +53,7 @@ interface InternalBindingMap {
process: ProcessBinding;
sea: SeaBinding;
serdes: SerdesBinding;
string_decoder: StringDecoderBinding;
symbols: SymbolsBinding;
timers: TimersBinding;
types: TypesBinding;
Expand Down
19 changes: 19 additions & 0 deletions typings/internalBinding/string_decoder.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
declare namespace InternalStringDecoderBinding {
type Buffer = Uint8Array;
}

export interface StringDecoderBinding {
readonly kIncompleteCharactersStart: number;
readonly kIncompleteCharactersEnd: number;
readonly kMissingBytes: number;
readonly kBufferedBytes: number;
readonly kEncodingField: number;
readonly kNumFields: number;
readonly kSize: number;

readonly encodings: string[];

decode(decoder: InternalStringDecoderBinding.Buffer, buffer: ArrayBufferView): string;
flush(decoder: InternalStringDecoderBinding.Buffer): string;
}

Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/nodejs/node/pull/61368/files

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy