This commit is contained in:
2026-02-16 22:03:40 +03:00
commit d632bf0f40
16 changed files with 772 additions and 0 deletions

25
src/types/types.ts Normal file
View 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