Skip to content

MongoosePreHook

@tsed/mongoose

Usage

typescript
import { MongoosePreHook } from "@tsed/mongoose";

See /packages/orm/mongoose/src/types/interfaces/MongooseSchemaOptions.ts.

Overview

ts
interface MongoosePreHook<T = any> {
    method: string | RegExp;
    fn: MongoosePreHookCB<T>;
    options?: MongooseHookOptions;
}

method

ts
method: string | RegExp;

fn

ts
fn: MongoosePreHookCB<T>;

options

ts
options?: MongooseHookOptions;

Released under the MIT License.