irctokens
Version:
RFC1459 and IRCv3 protocol tokeniser
18 lines (17 loc) • 534 B
TypeScript
import type { TextEncodingLabel } from '.';
import type { Line } from './line';
export declare class StatefulDecoder {
#private;
constructor(encoding?: TextEncodingLabel, fallback?: TextEncodingLabel);
clear(): void;
pending(): Uint8Array<ArrayBufferLike>;
push(data: Uint8Array): Line[] | undefined;
}
export declare class StatefulEncoder {
#private;
constructor();
clear(): void;
pending(): Uint8Array<ArrayBuffer>;
push(line: Line): void;
pop(byteCount: number): (Line | undefined)[];
}