Skip to content

Commit 3f0d7c3

Browse files
committed
defined leave room emit type
1 parent fe3cb9b commit 3f0d7c3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/utils/emitTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ export const SEND_READ_TOKEN = "send_read_token";
1616
export const RECEIVE_READ_TOKEN = "receive_read_token";
1717
export const CREATE_NEW_ROOM = "create_new_room";
1818
export const CONNECT_ERROR = "connect_error";
19+
export const LEAVE_ROOM = "leave_room";

src/utils/socket.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ interface ClientToServerEvents {
6262
data: CreateRoomProps,
6363
callback: ({ room }: { room: RoomProps }) => void,
6464
) => void;
65+
66+
[types.LEAVE_ROOM]: (
67+
chatRoomAuthId: string,
68+
callback: ({ status }: { status: string }) => void,
69+
) => void;
6570
}
6671

6772
interface ConnectProps {

0 commit comments

Comments
 (0)