UNPKG

462 BTypeScriptView Raw
1import type { Func } from './types';
2/**
3 * Add a mongoose Middleware-Plugin
4 * @param mongoosePlugin The Plugin to plug-in
5 * @param options Options for the Plugin, if any
6 * @example Example:
7 * ```ts
8 * @plugin(pluginFunctionHere, { optionsHere: true })
9 * class ClassName {}
10 * ```
11 */
12export declare function plugin<TFunc extends Func, TParams = Parameters<TFunc>[1]>(mongoosePlugin: TFunc, options?: TParams): ClassDecorator;
13export { plugin as Plugins };