- pre<S, T>(method, fn, options?): ClassDecorator
Returns ClassDecorator
- pre<S_1, T_1>(method, fn, options?): ClassDecorator
Type Parameters
- S_1 extends never
- T_1 = S_1
Returns ClassDecorator
- pre<S_2, T_2>(method, fn, options?): ClassDecorator
Type Parameters
- S_2 extends never
- T_2 = S_2
Returns ClassDecorator
- pre<S_3, T_3>(method, fn, options?): ClassDecorator
Type Parameters
- S_3 extends never
- T_3 = S_3
Returns ClassDecorator
- pre<S_4, T_4>(method, fn, options?): ClassDecorator
Type Parameters
- S_4 extends unknown
- T_4 = S_4 extends Query<any, any, {}, any, "find">
? S_4<S_4>
: S_4 extends mongoose.Document<any, any, any>
? S_4<S_4>
: IfAny<DocumentType<S_4, BeAnObject>, any, mongoose.Document<unknown, {}, DocumentType<S_4, BeAnObject>> & Require_id<DocumentType<S_4, BeAnObject>>>
Returns ClassDecorator
- pre<S_5, T_5>(method, fn, options?): ClassDecorator
Returns ClassDecorator
- pre<S_6, T_6>(method, fn, options?): ClassDecorator
Returns ClassDecorator
- pre<S_7, T_7>(method, fn, options?): ClassDecorator
Returns ClassDecorator
- pre<S_8, T_8>(method, fn, options?): ClassDecorator
Returns ClassDecorator
- pre<S_9, T_9>(method, fn): ClassDecorator
Type Parameters
- S_9 extends object | Query<any, any, {}, any, "find">
- T_9 = S_9 extends Query<any, any, {}, any, "find">
? S_9<S_9>
: Query<DocumentType<S_9, BeAnObject>, DocumentType<S_9, BeAnObject>, {}, DocumentType<S_9, BeAnObject>, "find">
Returns ClassDecorator
- pre<S_10, T_10>(method, fn, options?): ClassDecorator
Type Parameters
- S_10 extends object | Query<any, any, {}, any, "find">
- T_10 = S_10 extends Query<any, any, {}, any, "find">
? S_10<S_10>
: Query<DocumentType<S_10, BeAnObject>, DocumentType<S_10, BeAnObject>, {}, DocumentType<S_10, BeAnObject>, "find">
Returns ClassDecorator
- pre<S_11, T_11>(method, fn, options?): ClassDecorator
Type Parameters
- S_11 extends object | Query<any, any, {}, any, "find">
- T_11 = S_11 extends Query<any, any, {}, any, "find">
? S_11<S_11>
: Query<DocumentType<S_11, BeAnObject>, DocumentType<S_11, BeAnObject>, {}, DocumentType<S_11, BeAnObject>, "find">
Returns ClassDecorator
- pre<S_12, T_12>(method, fn, options?): ClassDecorator
Type Parameters
- S_12 extends unknown
- T_12 = S_12 extends Query<any, any, {}, any, "find">
? S_12<S_12>
: S_12 extends mongoose.Document<any, any, any>
? S_12<S_12>
: IfAny<DocumentType<S_12, BeAnObject>, any, mongoose.Document<unknown, {}, DocumentType<S_12, BeAnObject>> & Require_id<DocumentType<S_12, BeAnObject>>>
Returns ClassDecorator
- pre<T_13>(method, fn, options?): ClassDecorator
Returns ClassDecorator
- pre<S_13, T_14>(method, fn, options?): ClassDecorator
Type Parameters
- S_13 extends AnyParamConstructor<any> | mongoose.Model<any, {}, {}, {}, any, any>
- T_14 = S_13 extends mongoose.Model<any, {}, {}, {}, any, any>
? S_13<S_13>
: ReturnModelType<S_13, BeAnObject>
Parameters
- method: RegExp | "insertMany"
- fn: ((this, next, docs, options?) => void | Promise<void>)
- (this, next, docs, options?): void | Promise<void>
Parameters
- this: T_14
- next: ((err?) => void)
- (err?): void
Parameters
Optional err: NativeError
Returns void
- docs: any
Optional options: InsertManyOptions & {
lean?: boolean;
}
Returns void | Promise<void>
Optional options: MiddlewareOptions
Returns ClassDecorator