Skip to content

@pinia/root / pinia / PiniaPlugin

PiniaPlugin()

Plugin to extend every store.

ts
PiniaPlugin(context): 
  | void
| Partial<PiniaCustomProperties<string, StateTree, _GettersTree<StateTree>, _ActionsTree> & PiniaCustomStateProperties<StateTree>>;

Plugin to extend every store. Returns an object to extend the store or nothing.

Parameters

context

PiniaPluginContext

Context

Returns

| void | Partial<PiniaCustomProperties<string, StateTree, _GettersTree<StateTree>, _ActionsTree> & PiniaCustomStateProperties<StateTree>>

Released under the MIT License.