Function plugin

  • Add a mongoose Middleware-Plugin

    Type Parameters

    • TFunc extends Func
    • TParams = Parameters<TFunc>[1]

    Parameters

    • mongoosePlugin: TFunc

      The Plugin to plug-in

    • Optional options: TParams

      Options for the Plugin, if any

    Returns ClassDecorator

    Example: Example:

    @plugin(pluginFunctionHere, { optionsHere: true })
    class ClassName {}