Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
25 lines
669 B
Plaintext
25 lines
669 B
Plaintext
/// <reference types="node" />
|
|
/// <reference types="node" />
|
|
import { TransformOptions } from 'stream';
|
|
import { Mode, BackendMessage } from './messages';
|
|
export declare type Packet = {
|
|
code: number;
|
|
packet: Buffer;
|
|
};
|
|
declare type StreamOptions = TransformOptions & {
|
|
mode: Mode;
|
|
};
|
|
export declare type MessageCallback = (msg: BackendMessage) => void;
|
|
export declare class Parser {
|
|
private buffer;
|
|
private bufferLength;
|
|
private bufferOffset;
|
|
private reader;
|
|
private mode;
|
|
constructor(opts?: StreamOptions);
|
|
parse(buffer: Buffer, callback: MessageCallback): void;
|
|
private mergeBuffer;
|
|
private handlePacket;
|
|
}
|
|
export {};
|