Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.8/mongoose/types/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.8/mongoose/types/validation.d.ts

declare module 'mongoose' {

  type SchemaValidator<T> = RegExp | [RegExp, string] | Function | [Function, string] | ValidateOpts<T> | ValidateOpts<T>[];

  interface ValidatorProps {
    path: string;
    fullPath: string;
    value: any;
  }

  interface ValidatorMessageFn {
    (props: ValidatorProps): string;
  }

  interface ValidateFn<T> {
    (value: T, props?: ValidatorProps & Record<string, any>): boolean;
  }

  interface LegacyAsyncValidateFn<T> {
    (value: T, done: (result: boolean) => void): void;
  }

  interface AsyncValidateFn<T> {
    (value: T, props?: ValidatorProps & Record<string, any>): Promise<boolean>;
  }

  interface ValidateOpts<T> {
    msg?: string;
    message?: string | ValidatorMessageFn;
    type?: string;
    validator: ValidateFn<T> | LegacyAsyncValidateFn<T> | AsyncValidateFn<T>;
    propsParameter?: boolean;
  }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists