Skip to content

Commit

Permalink
Remove OnEvent type
Browse files Browse the repository at this point in the history
  • Loading branch information
VickyStash committed Oct 3, 2023
1 parent 1c9a3df commit 1b611f1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libs/PusherUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ type PushJSON = OnyxUpdateEvent[] | OnyxUpdatesFromServer;

type Callback = (data: OnyxUpdate[]) => Promise<void>;

type OnEvent = (pushJSON: PushJSON) => void;

// Keeps track of all the callbacks that need triggered for each event type
const multiEventCallbackMapping: Record<string, Callback> = {};

Expand All @@ -29,7 +27,7 @@ function triggerMultiEventHandler(eventType: string, data: OnyxUpdate[]): Promis
/**
* Abstraction around subscribing to private user channel events. Handles all logs and errors automatically.
*/
function subscribeToPrivateUserChannelEvent(eventName: string, accountID: string, onEvent: OnEvent) {
function subscribeToPrivateUserChannelEvent(eventName: string, accountID: string, onEvent: (pushJSON: PushJSON) => void) {
const pusherChannelName = `${CONST.PUSHER.PRIVATE_USER_CHANNEL_PREFIX}${accountID}${CONFIG.PUSHER.SUFFIX}`;

function logPusherEvent(pushJSON: PushJSON) {
Expand Down

0 comments on commit 1b611f1

Please sign in to comment.