Skip to content

Commit

Permalink
Codacy warnings fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitpubnub committed Feb 14, 2024
1 parent f1e266d commit 6739d5c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/entities/commonTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export type SubscriptionOptions = {
};

export type EventEmitter = {
emitEvent(e: any): void;
addListener(l: any, channels: any, groups: any): void;
removeListener(listener: any, channels: any, groups: any): void;
emitEvent(e: Event): void;
addListener(l: Listener, channels?: string[], groups?: string[]): void;
removeListener(listener: Listener, channels?: string[], groups?: string[]): void;
removeAllListeners(): void;
};

Expand All @@ -28,3 +28,11 @@ export type Listener = {
file?(f: PubNub.FileEvent): void;
status?(s: PubNub.StatusEvent): void;
};

type Event =
| PubNub.MessageEvent
| PubNub.PresenceEvent
| PubNub.SignalEvent
| PubNub.ObjectsEvent
| PubNub.MessageActionEvent
| PubNub.FileEvent;

0 comments on commit 6739d5c

Please sign in to comment.