ntqq
Version:
QQ protocol for NodeJS!
21 lines (20 loc) • 589 B
TypeScript
export interface Encodable {
[tag: number]: any;
}
export declare class Proto implements Encodable {
private encoded;
[tag: number]: any;
get length(): number;
constructor(encoded: Buffer);
toString(encoding?: BufferEncoding): string;
toHex(): string;
toBase64(): string;
toBuffer(): Buffer;
[Symbol.toPrimitive](): string;
toJSON(): {
[k: string]: any;
};
save(prefix?: string, fn?: (pb: Proto) => any): void;
}
export declare function encode(obj: Encodable): Uint8Array;
export declare function decode(encoded: Buffer): Proto;