commons.d.ts 486 B

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