mirror of
https://github.com/directus/directus.git
synced 2026-01-29 21:17:59 -05:00
Fix express type extending
This commit is contained in:
18
src/types/express.d.ts
vendored
18
src/types/express.d.ts
vendored
@@ -2,12 +2,16 @@
|
||||
* Custom properties on the req object in express
|
||||
*/
|
||||
|
||||
declare namespace Express {
|
||||
export interface Request {
|
||||
token?: string;
|
||||
user?: string;
|
||||
role?: string;
|
||||
collection?: string;
|
||||
loaders?: any;
|
||||
import createSystemLoaders from '../loaders';
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
export interface Request {
|
||||
token?: string;
|
||||
user?: string;
|
||||
role?: string;
|
||||
collection?: string;
|
||||
loaders?: ReturnType<typeof createSystemLoaders>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user