hedgedoc/types/express/index.d.ts
David Mehren cc010ddf2a
Add custom express types
We add a custom User object into the request object. To be able to use
that object in a strongly-typed situation, we need to tell TypeScript
that it exists.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-23 21:45:36 +01:00

13 lines
259 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { User} from '../../src/users/user.entity';
declare module 'express' {
export interface Request {
user?: User;
}
}