Files
Alexandre f8d0b72ff4 Allow typing Express body, params, query and cookies through generics (#20820)
* Allow typing express body, params, query and cookies through generics

* Increase minor version

* Add ts version comment

* Fix ts requirement comment typo

* Bump all ts version packages

* Bump Morgan package
2017-10-23 17:23:31 -07:00

21 lines
707 B
TypeScript

// Type definitions for express-mongo-sanitize 1.3
// Project: https://github.com/fiznool/express-mongo-sanitize#readme
// Definitions by: Eric Byers <https://github.com/ericbyers>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import express = require('express');
interface MongoSanitizeOptions {
replaceWith: any;
}
declare namespace expressMongoSanitize {
function sanitize<T>(payload: T, options?: MongoSanitizeOptions): T;
function has(payload: any): boolean;
}
declare function expressMongoSanitize(options?: MongoSanitizeOptions): (req: express.Request, res: express.Response, next: express.NextFunction) => void;
export = expressMongoSanitize;