UNPKG

486 BTypeScriptView Raw
1declare const PACKET_TYPES: any;
2declare const PACKET_TYPES_REVERSE: any;
3declare const ERROR_PACKET: Packet;
4export { PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET };
5export type PacketType = "open" | "close" | "ping" | "pong" | "message" | "upgrade" | "noop" | "error";
6export type RawData = any;
7export interface Packet {
8 type: PacketType;
9 options?: {
10 compress: boolean;
11 };
12 data?: RawData;
13}
14export type BinaryType = "nodebuffer" | "arraybuffer" | "blob";