init
This commit is contained in:
25
src/types/types.ts
Normal file
25
src/types/types.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface WebSocketData {
|
||||
chatId?: string
|
||||
token?: string
|
||||
userId?: number
|
||||
}
|
||||
|
||||
export type LoginDto = { email: string }
|
||||
|
||||
interface ChatData {
|
||||
type: 'chat'
|
||||
id: string
|
||||
}
|
||||
|
||||
interface UserData {
|
||||
type: 'user'
|
||||
id: number
|
||||
}
|
||||
|
||||
interface MessageData {
|
||||
type: 'message'
|
||||
id: number
|
||||
text: string
|
||||
}
|
||||
|
||||
type WsData = ChatData | UserData | MessageData
|
||||
Reference in New Issue
Block a user