Skip to content

Commit

Permalink
Merge pull request #75 from NGTOne/missing-ajv-from-validator
Browse files Browse the repository at this point in the history
Added missing type annotation for Ajv to Validator class
  • Loading branch information
simonplend authored Feb 9, 2021
2 parents 57f0d57 + a1cc6e6 commit f055837
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RequestHandler } from "express-serve-static-core";
import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
import { ErrorObject, Options as AjvOptions } from "ajv";
import { Ajv, ErrorObject, Options as AjvOptions } from "ajv";

declare module "express-json-validator-middleware" {
type OptionKey = "body" | "params" | "query";
Expand All @@ -18,6 +18,8 @@ declare module "express-json-validator-middleware" {
export class Validator {
constructor(options: AjvOptions);

ajv: Ajv;

validate(rules: List<ValidateFunction>): RequestHandler;
}

Expand Down

0 comments on commit f055837

Please sign in to comment.