From 22d52a9fddcfaecda97c080c3d842f801211cb1d Mon Sep 17 00:00:00 2001 From: Netto Farah Date: Wed, 4 Dec 2019 12:58:44 -0800 Subject: [PATCH] Fix reference to validator --- index.d.ts | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/index.d.ts b/index.d.ts index 0bf9628..0e6064f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,8 @@ /// declare module 'property-validator' { + import validator from 'validator' + //middleware export function assertMiddleware( err: Error, @@ -201,16 +203,15 @@ declare module 'property-validator' { customMessage?: string ): Validator - //export ValidatorJS options interfaces - export interface IsByteLengthOptions - extends ValidatorJS.IsByteLengthOptions {} - export interface IsCurrencyOptions extends ValidatorJS.IsCurrencyOptions {} - export interface IsEmailOptions extends ValidatorJS.IsEmailOptions {} - export interface IsFQDNOptions extends ValidatorJS.IsFQDNOptions {} - export interface IsFloatOptions extends ValidatorJS.IsFloatOptions {} - export interface IsIntOptions extends ValidatorJS.IsIntOptions {} - export interface IsLengthOptions extends ValidatorJS.IsLengthOptions {} - export interface IsURLOptions extends ValidatorJS.IsURLOptions {} + //export validator options interfaces + export interface IsByteLengthOptions extends validator.IsByteLengthOptions {} + export interface IsCurrencyOptions extends validator.IsCurrencyOptions {} + export interface IsEmailOptions extends validator.IsEmailOptions {} + export interface IsFQDNOptions extends validator.IsFQDNOptions {} + export interface IsFloatOptions extends validator.IsFloatOptions {} + export interface IsIntOptions extends validator.IsIntOptions {} + export interface IsLengthOptions extends validator.IsLengthOptions {} + export interface IsURLOptions extends validator.IsURLOptions {} export interface NormalizeEmailOptions - extends ValidatorJS.NormalizeEmailOptions {} + extends validator.NormalizeEmailOptions {} }