hedgedoc/types/express/index.d.ts
David Mehren f3f0360a95
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-27 16:11:27 +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;
}
}