diff options
Diffstat (limited to 'backend/src/types')
| -rw-r--r-- | backend/src/types/express.d.ts | 6 | ||||
| -rw-r--r-- | backend/src/types/request.ts | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/backend/src/types/express.d.ts b/backend/src/types/express.d.ts index 7ac6ca0..266a9f9 100644 --- a/backend/src/types/express.d.ts +++ b/backend/src/types/express.d.ts @@ -1,7 +1,12 @@ import type { AuthorizedUser } from "./user.js"; +import { Server } from "socket.io"; declare global { namespace Express { + interface Application { + io: Server; + } + interface Request { user?: AuthorizedUser; } @@ -9,3 +14,4 @@ declare global { } export {}; + diff --git a/backend/src/types/request.ts b/backend/src/types/request.ts index ef80738..6524b16 100644 --- a/backend/src/types/request.ts +++ b/backend/src/types/request.ts @@ -1,4 +1,9 @@ +export type CreateRequest = { + name: string; +}; + export type LoginRequest = { email: string; password: string; }; + |
