mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-28 10:30:31 +00:00
* 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
21 lines
707 B
TypeScript
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;
|