DefinitelyTyped/types/express-flash/express-flash-tests.ts
Ian Mobley 2eaf80dd72 Add basic express-flash definition
express-flash just implements connenct-flash so there is no need to
define anything beside the single RequestHandler function that it
exports.
2018-04-03 13:42:25 -07:00

13 lines
217 B
TypeScript

import express = require('express');
import flash = require('express-flash');
const app = express();
app.use(flash());
app.use((req) => {
req.flash();
req.flash('message');
req.flash('event', 'message');
});