Skip to content

Commit

Permalink
Fix for TypeScript Typings
Browse files Browse the repository at this point in the history
Without this fix users of TypeScript (at least 2.3.4) unable to import
the library using standard “import” syntax without either a) removing
the typings or b) using “require”.
  • Loading branch information
taicho committed Jun 11, 2017
1 parent 2a622ff commit e237063
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@
declare namespace Express {
interface Request extends ExpressValidator.RequestValidation {}
}

// External express-validator module.
declare module "express-validator" {
import express = require('express');

/**
* @param options see: https://github.com/ctavan/express-validator#middleware-options
* @constructor
*/
function ExpressValidator(options?: ExpressValidator.Options.ExpressValidatorOptions): express.RequestHandler;
declare function ExpressValidator(options?: ExpressValidator.Options.ExpressValidatorOptions): express.RequestHandler;

export = ExpressValidator;
}

// Internal Module.
declare namespace ExpressValidator {
Expand Down

0 comments on commit e237063

Please sign in to comment.