import { Document, Schema } from "mongoose"; import HookErrorCallback from "../interfaces/HookErrorCallback"; export declare type ProtectFuncOptions = { /** * Model attributes you want to make mass assignable */ fillable?: Array; /** * Attributes on which you want to prevent mass assignment */ guarded?: Array; /** * Error callback */ errorCb?: HookErrorCallback; }; /** * Project model from mass assignment * @param schema mongoose schem * @param options options */ export default function protect(schema: Schema, options: ProtectFuncOptions): void;