import { mongoose } from "https://deno.land/x/mongoose@6.13.4/types/index.d.ts";
const { Schema } = mongoose;
Defines a pre hook for the model.
Type Parameters
optional
T = HydratedDocument<DocType, TInstanceMethods>Parameters
fn: PreMiddlewareFunction<T>
Type Parameters
optional
T = HydratedDocument<DocType, TInstanceMethods>Parameters
fn: PreSaveMiddlewareFunction<T>
Type Parameters
optional
T = HydratedDocument<DocType, TInstanceMethods>Parameters
fn: PreMiddlewareFunction<T>
Type Parameters
optional
T = HydratedDocument<DocType, TInstanceMethods>Parameters
fn: PreMiddlewareFunction<T>