Skip to content

Commit 3a59fe7

Browse files
committed
defined unsubscribe room socket listener type
1 parent 3f0d7c3 commit 3a59fe7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/utils/emitTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ export const RECEIVE_READ_TOKEN = "receive_read_token";
1717
export const CREATE_NEW_ROOM = "create_new_room";
1818
export const CONNECT_ERROR = "connect_error";
1919
export const LEAVE_ROOM = "leave_room";
20+
export const UNSUBSCRIBE_ROOM = "unsubscribe_room";

src/utils/socket.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ interface ServerToClientEvents {
4141
[types.RECEIVE_READ_TOKEN]: (data: ReadTokenProps) => void;
4242
[types.JOIN_NEW_ROOM]: (data: { room: RoomProps }) => void;
4343
[types.CONNECT_ERROR]: (err: Error) => void;
44+
[types.UNSUBSCRIBE_ROOM]: (chatRoomAuthId: string) => void;
4445
}
4546

4647
interface ClientToServerEvents {

0 commit comments

Comments
 (0)