commons.d.ts 592 B

123456789101112131415
  1. /// <reference types="node" />
  2. declare const PACKET_TYPES: any;
  3. declare const PACKET_TYPES_REVERSE: any;
  4. declare const ERROR_PACKET: Packet;
  5. export { PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET };
  6. export declare type PacketType = "open" | "close" | "ping" | "pong" | "message" | "upgrade" | "noop" | "error";
  7. export declare type RawData = string | Buffer | ArrayBuffer | ArrayBufferView | Blob;
  8. export interface Packet {
  9. type: PacketType;
  10. options?: {
  11. compress: boolean;
  12. };
  13. data?: RawData;
  14. }
  15. export declare type BinaryType = "nodebuffer" | "arraybuffer" | "blob";