Skip to content

Commit a67a6cb

Browse files
authored
Merge pull request #135 from import-ai/feat/types
feat(user): add type constraints
2 parents efa9e96 + cfde561 commit a67a6cb

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/types/express/index.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import 'express';
2+
3+
declare global {
4+
namespace Express {
5+
interface User {
6+
id: string;
7+
email?: string;
8+
username?: string;
9+
createdAt?: Date;
10+
updatedAt?: Date;
11+
deletedAt?: Date;
12+
}
13+
}
14+
}

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
"noImplicitAny": false,
1818
"strictBindCallApply": false,
1919
"noFallthroughCasesInSwitch": false,
20+
"typeRoots": ["./node_modules/@types", "./src/types"],
2021
"paths": {
2122
"omniboxd/*": ["src/*"]
22-
}
23-
}
23+
},
24+
},
25+
"include": ["src/**/*", "src/types/**/*"]
2426
}

0 commit comments

Comments
 (0)