1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2025-11-10 00:37:34 +00:00

Simplify augmented module for express-flash

There is existing @types definition for express-flash. Let's use it and
just augment a method required by the existing code to please compiler.

Thanks!
This commit is contained in:
Peter Blazejewicz
2019-07-05 23:29:10 +02:00
parent 0a30661223
commit 4b0df406a4
3 changed files with 27 additions and 3 deletions

View File

@@ -1,9 +1,13 @@
/// <reference types="express" />
// Add RequestValidation Interface on to Express's Request Interface.
/**
* This type definition augments existing definition
* from @types/express-flash
*/
declare namespace Express {
interface Request extends Flash {}
export interface Request {
flash(event: string, message: any): any;
}
}
interface Flash {