27 lines
561 B
TypeScript
27 lines
561 B
TypeScript
// types/express.d.ts
|
|
// Copyright (C) 2026 Robert Colbert <rob.colbert@openplatform.us>
|
|
// All Rights Reserved
|
|
|
|
import { IUser } from "../src/models/user.js";
|
|
|
|
declare global {
|
|
namespace Express {
|
|
interface Locals {
|
|
user?: IUser | null;
|
|
// define custom locals properties here
|
|
}
|
|
|
|
interface Request {
|
|
rawBody?: string;
|
|
user?: IUser | null;
|
|
// define custom request properties here
|
|
}
|
|
|
|
// req.params
|
|
interface ParamsDictionary {
|
|
[key: string]: unknown;
|
|
// add custom parameters here
|
|
}
|
|
}
|
|
}
|