Type Alias IPluginObject<TInstance>

IPluginObject: IInvokableObject<[instance: TInstance, enhance: Enhance], void>

An object-based plugin that receives the target instance and an Enhance utility.

This is the object-oriented counterpart to PluginFn. Implement the invoke method to define the plugin's behavior. Object-based plugins are useful when the plugin needs to carry its own state, configuration, or dependencies.

Type Parameters

  • TInstance

    The type of the target instance being configured

The target instance to configure

The Enhance utility for wrapping methods with middleware

IMPORT_PATH: @daiso-tech/core/middleware