import { Schema, Document } from "mongoose"; import HookErrorCallback from "../interfaces/HookErrorCallback"; export declare type RequiredIfDefinitionType = { message?: string; validator: (instance: T) => Promise | boolean; }; export declare type RequiredIfFuncOptions = { /** * Error callback */ errorCb?: HookErrorCallback; }; /** * Project model from mass assignment * @param schema mongoose schem * @param options options */ export default function RequiredIf(schema: Schema, options: RequiredIfFuncOptions): Promise;