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