UNPKG

763 BTypeScriptView Raw
1/// <reference types="node" />
2import { EventEmitter } from 'events';
3import { Packet } from './packet';
4declare class Debug extends EventEmitter {
5 options: {
6 data: boolean;
7 payload: boolean;
8 packet: boolean;
9 token: boolean;
10 };
11 indent: string;
12 constructor({ data, payload, packet, token }?: {
13 data?: boolean | undefined;
14 payload?: boolean | undefined;
15 packet?: boolean | undefined;
16 token?: boolean | undefined;
17 });
18 packet(direction: 'Received' | 'Sent', packet: Packet): void;
19 data(packet: Packet): void;
20 payload(generatePayloadText: () => string): void;
21 token(token: any): void;
22 haveListeners(): boolean;
23 log(text: string): void;
24}
25export default Debug;