--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../../index.md) / [@pinia/nuxt](../index.md) / default
+
+# Function: default()
+
+> **default**(`this`, `inlineOptions`, `nuxt`): `_ModuleSetupReturn`
+
+## Parameters
+
+• **this**: `void`
+
+• **inlineOptions**: [`ModuleOptions`](../interfaces/ModuleOptions.md)
+
+• **nuxt**: `Nuxt`
+
+## Returns
+
+`_ModuleSetupReturn`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / @pinia/nuxt
+
+# @pinia/nuxt
+
+## Index
+
+### Interfaces
+
+- [ModuleOptions](interfaces/ModuleOptions.md)
+
+### Functions
+
+- [default](functions/default.md)
editLink: false
---
-[API Documentation](../index.md) / [@pinia/nuxt](../modules/pinia_nuxt.md) / ModuleOptions
+[**API Documentation**](../../../index.md) • **Docs**
-# Interface: ModuleOptions
+***
+
+[API Documentation](../../../index.md) / [@pinia/nuxt](../index.md) / ModuleOptions
-[@pinia/nuxt](../modules/pinia_nuxt.md).ModuleOptions
+# Interface: ModuleOptions
## Properties
-### disableVuex
+### disableVuex?
-• `Optional` **disableVuex**: `boolean`
+> `optional` **disableVuex**: `boolean`
Pinia disables Vuex by default, set this option to `false` to avoid it and
use Pinia alongside Vuex (Nuxt 2 only)
-**`Default`**
+#### Default
`true`
-___
+***
-### storesDirs
+### storesDirs?
-• `Optional` **storesDirs**: `string`[]
+> `optional` **storesDirs**: `string`[]
Automatically add stores dirs to the auto imports. This is the same as
directly adding the dirs to the `imports.dirs` option. If you want to
also import nested stores, you can use the glob pattern `./stores/**`
-**`Default`**
+#### Default
`['stores']`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../../index.md) / [@pinia/testing](../index.md) / createTestingPinia
+
+# Function: createTestingPinia()
+
+> **createTestingPinia**(`options`): [`TestingPinia`](../interfaces/TestingPinia.md)
+
+Creates a pinia instance designed for unit tests that **requires mocking**
+the stores. By default, **all actions are mocked** and therefore not
+executed. This allows you to unit test your store and components separately.
+You can change this with the `stubActions` option. If you are using jest,
+they are replaced with `jest.fn()`, otherwise, you must provide your own
+`createSpy` option.
+
+## Parameters
+
+• **options**: [`TestingOptions`](../interfaces/TestingOptions.md) = `{}`
+
+options to configure the testing pinia
+
+## Returns
+
+[`TestingPinia`](../interfaces/TestingPinia.md)
+
+a augmented pinia instance
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / @pinia/testing
+
+# @pinia/testing
+
+## Index
+
+### Interfaces
+
+- [TestingOptions](interfaces/TestingOptions.md)
+- [TestingPinia](interfaces/TestingPinia.md)
+
+### Functions
+
+- [createTestingPinia](functions/createTestingPinia.md)
editLink: false
---
-[API Documentation](../index.md) / [@pinia/testing](../modules/pinia_testing.md) / TestingOptions
+[**API Documentation**](../../../index.md) • **Docs**
-# Interface: TestingOptions
+***
+
+[API Documentation](../../../index.md) / [@pinia/testing](../index.md) / TestingOptions
-[@pinia/testing](../modules/pinia_testing.md).TestingOptions
+# Interface: TestingOptions
## Properties
-### createSpy
+### createSpy()?
-• `Optional` **createSpy**: (`fn?`: (...`args`: `any`[]) => `any`) => (...`args`: `any`[]) => `any`
+> `optional` **createSpy**: (`fn`?) => (...`args`) => `any`
Function used to create a spy for actions and `$patch()`. Pre-configured
with `jest.fn` in Jest projects or `vi.fn` in Vitest projects if
`globals: true` is set.
-#### Type declaration
-
-▸ (`fn?`): (...`args`: `any`[]) => `any`
+#### Parameters
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `fn?` | (...`args`: `any`[]) => `any` |
-
-##### Returns
+• **fn?**
-`fn`
+#### Returns
-▸ (`...args`): `any`
+`Function`
##### Parameters
-| Name | Type |
-| :------ | :------ |
-| `...args` | `any`[] |
+• ...**args**: `any`[]
##### Returns
`any`
-___
+***
-### fakeApp
+### fakeApp?
-• `Optional` **fakeApp**: `boolean`
+> `optional` **fakeApp**: `boolean`
Creates an empty App and calls `app.use(pinia)` with the created testing
pinia. This allows you to use plugins while unit testing stores as
plugins **will wait for pinia to be installed in order to be executed**.
Defaults to false.
-___
+***
-### initialState
+### initialState?
-• `Optional` **initialState**: [`StateTree`](../modules/pinia.md#StateTree)
+> `optional` **initialState**: [`StateTree`](../../../pinia/type-aliases/StateTree.md)
Allows defining a partial initial state of all your stores. This state gets applied after a store is created,
allowing you to only set a few properties that are required in your test.
-___
+***
-### plugins
+### plugins?
-• `Optional` **plugins**: [`PiniaPlugin`](pinia.PiniaPlugin.md)[]
+> `optional` **plugins**: [`PiniaPlugin`](../../../pinia/interfaces/PiniaPlugin.md)[]
Plugins to be installed before the testing plugin. Add any plugins used in
your application that will be used while testing.
-___
+***
-### stubActions
+### stubActions?
-• `Optional` **stubActions**: `boolean`
+> `optional` **stubActions**: `boolean`
When set to false, actions are only spied, but they will still get executed. When
set to true, actions will be replaced with spies, resulting in their code
it will **only** make the `fn` argument `undefined`. You still have to
handle this in `createSpy()`.
-___
+***
-### stubPatch
+### stubPatch?
-• `Optional` **stubPatch**: `boolean`
+> `optional` **stubPatch**: `boolean`
When set to true, calls to `$patch()` won't change the state. Defaults to
false. NOTE: when providing `createSpy()`, it will **only** make the `fn`
argument `undefined`. You still have to handle this in `createSpy()`.
-___
+***
-### stubReset
+### stubReset?
-• `Optional` **stubReset**: `boolean`
+> `optional` **stubReset**: `boolean`
When set to true, calls to `$reset()` won't change the state. Defaults to
false.
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../../index.md) / [@pinia/testing](../index.md) / TestingPinia
+
+# Interface: TestingPinia
+
+Pinia instance specifically designed for testing. Extends a regular
+`Pinia` instance with test specific properties.
+
+## Extends
+
+- [`Pinia`](../../../pinia/interfaces/Pinia.md)
+
+## Properties
+
+### app
+
+> **app**: `App`\<`any`\>
+
+App used by Pinia
+
+***
+
+### install()
+
+> **install**: (`app`) => `void`
+
+#### Parameters
+
+• **app**: `App`\<`any`\>
+
+#### Returns
+
+`void`
+
+#### Inherited from
+
+[`Pinia`](../../../pinia/interfaces/Pinia.md).[`install`](../../../pinia/interfaces/Pinia.md#install)
+
+***
+
+### state
+
+> **state**: `Ref`\<`Record`\<`string`, [`StateTree`](../../../pinia/type-aliases/StateTree.md)\>\>
+
+root state
+
+#### Inherited from
+
+[`Pinia`](../../../pinia/interfaces/Pinia.md).[`state`](../../../pinia/interfaces/Pinia.md#state)
+
+## Methods
+
+### use()
+
+> **use**(`plugin`): [`Pinia`](../../../pinia/interfaces/Pinia.md)
+
+Adds a store plugin to extend every store
+
+#### Parameters
+
+• **plugin**: [`PiniaPlugin`](../../../pinia/interfaces/PiniaPlugin.md)
+
+store plugin to add
+
+#### Returns
+
+[`Pinia`](../../../pinia/interfaces/Pinia.md)
+
+#### Inherited from
+
+[`Pinia`](../../../pinia/interfaces/Pinia.md).[`use`](../../../pinia/interfaces/Pinia.md#use)
editLink: false
---
-API Documentation
+**API Documentation** • **Docs**
+
+***
# API Documentation
## Modules
-- [@pinia/nuxt](modules/pinia_nuxt.md)
-- [@pinia/testing](modules/pinia_testing.md)
-- [pinia](modules/pinia.md)
+- [@pinia/nuxt](@pinia/nuxt/index.md)
+- [@pinia/testing](@pinia/testing/index.md)
+- [pinia](pinia/index.md)
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineSetupStoreOptions
-
-# Interface: DefineSetupStoreOptions\<Id, S, G, A\>
-
-[pinia](../modules/pinia.md).DefineSetupStoreOptions
-
-Options parameter of `defineStore()` for setup stores. Can be extended to
-augment stores with the plugin API.
-
-**`See`**
-
-[DefineStoreOptionsBase](pinia.DefineStoreOptionsBase.md).
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) |
-| `G` | `G` |
-| `A` | `A` |
-
-## Hierarchy
-
-- [`DefineStoreOptionsBase`](pinia.DefineStoreOptionsBase.md)\<`S`, [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\>\>
-
- ↳ **`DefineSetupStoreOptions`**
-
-## Properties
-
-### actions
-
-• `Optional` **actions**: `A`
-
-Extracted actions. Added by useStore(). SHOULD NOT be added by the user when
-creating the store. Can be used in plugins to get the list of actions in a
-store defined with a setup function. Note this is always defined
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptions
-
-# Interface: DefineStoreOptions\<Id, S, G, A\>
-
-[pinia](../modules/pinia.md).DefineStoreOptions
-
-Options parameter of `defineStore()` for option stores. Can be extended to
-augment stores with the plugin API.
-
-**`See`**
-
-[DefineStoreOptionsBase](pinia.DefineStoreOptionsBase.md).
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) |
-| `G` | `G` |
-| `A` | `A` |
-
-## Hierarchy
-
-- [`DefineStoreOptionsBase`](pinia.DefineStoreOptionsBase.md)\<`S`, [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\>\>
-
- ↳ **`DefineStoreOptions`**
-
-## Properties
-
-### actions
-
-• `Optional` **actions**: `A` & `ThisType`\<`A` & `UnwrapRef`\<`S`\> & [`_StoreWithState`](pinia._StoreWithState.md)\<`Id`, `S`, `G`, `A`\> & [`_StoreWithGetters`](../modules/pinia.md#_StoreWithGetters)\<`G`\> & [`PiniaCustomProperties`](pinia.PiniaCustomProperties.md)\<`string`, [`StateTree`](../modules/pinia.md#StateTree), [`_GettersTree`](../modules/pinia.md#_GettersTree)\<[`StateTree`](../modules/pinia.md#StateTree)\>, [`_ActionsTree`](../modules/pinia.md#_ActionsTree)\>\>
-
-Optional object of actions.
-
-___
-
-### getters
-
-• `Optional` **getters**: `G` & `ThisType`\<`UnwrapRef`\<`S`\> & [`_StoreWithGetters`](../modules/pinia.md#_StoreWithGetters)\<`G`\> & [`PiniaCustomProperties`](pinia.PiniaCustomProperties.md)\<`string`, [`StateTree`](../modules/pinia.md#StateTree), [`_GettersTree`](../modules/pinia.md#_GettersTree)\<[`StateTree`](../modules/pinia.md#StateTree)\>, [`_ActionsTree`](../modules/pinia.md#_ActionsTree)\>\> & [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\>
-
-Optional object of getters.
-
-___
-
-### id
-
-• **id**: `Id`
-
-Unique string key to identify the store across the application.
-
-___
-
-### state
-
-• `Optional` **state**: () => `S`
-
-Function to create a fresh state. **Must be an arrow function** to ensure
-correct typings!
-
-#### Type declaration
-
-▸ (): `S`
-
-##### Returns
-
-`S`
-
-## Methods
-
-### hydrate
-
-▸ **hydrate**(`storeState`, `initialState`): `void`
-
-Allows hydrating the store during SSR when complex state (like client side only refs) are used in the store
-definition and copying the value from `pinia.state` isn't enough.
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `storeState` | `UnwrapRef`\<`S`\> | the current state in the store |
-| `initialState` | `UnwrapRef`\<`S`\> | initialState |
-
-#### Returns
-
-`void`
-
-**`Example`**
-
-If in your `state`, you use any `customRef`s, any `computed`s, or any `ref`s that have a different value on
-Server and Client, you need to manually hydrate them. e.g., a custom ref that is stored in the local
-storage:
-
-```ts
-const useStore = defineStore('main', {
- state: () => ({
- n: useLocalStorage('key', 0)
- }),
- hydrate(storeState, initialState) {
- // @ts-expect-error: https://github.com/microsoft/TypeScript/issues/43826
- storeState.n = useLocalStorage('key', 0)
- }
-})
-```
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptionsBase
-
-# Interface: DefineStoreOptionsBase\<S, Store\>
-
-[pinia](../modules/pinia.md).DefineStoreOptionsBase
-
-Options passed to `defineStore()` that are common between option and setup
-stores. Extend this interface if you want to add custom options to both kinds
-of stores.
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) |
-| `Store` | `Store` |
-
-## Hierarchy
-
-- **`DefineStoreOptionsBase`**
-
- ↳ [`DefineStoreOptions`](pinia.DefineStoreOptions.md)
-
- ↳ [`DefineSetupStoreOptions`](pinia.DefineSetupStoreOptions.md)
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptionsInPlugin
-
-# Interface: DefineStoreOptionsInPlugin\<Id, S, G, A\>
-
-[pinia](../modules/pinia.md).DefineStoreOptionsInPlugin
-
-Available `options` when creating a pinia plugin.
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) |
-| `G` | `G` |
-| `A` | `A` |
-
-## Hierarchy
-
-- `Omit`\<[`DefineStoreOptions`](pinia.DefineStoreOptions.md)\<`Id`, `S`, `G`, `A`\>, ``"id"`` \| ``"actions"``\>
-
- ↳ **`DefineStoreOptionsInPlugin`**
-
-## Properties
-
-### actions
-
-• **actions**: `A`
-
-Extracted object of actions. Added by useStore() when the store is built
-using the setup API, otherwise uses the one passed to `defineStore()`.
-Defaults to an empty object if no actions are defined.
-
-___
-
-### getters
-
-• `Optional` **getters**: `G` & `ThisType`\<`UnwrapRef`\<`S`\> & [`_StoreWithGetters`](../modules/pinia.md#_StoreWithGetters)\<`G`\> & [`PiniaCustomProperties`](pinia.PiniaCustomProperties.md)\<`string`, [`StateTree`](../modules/pinia.md#StateTree), [`_GettersTree`](../modules/pinia.md#_GettersTree)\<[`StateTree`](../modules/pinia.md#StateTree)\>, [`_ActionsTree`](../modules/pinia.md#_ActionsTree)\>\> & [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\>
-
-Optional object of getters.
-
-#### Inherited from
-
-Omit.getters
-
-___
-
-### state
-
-• `Optional` **state**: () => `S`
-
-Function to create a fresh state. **Must be an arrow function** to ensure
-correct typings!
-
-#### Type declaration
-
-▸ (): `S`
-
-##### Returns
-
-`S`
-
-#### Inherited from
-
-Omit.state
-
-## Methods
-
-### hydrate
-
-▸ **hydrate**(`storeState`, `initialState`): `void`
-
-Allows hydrating the store during SSR when complex state (like client side only refs) are used in the store
-definition and copying the value from `pinia.state` isn't enough.
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `storeState` | `UnwrapRef`\<`S`\> | the current state in the store |
-| `initialState` | `UnwrapRef`\<`S`\> | initialState |
-
-#### Returns
-
-`void`
-
-**`Example`**
-
-If in your `state`, you use any `customRef`s, any `computed`s, or any `ref`s that have a different value on
-Server and Client, you need to manually hydrate them. e.g., a custom ref that is stored in the local
-storage:
-
-```ts
-const useStore = defineStore('main', {
- state: () => ({
- n: useLocalStorage('key', 0)
- }),
- hydrate(storeState, initialState) {
- // @ts-expect-error: https://github.com/microsoft/TypeScript/issues/43826
- storeState.n = useLocalStorage('key', 0)
- }
-})
-```
-
-#### Inherited from
-
-Omit.hydrate
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / Pinia
-
-# Interface: Pinia
-
-[pinia](../modules/pinia.md).Pinia
-
-Every application must own its own pinia to be able to create stores
-
-## Hierarchy
-
-- **`Pinia`**
-
- ↳ [`TestingPinia`](pinia_testing.TestingPinia.md)
-
-## Properties
-
-### install
-
-• **install**: (`app`: `App`\<`any`\>) => `void`
-
-#### Type declaration
-
-▸ (`app`): `void`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `app` | `App`\<`any`\> |
-
-##### Returns
-
-`void`
-
-___
-
-### state
-
-• **state**: `Ref`\<`Record`\<`string`, [`StateTree`](../modules/pinia.md#StateTree)\>\>
-
-root state
-
-## Methods
-
-### use
-
-▸ **use**(`plugin`): [`Pinia`](pinia.Pinia.md)
-
-Adds a store plugin to extend every store
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `plugin` | [`PiniaPlugin`](pinia.PiniaPlugin.md) | store plugin to add |
-
-#### Returns
-
-[`Pinia`](pinia.Pinia.md)
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaCustomProperties
-
-# Interface: PiniaCustomProperties\<Id, S, G, A\>
-
-[pinia](../modules/pinia.md).PiniaCustomProperties
-
-Interface to be extended by the user when they add properties through plugins.
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` = `string` |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) = [`StateTree`](../modules/pinia.md#StateTree) |
-| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\> |
-| `A` | [`_ActionsTree`](../modules/pinia.md#_ActionsTree) |
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaCustomStateProperties
-
-# Interface: PiniaCustomStateProperties\<S\>
-
-[pinia](../modules/pinia.md).PiniaCustomStateProperties
-
-Properties that are added to every `store.$state` by `pinia.use()`.
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) = [`StateTree`](../modules/pinia.md#StateTree) |
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaPlugin
-
-# Interface: PiniaPlugin
-
-[pinia](../modules/pinia.md).PiniaPlugin
-
-Plugin to extend every store.
-
-## Callable
-
-### PiniaPlugin
-
-▸ **PiniaPlugin**(`context`): `void` \| `Partial`\<[`PiniaCustomProperties`](pinia.PiniaCustomProperties.md)\<`string`, [`StateTree`](../modules/pinia.md#StateTree), [`_GettersTree`](../modules/pinia.md#_GettersTree)\<[`StateTree`](../modules/pinia.md#StateTree)\>, [`_ActionsTree`](../modules/pinia.md#_ActionsTree)\> & [`PiniaCustomStateProperties`](pinia.PiniaCustomStateProperties.md)\<[`StateTree`](../modules/pinia.md#StateTree)\>\>
-
-Plugin to extend every store. Returns an object to extend the store or
-nothing.
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `context` | [`PiniaPluginContext`](pinia.PiniaPluginContext.md)\<`string`, [`StateTree`](../modules/pinia.md#StateTree), [`_GettersTree`](../modules/pinia.md#_GettersTree)\<[`StateTree`](../modules/pinia.md#StateTree)\>, [`_ActionsTree`](../modules/pinia.md#_ActionsTree)\> | Context |
-
-#### Returns
-
-`void` \| `Partial`\<[`PiniaCustomProperties`](pinia.PiniaCustomProperties.md)\<`string`, [`StateTree`](../modules/pinia.md#StateTree), [`_GettersTree`](../modules/pinia.md#_GettersTree)\<[`StateTree`](../modules/pinia.md#StateTree)\>, [`_ActionsTree`](../modules/pinia.md#_ActionsTree)\> & [`PiniaCustomStateProperties`](pinia.PiniaCustomStateProperties.md)\<[`StateTree`](../modules/pinia.md#StateTree)\>\>
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaPluginContext
-
-# Interface: PiniaPluginContext\<Id, S, G, A\>
-
-[pinia](../modules/pinia.md).PiniaPluginContext
-
-Context argument passed to Pinia plugins.
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` = `string` |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) = [`StateTree`](../modules/pinia.md#StateTree) |
-| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\> |
-| `A` | [`_ActionsTree`](../modules/pinia.md#_ActionsTree) |
-
-## Properties
-
-### app
-
-• **app**: `App`\<`any`\>
-
-Current app created with `Vue.createApp()`.
-
-___
-
-### options
-
-• **options**: [`DefineStoreOptionsInPlugin`](pinia.DefineStoreOptionsInPlugin.md)\<`Id`, `S`, `G`, `A`\>
-
-Initial options defining the store when calling `defineStore()`.
-
-___
-
-### pinia
-
-• **pinia**: [`Pinia`](pinia.Pinia.md)
-
-pinia instance.
-
-___
-
-### store
-
-• **store**: [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\>
-
-Current store being extended.
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / StoreDefinition
-
-# Interface: StoreDefinition\<Id, S, G, A\>
-
-[pinia](../modules/pinia.md).StoreDefinition
-
-Return type of `defineStore()`. Function that allows instantiating a store.
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` = `string` |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) = [`StateTree`](../modules/pinia.md#StateTree) |
-| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\> |
-| `A` | [`_ActionsTree`](../modules/pinia.md#_ActionsTree) |
-
-## Hierarchy
-
-- **`StoreDefinition`**
-
- ↳ [`SetupStoreDefinition`](pinia.SetupStoreDefinition.md)
-
-## Callable
-
-### StoreDefinition
-
-▸ **StoreDefinition**(`pinia?`, `hot?`): [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\>
-
-Returns a store, creates it if necessary.
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `pinia?` | ``null`` \| [`Pinia`](pinia.Pinia.md) | Pinia instance to retrieve the store |
-| `hot?` | [`StoreGeneric`](../modules/pinia.md#StoreGeneric) | dev only hot module replacement |
-
-#### Returns
-
-[`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\>
-
-## Properties
-
-### $id
-
-• **$id**: `Id`
-
-Id of the store. Used by map helpers.
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / StoreProperties
-
-# Interface: StoreProperties\<Id\>
-
-[pinia](../modules/pinia.md).StoreProperties
-
-Properties of a store.
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-
-## Hierarchy
-
-- **`StoreProperties`**
-
- ↳ [`_StoreWithState`](pinia._StoreWithState.md)
-
-## Properties
-
-### $id
-
-• **$id**: `Id`
-
-Unique identifier of the store
-
-___
-
-### \_customProperties
-
-• **\_customProperties**: `Set`\<`string`\>
-
-Used by devtools plugin to retrieve properties added with plugins. Removed
-in production. Can be used by the user to add property keys of the store
-that should be displayed in devtools.
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / SubscriptionCallbackMutationDirect
-
-# Interface: SubscriptionCallbackMutationDirect
-
-[pinia](../modules/pinia.md).SubscriptionCallbackMutationDirect
-
-Context passed to a subscription callback when directly mutating the state of
-a store with `store.someState = newValue` or `store.$state.someState =
-newValue`.
-
-## Hierarchy
-
-- [`_SubscriptionCallbackMutationBase`](pinia._SubscriptionCallbackMutationBase.md)
-
- ↳ **`SubscriptionCallbackMutationDirect`**
-
-## Properties
-
-### events
-
-• **events**: `DebuggerEvent`
-
-🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
-https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
-devtools and plugins **during development only**.
-
-#### Overrides
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[events](pinia._SubscriptionCallbackMutationBase.md#events)
-
-___
-
-### storeId
-
-• **storeId**: `string`
-
-`id` of the store doing the mutation.
-
-#### Inherited from
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[storeId](pinia._SubscriptionCallbackMutationBase.md#storeId)
-
-___
-
-### type
-
-• **type**: [`direct`](../enums/pinia.MutationType.md#direct)
-
-Type of the mutation.
-
-#### Overrides
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[type](pinia._SubscriptionCallbackMutationBase.md#type)
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / SubscriptionCallbackMutationPatchFunction
-
-# Interface: SubscriptionCallbackMutationPatchFunction
-
-[pinia](../modules/pinia.md).SubscriptionCallbackMutationPatchFunction
-
-Context passed to a subscription callback when `store.$patch()` is called
-with a function.
-
-## Hierarchy
-
-- [`_SubscriptionCallbackMutationBase`](pinia._SubscriptionCallbackMutationBase.md)
-
- ↳ **`SubscriptionCallbackMutationPatchFunction`**
-
-## Properties
-
-### events
-
-• **events**: `DebuggerEvent`[]
-
-🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
-https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
-devtools and plugins **during development only**.
-
-#### Overrides
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[events](pinia._SubscriptionCallbackMutationBase.md#events)
-
-___
-
-### storeId
-
-• **storeId**: `string`
-
-`id` of the store doing the mutation.
-
-#### Inherited from
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[storeId](pinia._SubscriptionCallbackMutationBase.md#storeId)
-
-___
-
-### type
-
-• **type**: [`patchFunction`](../enums/pinia.MutationType.md#patchFunction)
-
-Type of the mutation.
-
-#### Overrides
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[type](pinia._SubscriptionCallbackMutationBase.md#type)
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / SubscriptionCallbackMutationPatchObject
-
-# Interface: SubscriptionCallbackMutationPatchObject\<S\>
-
-[pinia](../modules/pinia.md).SubscriptionCallbackMutationPatchObject
-
-Context passed to a subscription callback when `store.$patch()` is called
-with an object.
-
-## Type parameters
-
-| Name |
-| :------ |
-| `S` |
-
-## Hierarchy
-
-- [`_SubscriptionCallbackMutationBase`](pinia._SubscriptionCallbackMutationBase.md)
-
- ↳ **`SubscriptionCallbackMutationPatchObject`**
-
-## Properties
-
-### events
-
-• **events**: `DebuggerEvent`[]
-
-🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
-https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
-devtools and plugins **during development only**.
-
-#### Overrides
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[events](pinia._SubscriptionCallbackMutationBase.md#events)
-
-___
-
-### payload
-
-• **payload**: [`_DeepPartial`](../modules/pinia.md#_DeepPartial)\<`S`\>
-
-Object passed to `store.$patch()`.
-
-___
-
-### storeId
-
-• **storeId**: `string`
-
-`id` of the store doing the mutation.
-
-#### Inherited from
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[storeId](pinia._SubscriptionCallbackMutationBase.md#storeId)
-
-___
-
-### type
-
-• **type**: [`patchObject`](../enums/pinia.MutationType.md#patchObject)
-
-Type of the mutation.
-
-#### Overrides
-
-[_SubscriptionCallbackMutationBase](pinia._SubscriptionCallbackMutationBase.md).[type](pinia._SubscriptionCallbackMutationBase.md#type)
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / \_StoreOnActionListenerContext
-
-# Interface: \_StoreOnActionListenerContext\<Store, ActionName, A\>
-
-[pinia](../modules/pinia.md)._StoreOnActionListenerContext
-
-Actual type for [StoreOnActionListenerContext](../modules/pinia.md#StoreOnActionListenerContext). Exists for refactoring
-purposes. For internal use only.
-For internal use **only**
-
-## Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Store` | `Store` |
-| `ActionName` | extends `string` |
-| `A` | `A` |
-
-## Properties
-
-### after
-
-• **after**: (`callback`: `A` extends `Record`\<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? (`resolvedReturn`: [`_Awaited`](../modules/pinia.md#_Awaited)\<`ReturnType`\<`A`\<`A`\>[`ActionName`]\>\>) => `void` : () => `void`) => `void`
-
-Sets up a hook once the action is finished. It receives the return value
-of the action, if it's a Promise, it will be unwrapped.
-
-#### Type declaration
-
-▸ (`callback`): `void`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `callback` | `A` extends `Record`\<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? (`resolvedReturn`: [`_Awaited`](../modules/pinia.md#_Awaited)\<`ReturnType`\<`A`\<`A`\>[`ActionName`]\>\>) => `void` : () => `void` |
-
-##### Returns
-
-`void`
-
-___
-
-### args
-
-• **args**: `A` extends `Record`\<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? `Parameters`\<`A`\<`A`\>[`ActionName`]\> : `unknown`[]
-
-Parameters passed to the action
-
-___
-
-### name
-
-• **name**: `ActionName`
-
-Name of the action
-
-___
-
-### onError
-
-• **onError**: (`callback`: (`error`: `unknown`) => `void`) => `void`
-
-Sets up a hook if the action fails. Return `false` to catch the error and
-stop it from propagating.
-
-#### Type declaration
-
-▸ (`callback`): `void`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `callback` | (`error`: `unknown`) => `void` |
-
-##### Returns
-
-`void`
-
-___
-
-### store
-
-• **store**: `Store`
-
-Store that is invoking the action
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / \_SubscriptionCallbackMutationBase
-
-# Interface: \_SubscriptionCallbackMutationBase
-
-[pinia](../modules/pinia.md)._SubscriptionCallbackMutationBase
-
-Base type for the context passed to a subscription callback. Internal type.
-
-## Hierarchy
-
-- **`_SubscriptionCallbackMutationBase`**
-
- ↳ [`SubscriptionCallbackMutationDirect`](pinia.SubscriptionCallbackMutationDirect.md)
-
- ↳ [`SubscriptionCallbackMutationPatchFunction`](pinia.SubscriptionCallbackMutationPatchFunction.md)
-
- ↳ [`SubscriptionCallbackMutationPatchObject`](pinia.SubscriptionCallbackMutationPatchObject.md)
-
-## Properties
-
-### events
-
-• `Optional` **events**: `DebuggerEvent` \| `DebuggerEvent`[]
-
-🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
-https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
-devtools and plugins **during development only**.
-
-___
-
-### storeId
-
-• **storeId**: `string`
-
-`id` of the store doing the mutation.
-
-___
-
-### type
-
-• **type**: [`MutationType`](../enums/pinia.MutationType.md)
-
-Type of the mutation.
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / [@pinia/testing](../modules/pinia_testing.md) / TestingPinia
-
-# Interface: TestingPinia
-
-[@pinia/testing](../modules/pinia_testing.md).TestingPinia
-
-Pinia instance specifically designed for testing. Extends a regular
-`Pinia` instance with test specific properties.
-
-## Hierarchy
-
-- [`Pinia`](pinia.Pinia.md)
-
- ↳ **`TestingPinia`**
-
-## Properties
-
-### app
-
-• **app**: `App`\<`any`\>
-
-App used by Pinia
-
-___
-
-### install
-
-• **install**: (`app`: `App`\<`any`\>) => `void`
-
-#### Type declaration
-
-▸ (`app`): `void`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `app` | `App`\<`any`\> |
-
-##### Returns
-
-`void`
-
-#### Inherited from
-
-[Pinia](pinia.Pinia.md).[install](pinia.Pinia.md#install)
-
-___
-
-### state
-
-• **state**: `Ref`\<`Record`\<`string`, [`StateTree`](../modules/pinia.md#StateTree)\>\>
-
-root state
-
-#### Inherited from
-
-[Pinia](pinia.Pinia.md).[state](pinia.Pinia.md#state)
-
-## Methods
-
-### use
-
-▸ **use**(`plugin`): [`Pinia`](pinia.Pinia.md)
-
-Adds a store plugin to extend every store
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `plugin` | [`PiniaPlugin`](pinia.PiniaPlugin.md) | store plugin to add |
-
-#### Returns
-
-[`Pinia`](pinia.Pinia.md)
-
-#### Inherited from
-
-[Pinia](pinia.Pinia.md).[use](pinia.Pinia.md#use)
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / pinia
-
-# Module: pinia
-
-## Enumerations
-
-- [MutationType](../enums/pinia.MutationType.md)
-
-## Interfaces
-
-- [DefineSetupStoreOptions](../interfaces/pinia.DefineSetupStoreOptions.md)
-- [DefineStoreOptions](../interfaces/pinia.DefineStoreOptions.md)
-- [DefineStoreOptionsBase](../interfaces/pinia.DefineStoreOptionsBase.md)
-- [DefineStoreOptionsInPlugin](../interfaces/pinia.DefineStoreOptionsInPlugin.md)
-- [MapStoresCustomization](../interfaces/pinia.MapStoresCustomization.md)
-- [Pinia](../interfaces/pinia.Pinia.md)
-- [PiniaCustomProperties](../interfaces/pinia.PiniaCustomProperties.md)
-- [PiniaCustomStateProperties](../interfaces/pinia.PiniaCustomStateProperties.md)
-- [PiniaPlugin](../interfaces/pinia.PiniaPlugin.md)
-- [PiniaPluginContext](../interfaces/pinia.PiniaPluginContext.md)
-- [SetupStoreDefinition](../interfaces/pinia.SetupStoreDefinition.md)
-- [StoreDefinition](../interfaces/pinia.StoreDefinition.md)
-- [StoreProperties](../interfaces/pinia.StoreProperties.md)
-- [SubscriptionCallbackMutationDirect](../interfaces/pinia.SubscriptionCallbackMutationDirect.md)
-- [SubscriptionCallbackMutationPatchFunction](../interfaces/pinia.SubscriptionCallbackMutationPatchFunction.md)
-- [SubscriptionCallbackMutationPatchObject](../interfaces/pinia.SubscriptionCallbackMutationPatchObject.md)
-- [\_StoreOnActionListenerContext](../interfaces/pinia._StoreOnActionListenerContext.md)
-- [\_StoreWithState](../interfaces/pinia._StoreWithState.md)
-- [\_SubscriptionCallbackMutationBase](../interfaces/pinia._SubscriptionCallbackMutationBase.md)
-
-## Type Aliases
-
-### PiniaStorePlugin
-
-Ƭ **PiniaStorePlugin**: [`PiniaPlugin`](../interfaces/pinia.PiniaPlugin.md)
-
-Plugin to extend every store.
-
-**`Deprecated`**
-
-use PiniaPlugin instead
-
-___
-
-### StateTree
-
-Ƭ **StateTree**: `Record`\<`string` \| `number` \| `symbol`, `any`\>
-
-Generic state of a Store
-
-___
-
-### Store
-
-Ƭ **Store**\<`Id`, `S`, `G`, `A`\>: [`_StoreWithState`](../interfaces/pinia._StoreWithState.md)\<`Id`, `S`, `G`, `A`\> & `UnwrapRef`\<`S`\> & [`_StoreWithGetters`](pinia.md#_StoreWithGetters)\<`G`\> & [`_ActionsTree`](pinia.md#_ActionsTree) extends `A` ? {} : `A` & [`PiniaCustomProperties`](../interfaces/pinia.PiniaCustomProperties.md)\<`Id`, `S`, `G`, `A`\> & [`PiniaCustomStateProperties`](../interfaces/pinia.PiniaCustomStateProperties.md)\<`S`\>
-
-Store type to build a store.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` = `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) = {} |
-| `G` | {} |
-| `A` | {} |
-
-___
-
-### StoreActions
-
-Ƭ **StoreActions**\<`SS`\>: `SS` extends [`Store`](pinia.md#Store)\<`string`, [`StateTree`](pinia.md#StateTree), [`_GettersTree`](pinia.md#_GettersTree)\<[`StateTree`](pinia.md#StateTree)\>, infer A\> ? `A` : [`_ExtractActionsFromSetupStore`](pinia.md#_ExtractActionsFromSetupStore)\<`SS`\>
-
-Extract the actions of a store type. Works with both a Setup Store or an
-Options Store.
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### StoreGeneric
-
-Ƭ **StoreGeneric**: [`Store`](pinia.md#Store)\<`string`, [`StateTree`](pinia.md#StateTree), [`_GettersTree`](pinia.md#_GettersTree)\<[`StateTree`](pinia.md#StateTree)\>, [`_ActionsTree`](pinia.md#_ActionsTree)\>
-
-Generic and type-unsafe version of Store. Doesn't fail on access with
-strings, making it much easier to write generic functions that do not care
-about the kind of store that is passed.
-
-___
-
-### StoreGetters
-
-Ƭ **StoreGetters**\<`SS`\>: `SS` extends [`Store`](pinia.md#Store)\<`string`, [`StateTree`](pinia.md#StateTree), infer G, [`_ActionsTree`](pinia.md#_ActionsTree)\> ? [`_StoreWithGetters`](pinia.md#_StoreWithGetters)\<`G`\> : [`_ExtractGettersFromSetupStore`](pinia.md#_ExtractGettersFromSetupStore)\<`SS`\>
-
-Extract the getters of a store type. Works with both a Setup Store or an
-Options Store.
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### StoreOnActionListener
-
-Ƭ **StoreOnActionListener**\<`Id`, `S`, `G`, `A`\>: (`context`: [`StoreOnActionListenerContext`](pinia.md#StoreOnActionListenerContext)\<`Id`, `S`, `G`, {} extends `A` ? [`_ActionsTree`](pinia.md#_ActionsTree) : `A`\>) => `void`
-
-Argument of `store.$onAction()`
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | `G` |
-| `A` | `A` |
-
-#### Type declaration
-
-▸ (`context`): `void`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `context` | [`StoreOnActionListenerContext`](pinia.md#StoreOnActionListenerContext)\<`Id`, `S`, `G`, {} extends `A` ? [`_ActionsTree`](pinia.md#_ActionsTree) : `A`\> |
-
-##### Returns
-
-`void`
-
-___
-
-### StoreOnActionListenerContext
-
-Ƭ **StoreOnActionListenerContext**\<`Id`, `S`, `G`, `A`\>: [`_ActionsTree`](pinia.md#_ActionsTree) extends `A` ? [`_StoreOnActionListenerContext`](../interfaces/pinia._StoreOnActionListenerContext.md)\<[`StoreGeneric`](pinia.md#StoreGeneric), `string`, [`_ActionsTree`](pinia.md#_ActionsTree)\> : \{ [Name in keyof A]: Name extends string ? \_StoreOnActionListenerContext\<Store\<Id, S, G, A\>, Name, A\> : never }[keyof `A`]
-
-Context object passed to callbacks of `store.$onAction(context => {})`
-TODO: should have only the Id, the Store and Actions to generate the proper object
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | `G` |
-| `A` | `A` |
-
-___
-
-### StoreState
-
-Ƭ **StoreState**\<`SS`\>: `SS` extends [`Store`](pinia.md#Store)\<`string`, infer S, [`_GettersTree`](pinia.md#_GettersTree)\<[`StateTree`](pinia.md#StateTree)\>, [`_ActionsTree`](pinia.md#_ActionsTree)\> ? `UnwrapRef`\<`S`\> : [`_ExtractStateFromSetupStore`](pinia.md#_ExtractStateFromSetupStore)\<`SS`\>
-
-Extract the state of a store type. Works with both a Setup Store or an
-Options Store. Note this unwraps refs.
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### SubscriptionCallback
-
-Ƭ **SubscriptionCallback**\<`S`\>: (`mutation`: [`SubscriptionCallbackMutation`](pinia.md#SubscriptionCallbackMutation)\<`S`\>, `state`: `UnwrapRef`\<`S`\>) => `void`
-
-Callback of a subscription
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `S` |
-
-#### Type declaration
-
-▸ (`mutation`, `state`): `void`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `mutation` | [`SubscriptionCallbackMutation`](pinia.md#SubscriptionCallbackMutation)\<`S`\> |
-| `state` | `UnwrapRef`\<`S`\> |
-
-##### Returns
-
-`void`
-
-___
-
-### SubscriptionCallbackMutation
-
-Ƭ **SubscriptionCallbackMutation**\<`S`\>: [`SubscriptionCallbackMutationDirect`](../interfaces/pinia.SubscriptionCallbackMutationDirect.md) \| [`SubscriptionCallbackMutationPatchObject`](../interfaces/pinia.SubscriptionCallbackMutationPatchObject.md)\<`S`\> \| [`SubscriptionCallbackMutationPatchFunction`](../interfaces/pinia.SubscriptionCallbackMutationPatchFunction.md)
-
-Context object passed to a subscription callback.
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `S` |
-
-___
-
-### \_ActionsTree
-
-Ƭ **\_ActionsTree**: `Record`\<`string`, [`_Method`](pinia.md#_Method)\>
-
-Type of an object of Actions. For internal usage only.
-For internal use **only**
-
-___
-
-### \_Awaited
-
-Ƭ **\_Awaited**\<`T`\>: `T` extends ``null`` \| `undefined` ? `T` : `T` extends `object` & \{ `then`: (`onfulfilled`: `F`) => `any` } ? `F` extends (`value`: infer V, ...`args`: `any`) => `any` ? [`_Awaited`](pinia.md#_Awaited)\<`V`\> : `never` : `T`
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `T` |
-
-___
-
-### \_DeepPartial
-
-Ƭ **\_DeepPartial**\<`T`\>: \{ [K in keyof T]?: \_DeepPartial\<T[K]\> }
-
-Recursive `Partial<T>`. Used by [['$patch']](pinia.md#Store).
-
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `T` |
-
-___
-
-### \_ExtractActionsFromSetupStore
-
-Ƭ **\_ExtractActionsFromSetupStore**\<`SS`\>: `SS` extends `undefined` \| `void` ? {} : [`_ExtractActionsFromSetupStore_Keys`](pinia.md#_ExtractActionsFromSetupStore_Keys)\<`SS`\> extends keyof `SS` ? `Pick`\<`SS`, [`_ExtractActionsFromSetupStore_Keys`](pinia.md#_ExtractActionsFromSetupStore_Keys)\<`SS`\>\> : `never`
-
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### \_ExtractActionsFromSetupStore\_Keys
-
-Ƭ **\_ExtractActionsFromSetupStore\_Keys**\<`SS`\>: keyof \{ [K in keyof SS as SS[K] extends \_Method ? K : never]: any }
-
-Type that enables refactoring through IDE.
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### \_ExtractGettersFromSetupStore
-
-Ƭ **\_ExtractGettersFromSetupStore**\<`SS`\>: `SS` extends `undefined` \| `void` ? {} : [`_ExtractGettersFromSetupStore_Keys`](pinia.md#_ExtractGettersFromSetupStore_Keys)\<`SS`\> extends keyof `SS` ? `Pick`\<`SS`, [`_ExtractGettersFromSetupStore_Keys`](pinia.md#_ExtractGettersFromSetupStore_Keys)\<`SS`\>\> : `never`
-
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### \_ExtractGettersFromSetupStore\_Keys
-
-Ƭ **\_ExtractGettersFromSetupStore\_Keys**\<`SS`\>: keyof \{ [K in keyof SS as SS[K] extends ComputedRef ? K : never]: any }
-
-Type that enables refactoring through IDE.
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### \_ExtractStateFromSetupStore
-
-Ƭ **\_ExtractStateFromSetupStore**\<`SS`\>: `SS` extends `undefined` \| `void` ? {} : [`_ExtractStateFromSetupStore_Keys`](pinia.md#_ExtractStateFromSetupStore_Keys)\<`SS`\> extends keyof `SS` ? [`_UnwrapAll`](pinia.md#_UnwrapAll)\<`Pick`\<`SS`, [`_ExtractStateFromSetupStore_Keys`](pinia.md#_ExtractStateFromSetupStore_Keys)\<`SS`\>\>\> : `never`
-
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### \_ExtractStateFromSetupStore\_Keys
-
-Ƭ **\_ExtractStateFromSetupStore\_Keys**\<`SS`\>: keyof \{ [K in keyof SS as SS[K] extends \_Method \| ComputedRef ? never : K]: any }
-
-Type that enables refactoring through IDE.
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-___
-
-### \_GettersTree
-
-Ƭ **\_GettersTree**\<`S`\>: `Record`\<`string`, (`state`: `UnwrapRef`\<`S`\> & `UnwrapRef`\<[`PiniaCustomStateProperties`](../interfaces/pinia.PiniaCustomStateProperties.md)\<`S`\>\>) => `any` \| () => `any`\>
-
-Type of an object of Getters that infers the argument. For internal usage only.
-For internal use **only**
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-
-___
-
-### \_MapActionsObjectReturn
-
-Ƭ **\_MapActionsObjectReturn**\<`A`, `T`\>: \{ [key in keyof T]: A[T[key]] }
-
-For internal use **only**
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `A` | `A` |
-| `T` | extends `Record`\<`string`, keyof `A`\> |
-
-___
-
-### \_MapActionsReturn
-
-Ƭ **\_MapActionsReturn**\<`A`\>: \{ [key in keyof A]: A[key] }
-
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `A` |
-
-___
-
-### \_MapStateObjectReturn
-
-Ƭ **\_MapStateObjectReturn**\<`Id`, `S`, `G`, `A`, `T`\>: \{ [key in keyof T]: Function }
-
-For internal use **only**
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> \| \{ `[key: string]`: `ComputedRef`; } |
-| `A` | `A` |
-| `T` | extends `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)\<`Id`, `S`, `G`, `A`\>) => `any`\> = {} |
-
-___
-
-### \_MapStateReturn
-
-Ƭ **\_MapStateReturn**\<`S`, `G`, `Keys`\>: \{ [key in Keys]: Function }
-
-For internal use **only**
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> \| \{ `[key: string]`: `ComputedRef`; } |
-| `Keys` | extends keyof `S` \| keyof `G` = keyof `S` \| keyof `G` |
-
-___
-
-### \_MapWritableStateObjectReturn
-
-Ƭ **\_MapWritableStateObjectReturn**\<`S`, `T`\>: \{ [key in keyof T]: Object }
-
-For internal use **only**
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `T` | extends `Record`\<`string`, keyof `S`\> |
-
-___
-
-### \_MapWritableStateReturn
-
-Ƭ **\_MapWritableStateReturn**\<`S`\>: \{ [key in keyof S]: Object }
-
-For internal use **only**
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-
-___
-
-### \_Method
-
-Ƭ **\_Method**: (...`args`: `any`[]) => `any`
-
-Generic type for a function that can infer arguments and return type
-
-For internal use **only**
-
-#### Type declaration
-
-▸ (`...args`): `any`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `...args` | `any`[] |
-
-##### Returns
-
-`any`
-
-___
-
-### \_Spread
-
-Ƭ **\_Spread**\<`A`\>: `A` extends [infer L, ...(infer R)] ? [`_StoreObject`](pinia.md#_StoreObject)\<`L`\> & [`_Spread`](pinia.md#_Spread)\<`R`\> : `unknown`
-
-For internal use **only**.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `A` | extends readonly `any`[] |
-
-___
-
-### \_StoreObject
-
-Ƭ **\_StoreObject**\<`S`\>: `S` extends [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<infer Ids, infer State, infer Getters, infer Actions\> ? \{ [Id in \`$\{Ids}$\{MapStoresCustomization extends Record\<"suffix", infer Suffix\> ? Suffix : "Store"}\`]: Function } : {}
-
-For internal use **only**.
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `S` |
-
-___
-
-### \_StoreWithActions
-
-Ƭ **\_StoreWithActions**\<`A`\>: \{ [k in keyof A]: A[k] extends Function ? Function : never }
-
-Store augmented for actions. For internal usage only.
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `A` |
-
-___
-
-### \_StoreWithGetters
-
-Ƭ **\_StoreWithGetters**\<`G`\>: \{ readonly [k in keyof G]: G[k] extends Function ? R : UnwrapRef\<G[k]\> }
-
-Store augmented with getters. For internal usage only.
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `G` |
-
-___
-
-### \_UnwrapAll
-
-Ƭ **\_UnwrapAll**\<`SS`\>: \{ [K in keyof SS]: UnwrapRef\<SS[K]\> }
-
-Type that enables refactoring through IDE.
-For internal use **only**
-
-#### Type parameters
-
-| Name |
-| :------ |
-| `SS` |
-
-## Variables
-
-### PiniaVuePlugin
-
-• `Const` **PiniaVuePlugin**: `Plugin`
-
-Vue 2 Plugin that must be installed for pinia to work. Note **you don't need
-this plugin if you are using Nuxt.js**. Use the `buildModule` instead:
-https://pinia.vuejs.org/ssr/nuxt.html.
-
-**`Example`**
-
-```js
-import Vue from 'vue'
-import { PiniaVuePlugin, createPinia } from 'pinia'
-
-Vue.use(PiniaVuePlugin)
-const pinia = createPinia()
-
-new Vue({
- el: '#app',
- // ...
- pinia,
-})
-```
-
-**`Param`**
-
-`Vue` imported from 'vue'.
-
-## Functions
-
-### acceptHMRUpdate
-
-▸ **acceptHMRUpdate**\<`Id`, `S`, `G`, `A`\>(`initialUseStore`, `hot`): (`newModule`: `any`) => `any`
-
-Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` = `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) = [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> = [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> |
-| `A` | [`_ActionsTree`](pinia.md#_ActionsTree) |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `initialUseStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | return of the defineStore to hot update |
-| `hot` | `any` | `import.meta.hot` |
-
-#### Returns
-
-`fn`
-
-▸ (`newModule`): `any`
-
-##### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `newModule` | `any` |
-
-##### Returns
-
-`any`
-
-**`Example`**
-
-```js
-const useUser = defineStore(...)
-if (import.meta.hot) {
- import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))
-}
-```
-
-___
-
-### createPinia
-
-▸ **createPinia**(): [`Pinia`](../interfaces/pinia.Pinia.md)
-
-Creates a Pinia instance to be used by the application
-
-#### Returns
-
-[`Pinia`](../interfaces/pinia.Pinia.md)
-
-___
-
-### defineStore
-
-▸ **defineStore**\<`Id`, `S`, `G`, `A`\>(`id`, `options`): [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
-
-Creates a `useStore` function that retrieves the store instance
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) = {} |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> = {} |
-| `A` | {} |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `id` | `Id` | id of the store (must be unique) |
-| `options` | `Omit`\<[`DefineStoreOptions`](../interfaces/pinia.DefineStoreOptions.md)\<`Id`, `S`, `G`, `A`\>, ``"id"``\> | options to define the store |
-
-#### Returns
-
-[`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
-
-▸ **defineStore**\<`Id`, `S`, `G`, `A`\>(`options`): [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
-
-Creates a `useStore` function that retrieves the store instance
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) = {} |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> = {} |
-| `A` | {} |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `options` | [`DefineStoreOptions`](../interfaces/pinia.DefineStoreOptions.md)\<`Id`, `S`, `G`, `A`\> | options to define the store |
-
-#### Returns
-
-[`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
-
-▸ **defineStore**\<`Id`, `SS`\>(`id`, `storeSetup`, `options?`): [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, [`_ExtractStateFromSetupStore`](pinia.md#_ExtractStateFromSetupStore)\<`SS`\>, [`_ExtractGettersFromSetupStore`](pinia.md#_ExtractGettersFromSetupStore)\<`SS`\>, [`_ExtractActionsFromSetupStore`](pinia.md#_ExtractActionsFromSetupStore)\<`SS`\>\>
-
-Creates a `useStore` function that retrieves the store instance
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `SS` | `SS` |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `id` | `Id` | id of the store (must be unique) |
-| `storeSetup` | () => `SS` | function that defines the store |
-| `options?` | [`DefineSetupStoreOptions`](../interfaces/pinia.DefineSetupStoreOptions.md)\<`Id`, [`_ExtractStateFromSetupStore`](pinia.md#_ExtractStateFromSetupStore)\<`SS`\>, [`_ExtractGettersFromSetupStore`](pinia.md#_ExtractGettersFromSetupStore)\<`SS`\>, [`_ExtractActionsFromSetupStore`](pinia.md#_ExtractActionsFromSetupStore)\<`SS`\>\> | extra options |
-
-#### Returns
-
-[`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, [`_ExtractStateFromSetupStore`](pinia.md#_ExtractStateFromSetupStore)\<`SS`\>, [`_ExtractGettersFromSetupStore`](pinia.md#_ExtractGettersFromSetupStore)\<`SS`\>, [`_ExtractActionsFromSetupStore`](pinia.md#_ExtractActionsFromSetupStore)\<`SS`\>\>
-
-___
-
-### disposePinia
-
-▸ **disposePinia**(`pinia`): `void`
-
-Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly
-useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.
-Once disposed, the pinia instance cannot be used anymore.
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `pinia` | [`Pinia`](../interfaces/pinia.Pinia.md) | pinia instance |
-
-#### Returns
-
-`void`
-
-___
-
-### getActivePinia
-
-▸ **getActivePinia**(): `undefined` \| [`Pinia`](../interfaces/pinia.Pinia.md)
-
-Get the currently active pinia if there is any.
-
-#### Returns
-
-`undefined` \| [`Pinia`](../interfaces/pinia.Pinia.md)
-
-___
-
-### mapActions
-
-▸ **mapActions**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapActionsObjectReturn`](pinia.md#_MapActionsObjectReturn)\<`A`, `KeyMapper`\>
-
-Allows directly using actions from your store without using the composition
-API (`setup()`) by generating an object to be spread in the `methods` field
-of a component. The values of the object are the actions while the keys are
-the names of the resulting methods.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> |
-| `A` | `A` |
-| `KeyMapper` | extends `Record`\<`string`, keyof `A`\> |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | store to map from |
-| `keyMapper` | `KeyMapper` | object to define new names for the actions |
-
-#### Returns
-
-[`_MapActionsObjectReturn`](pinia.md#_MapActionsObjectReturn)\<`A`, `KeyMapper`\>
-
-**`Example`**
-
-```js
-export default {
- methods: {
- // other methods properties
- // useCounterStore has two actions named `increment` and `setCount`
- ...mapActions(useCounterStore, { moar: 'increment', setIt: 'setCount' })
- },
-
- created() {
- this.moar()
- this.setIt(2)
- }
-}
-```
-
-▸ **mapActions**\<`Id`, `S`, `G`, `A`\>(`useStore`, `keys`): [`_MapActionsReturn`](pinia.md#_MapActionsReturn)\<`A`\>
-
-Allows directly using actions from your store without using the composition
-API (`setup()`) by generating an object to be spread in the `methods` field
-of a component.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> |
-| `A` | `A` |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | store to map from |
-| `keys` | keyof `A`[] | array of action names to map |
-
-#### Returns
-
-[`_MapActionsReturn`](pinia.md#_MapActionsReturn)\<`A`\>
-
-**`Example`**
-
-```js
-export default {
- methods: {
- // other methods properties
- ...mapActions(useCounterStore, ['increment', 'setCount'])
- },
-
- created() {
- this.increment()
- this.setCount(2) // pass arguments as usual
- }
-}
-```
-
-___
-
-### mapGetters
-
-▸ **mapGetters**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
-
-Alias for `mapState()`. You should use `mapState()` instead.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> \| \{ `[key: string]`: `ComputedRef`; } |
-| `A` | `A` |
-| `KeyMapper` | extends `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)\<`Id`, `S`, `G`, `A`\>) => `any`\> |
-
-#### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> |
-| `keyMapper` | `KeyMapper` |
-
-#### Returns
-
-[`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
-
-**`Deprecated`**
-
-use `mapState()` instead.
-
-▸ **mapGetters**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): [`_MapStateReturn`](pinia.md#_MapStateReturn)\<`S`, `G`, `Keys`\>
-
-Alias for `mapState()`. You should use `mapState()` instead.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> \| \{ `[key: string]`: `ComputedRef`; } |
-| `A` | `A` |
-| `Keys` | extends `string` \| `number` \| `symbol` |
-
-#### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> |
-| `keys` | readonly `Keys`[] |
-
-#### Returns
-
-[`_MapStateReturn`](pinia.md#_MapStateReturn)\<`S`, `G`, `Keys`\>
-
-**`Deprecated`**
-
-use `mapState()` instead.
-
-___
-
-### mapState
-
-▸ **mapState**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
-
-Allows using state and getters from one store without using the composition
-API (`setup()`) by generating an object to be spread in the `computed` field
-of a component. The values of the object are the state properties/getters
-while the keys are the names of the resulting computed properties.
-Optionally, you can also pass a custom function that will receive the store
-as its first argument. Note that while it has access to the component
-instance via `this`, it won't be typed.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> \| \{ `[key: string]`: `ComputedRef`; } |
-| `A` | `A` |
-| `KeyMapper` | extends `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)\<`Id`, `S`, `G`, `A`\>) => `any`\> |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | store to map from |
-| `keyMapper` | `KeyMapper` | object of state properties or getters |
-
-#### Returns
-
-[`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
-
-**`Example`**
-
-```js
-export default {
- computed: {
- // other computed properties
- // useCounterStore has a state property named `count` and a getter `double`
- ...mapState(useCounterStore, {
- n: 'count',
- triple: store => store.n * 3,
- // note we can't use an arrow function if we want to use `this`
- custom(store) {
- return this.someComponentValue + store.n
- },
- doubleN: 'double'
- })
- },
-
- created() {
- this.n // 2
- this.doubleN // 4
- }
-}
-```
-
-▸ **mapState**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): [`_MapStateReturn`](pinia.md#_MapStateReturn)\<`S`, `G`, `Keys`\>
-
-Allows using state and getters from one store without using the composition
-API (`setup()`) by generating an object to be spread in the `computed` field
-of a component.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> \| \{ `[key: string]`: `ComputedRef`; } |
-| `A` | `A` |
-| `Keys` | extends `string` \| `number` \| `symbol` |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | store to map from |
-| `keys` | readonly `Keys`[] | array of state properties or getters |
-
-#### Returns
-
-[`_MapStateReturn`](pinia.md#_MapStateReturn)\<`S`, `G`, `Keys`\>
-
-**`Example`**
-
-```js
-export default {
- computed: {
- // other computed properties
- ...mapState(useCounterStore, ['count', 'double'])
- },
-
- created() {
- this.count // 2
- this.double // 4
- }
-}
-```
-
-___
-
-### mapStores
-
-▸ **mapStores**\<`Stores`\>(`...stores`): [`_Spread`](pinia.md#_Spread)\<`Stores`\>
-
-Allows using stores without the composition API (`setup()`) by generating an
-object to be spread in the `computed` field of a component. It accepts a list
-of store definitions.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Stores` | extends `any`[] |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `...stores` | [...Stores[]] | list of stores to map to an object |
-
-#### Returns
-
-[`_Spread`](pinia.md#_Spread)\<`Stores`\>
-
-**`Example`**
-
-```js
-export default {
- computed: {
- // other computed properties
- ...mapStores(useUserStore, useCartStore)
- },
-
- created() {
- this.userStore // store with id "user"
- this.cartStore // store with id "cart"
- }
-}
-```
-
-___
-
-### mapWritableState
-
-▸ **mapWritableState**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapWritableStateObjectReturn`](pinia.md#_MapWritableStateObjectReturn)\<`S`, `KeyMapper`\>
-
-Same as `mapState()` but creates computed setters as well so the state can be
-modified. Differently from `mapState()`, only `state` properties can be
-added.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> |
-| `A` | `A` |
-| `KeyMapper` | extends `Record`\<`string`, keyof `S`\> |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | store to map from |
-| `keyMapper` | `KeyMapper` | object of state properties |
-
-#### Returns
-
-[`_MapWritableStateObjectReturn`](pinia.md#_MapWritableStateObjectReturn)\<`S`, `KeyMapper`\>
-
-▸ **mapWritableState**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): \{ [K in Keys]: Object }
-
-Allows using state and getters from one store without using the composition
-API (`setup()`) by generating an object to be spread in the `computed` field
-of a component.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](pinia.md#StateTree) |
-| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> |
-| `A` | `A` |
-| `Keys` | extends `string` \| `number` \| `symbol` |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | store to map from |
-| `keys` | readonly `Keys`[] | array of state properties |
-
-#### Returns
-
-\{ [K in Keys]: Object }
-
-___
-
-### setActivePinia
-
-▸ **setActivePinia**(`pinia`): [`Pinia`](../interfaces/pinia.Pinia.md)
-
-Sets or unsets the active pinia. Used in SSR and internally when calling
-actions and getters
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `pinia` | [`Pinia`](../interfaces/pinia.Pinia.md) | Pinia instance |
-
-#### Returns
-
-[`Pinia`](../interfaces/pinia.Pinia.md)
-
-▸ **setActivePinia**(`pinia`): `undefined`
-
-Sets or unsets the active pinia. Used in SSR and internally when calling
-actions and getters
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `pinia` | `undefined` | Pinia instance |
-
-#### Returns
-
-`undefined`
-
-▸ **setActivePinia**(`pinia`): `undefined` \| [`Pinia`](../interfaces/pinia.Pinia.md)
-
-Sets or unsets the active pinia. Used in SSR and internally when calling
-actions and getters
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `pinia` | `undefined` \| [`Pinia`](../interfaces/pinia.Pinia.md) | Pinia instance |
-
-#### Returns
-
-`undefined` \| [`Pinia`](../interfaces/pinia.Pinia.md)
-
-___
-
-### setMapStoreSuffix
-
-▸ **setMapStoreSuffix**(`suffix`): `void`
-
-Changes the suffix added by `mapStores()`. Can be set to an empty string.
-Defaults to `"Store"`. Make sure to extend the MapStoresCustomization
-interface if you are using TypeScript.
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `suffix` | `string` | new suffix |
-
-#### Returns
-
-`void`
-
-___
-
-### skipHydrate
-
-▸ **skipHydrate**\<`T`\>(`obj`): `T`
-
-Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a
-stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `T` | `any` |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `obj` | `T` | target object |
-
-#### Returns
-
-`T`
-
-obj
-
-___
-
-### storeToRefs
-
-▸ **storeToRefs**\<`SS`\>(`store`): `StoreToRefs`\<`SS`\>
-
-Creates an object of references with all the state, getters, and plugin-added
-state properties of the store. Similar to `toRefs()` but specifically
-designed for Pinia stores so methods and non reactive properties are
-completely ignored.
-
-#### Type parameters
-
-| Name | Type |
-| :------ | :------ |
-| `SS` | extends [`StoreGeneric`](pinia.md#StoreGeneric) |
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `store` | `SS` | store to extract the refs from |
-
-#### Returns
-
-`StoreToRefs`\<`SS`\>
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / @pinia/nuxt
-
-# Module: @pinia/nuxt
-
-## Interfaces
-
-- [ModuleOptions](../interfaces/pinia_nuxt.ModuleOptions.md)
-
-## Functions
-
-### default
-
-▸ **default**(`this`, `inlineOptions`, `nuxt`): `_ModuleSetupReturn`
-
-#### Parameters
-
-| Name | Type |
-| :------ | :------ |
-| `this` | `void` |
-| `inlineOptions` | [`ModuleOptions`](../interfaces/pinia_nuxt.ModuleOptions.md) |
-| `nuxt` | `Nuxt` |
-
-#### Returns
-
-`_ModuleSetupReturn`
+++ /dev/null
----
-editLink: false
----
-
-[API Documentation](../index.md) / @pinia/testing
-
-# Module: @pinia/testing
-
-## Interfaces
-
-- [TestingOptions](../interfaces/pinia_testing.TestingOptions.md)
-- [TestingPinia](../interfaces/pinia_testing.TestingPinia.md)
-
-## Functions
-
-### createTestingPinia
-
-▸ **createTestingPinia**(`options?`): [`TestingPinia`](../interfaces/pinia_testing.TestingPinia.md)
-
-Creates a pinia instance designed for unit tests that **requires mocking**
-the stores. By default, **all actions are mocked** and therefore not
-executed. This allows you to unit test your store and components separately.
-You can change this with the `stubActions` option. If you are using jest,
-they are replaced with `jest.fn()`, otherwise, you must provide your own
-`createSpy` option.
-
-#### Parameters
-
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `options` | [`TestingOptions`](../interfaces/pinia_testing.TestingOptions.md) | options to configure the testing pinia |
-
-#### Returns
-
-[`TestingPinia`](../interfaces/pinia_testing.TestingPinia.md)
-
-a augmented pinia instance
editLink: false
---
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / MutationType
+[**API Documentation**](../../index.md) • **Docs**
-# Enumeration: MutationType
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / MutationType
-[pinia](../modules/pinia.md).MutationType
+# Enumeration: MutationType
Possible types for SubscriptionCallback
### direct
-• **direct** = ``"direct"``
+> **direct**: `"direct"`
Direct mutation of the state:
- `store.$state.name = 'new name'`
- `store.list.push('new item')`
-___
+***
### patchFunction
-• **patchFunction** = ``"patch function"``
+> **patchFunction**: `"patch function"`
Mutated the state with `$patch` and a function
- `store.$patch(state => state.name = 'newName')`
-___
+***
### patchObject
-• **patchObject** = ``"patch object"``
+> **patchObject**: `"patch object"`
Mutated the state with `$patch` and an object
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / acceptHMRUpdate
+
+# Function: acceptHMRUpdate()
+
+> **acceptHMRUpdate**\<`Id`, `S`, `G`, `A`\>(`initialUseStore`, `hot`): (`newModule`) => `any`
+
+Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.
+
+## Type Parameters
+
+• **Id** *extends* `string` = `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md) = [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\> = [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A** = [`_ActionsTree`](../type-aliases/ActionsTree.md)
+
+## Parameters
+
+• **initialUseStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+return of the defineStore to hot update
+
+• **hot**: `any`
+
+`import.meta.hot`
+
+## Returns
+
+`Function`
+
+### Parameters
+
+• **newModule**: `any`
+
+### Returns
+
+`any`
+
+## Example
+
+```js
+const useUser = defineStore(...)
+if (import.meta.hot) {
+ import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))
+}
+```
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / createPinia
+
+# Function: createPinia()
+
+> **createPinia**(): [`Pinia`](../interfaces/Pinia.md)
+
+Creates a Pinia instance to be used by the application
+
+## Returns
+
+[`Pinia`](../interfaces/Pinia.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / defineStore
+
+# Function: defineStore()
+
+## defineStore(id, options)
+
+> **defineStore**\<`Id`, `S`, `G`, `A`\>(`id`, `options`): [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+Creates a `useStore` function that retrieves the store instance
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md) = `object`
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\> = `object`
+
+• **A** = `object`
+
+### Parameters
+
+• **id**: `Id`
+
+id of the store (must be unique)
+
+• **options**: `Omit`\<[`DefineStoreOptions`](../interfaces/DefineStoreOptions.md)\<`Id`, `S`, `G`, `A`\>, `"id"`\>
+
+options to define the store
+
+### Returns
+
+[`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+## defineStore(options)
+
+> **defineStore**\<`Id`, `S`, `G`, `A`\>(`options`): [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+Creates a `useStore` function that retrieves the store instance
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md) = `object`
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\> = `object`
+
+• **A** = `object`
+
+### Parameters
+
+• **options**: [`DefineStoreOptions`](../interfaces/DefineStoreOptions.md)\<`Id`, `S`, `G`, `A`\>
+
+options to define the store
+
+### Returns
+
+[`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+## defineStore(id, storeSetup, options)
+
+> **defineStore**\<`Id`, `SS`\>(`id`, `storeSetup`, `options`?): [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, [`_ExtractStateFromSetupStore`](../type-aliases/ExtractStateFromSetupStore.md)\<`SS`\>, [`_ExtractGettersFromSetupStore`](../type-aliases/ExtractGettersFromSetupStore.md)\<`SS`\>, [`_ExtractActionsFromSetupStore`](../type-aliases/ExtractActionsFromSetupStore.md)\<`SS`\>\>
+
+Creates a `useStore` function that retrieves the store instance
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **SS**
+
+### Parameters
+
+• **id**: `Id`
+
+id of the store (must be unique)
+
+• **storeSetup**
+
+function that defines the store
+
+• **options?**: [`DefineSetupStoreOptions`](../interfaces/DefineSetupStoreOptions.md)\<`Id`, [`_ExtractStateFromSetupStore`](../type-aliases/ExtractStateFromSetupStore.md)\<`SS`\>, [`_ExtractGettersFromSetupStore`](../type-aliases/ExtractGettersFromSetupStore.md)\<`SS`\>, [`_ExtractActionsFromSetupStore`](../type-aliases/ExtractActionsFromSetupStore.md)\<`SS`\>\>
+
+extra options
+
+### Returns
+
+[`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, [`_ExtractStateFromSetupStore`](../type-aliases/ExtractStateFromSetupStore.md)\<`SS`\>, [`_ExtractGettersFromSetupStore`](../type-aliases/ExtractGettersFromSetupStore.md)\<`SS`\>, [`_ExtractActionsFromSetupStore`](../type-aliases/ExtractActionsFromSetupStore.md)\<`SS`\>\>
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / disposePinia
+
+# Function: disposePinia()
+
+> **disposePinia**(`pinia`): `void`
+
+Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly
+useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.
+Once disposed, the pinia instance cannot be used anymore.
+
+## Parameters
+
+• **pinia**: [`Pinia`](../interfaces/Pinia.md)
+
+pinia instance
+
+## Returns
+
+`void`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / getActivePinia
+
+# Function: getActivePinia()
+
+> **getActivePinia**(): `undefined` \| [`Pinia`](../interfaces/Pinia.md)
+
+Get the currently active pinia if there is any.
+
+## Returns
+
+`undefined` \| [`Pinia`](../interfaces/Pinia.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / mapActions
+
+# Function: mapActions()
+
+Allows directly using actions from your store without using the composition
+API (`setup()`) by generating an object to be spread in the `methods` field
+of a component.
+
+## Param
+
+store to map from
+
+## Param
+
+array or object
+
+## mapActions(useStore, keyMapper)
+
+> **mapActions**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapActionsObjectReturn`](../type-aliases/MapActionsObjectReturn.md)\<`A`, `KeyMapper`\>
+
+Allows directly using actions from your store without using the composition
+API (`setup()`) by generating an object to be spread in the `methods` field
+of a component. The values of the object are the actions while the keys are
+the names of the resulting methods.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A**
+
+• **KeyMapper** *extends* `Record`\<`string`, keyof `A`\>
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keyMapper**: `KeyMapper`
+
+object to define new names for the actions
+
+### Returns
+
+[`_MapActionsObjectReturn`](../type-aliases/MapActionsObjectReturn.md)\<`A`, `KeyMapper`\>
+
+### Example
+
+```js
+export default {
+ methods: {
+ // other methods properties
+ // useCounterStore has two actions named `increment` and `setCount`
+ ...mapActions(useCounterStore, { moar: 'increment', setIt: 'setCount' })
+ },
+
+ created() {
+ this.moar()
+ this.setIt(2)
+ }
+}
+```
+
+## mapActions(useStore, keys)
+
+> **mapActions**\<`Id`, `S`, `G`, `A`\>(`useStore`, `keys`): [`_MapActionsReturn`](../type-aliases/MapActionsReturn.md)\<`A`\>
+
+Allows directly using actions from your store without using the composition
+API (`setup()`) by generating an object to be spread in the `methods` field
+of a component.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A**
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keys**: keyof `A`[]
+
+array of action names to map
+
+### Returns
+
+[`_MapActionsReturn`](../type-aliases/MapActionsReturn.md)\<`A`\>
+
+### Example
+
+```js
+export default {
+ methods: {
+ // other methods properties
+ ...mapActions(useCounterStore, ['increment', 'setCount'])
+ },
+
+ created() {
+ this.increment()
+ this.setCount(2) // pass arguments as usual
+ }
+}
+```
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / mapGetters
+
+# Function: ~~mapGetters()~~
+
+Alias for `mapState()`. You should use `mapState()` instead.
+
+## Deprecated
+
+use `mapState()` instead.
+
+## mapGetters(useStore, keyMapper)
+
+> **mapGetters**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapStateObjectReturn`](../type-aliases/MapStateObjectReturn.md)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
+
+Allows using state and getters from one store without using the composition
+API (`setup()`) by generating an object to be spread in the `computed` field
+of a component. The values of the object are the state properties/getters
+while the keys are the names of the resulting computed properties.
+Optionally, you can also pass a custom function that will receive the store
+as its first argument. Note that while it has access to the component
+instance via `this`, it won't be typed.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\> \| `object`
+
+• **A**
+
+• **KeyMapper** *extends* `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`) => `any`\>
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keyMapper**: `KeyMapper`
+
+object of state properties or getters
+
+### Returns
+
+[`_MapStateObjectReturn`](../type-aliases/MapStateObjectReturn.md)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
+
+### Example
+
+```js
+export default {
+ computed: {
+ // other computed properties
+ // useCounterStore has a state property named `count` and a getter `double`
+ ...mapState(useCounterStore, {
+ n: 'count',
+ triple: store => store.n * 3,
+ // note we can't use an arrow function if we want to use `this`
+ custom(store) {
+ return this.someComponentValue + store.n
+ },
+ doubleN: 'double'
+ })
+ },
+
+ created() {
+ this.n // 2
+ this.doubleN // 4
+ }
+}
+```
+
+## mapGetters(useStore, keys)
+
+> **mapGetters**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): [`_MapStateReturn`](../type-aliases/MapStateReturn.md)\<`S`, `G`, `Keys`\>
+
+Allows using state and getters from one store without using the composition
+API (`setup()`) by generating an object to be spread in the `computed` field
+of a component.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\> \| `object`
+
+• **A**
+
+• **Keys** *extends* `string` \| `number` \| `symbol`
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keys**: readonly `Keys`[]
+
+array of state properties or getters
+
+### Returns
+
+[`_MapStateReturn`](../type-aliases/MapStateReturn.md)\<`S`, `G`, `Keys`\>
+
+### Example
+
+```js
+export default {
+ computed: {
+ // other computed properties
+ ...mapState(useCounterStore, ['count', 'double'])
+ },
+
+ created() {
+ this.count // 2
+ this.double // 4
+ }
+}
+```
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / mapState
+
+# Function: mapState()
+
+Allows using state and getters from one store without using the composition
+API (`setup()`) by generating an object to be spread in the `computed` field
+of a component.
+
+## Param
+
+store to map from
+
+## Param
+
+array or object
+
+## mapState(useStore, keyMapper)
+
+> **mapState**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapStateObjectReturn`](../type-aliases/MapStateObjectReturn.md)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
+
+Allows using state and getters from one store without using the composition
+API (`setup()`) by generating an object to be spread in the `computed` field
+of a component. The values of the object are the state properties/getters
+while the keys are the names of the resulting computed properties.
+Optionally, you can also pass a custom function that will receive the store
+as its first argument. Note that while it has access to the component
+instance via `this`, it won't be typed.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\> \| `object`
+
+• **A**
+
+• **KeyMapper** *extends* `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`) => `any`\>
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keyMapper**: `KeyMapper`
+
+object of state properties or getters
+
+### Returns
+
+[`_MapStateObjectReturn`](../type-aliases/MapStateObjectReturn.md)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
+
+### Example
+
+```js
+export default {
+ computed: {
+ // other computed properties
+ // useCounterStore has a state property named `count` and a getter `double`
+ ...mapState(useCounterStore, {
+ n: 'count',
+ triple: store => store.n * 3,
+ // note we can't use an arrow function if we want to use `this`
+ custom(store) {
+ return this.someComponentValue + store.n
+ },
+ doubleN: 'double'
+ })
+ },
+
+ created() {
+ this.n // 2
+ this.doubleN // 4
+ }
+}
+```
+
+## mapState(useStore, keys)
+
+> **mapState**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): [`_MapStateReturn`](../type-aliases/MapStateReturn.md)\<`S`, `G`, `Keys`\>
+
+Allows using state and getters from one store without using the composition
+API (`setup()`) by generating an object to be spread in the `computed` field
+of a component.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\> \| `object`
+
+• **A**
+
+• **Keys** *extends* `string` \| `number` \| `symbol`
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keys**: readonly `Keys`[]
+
+array of state properties or getters
+
+### Returns
+
+[`_MapStateReturn`](../type-aliases/MapStateReturn.md)\<`S`, `G`, `Keys`\>
+
+### Example
+
+```js
+export default {
+ computed: {
+ // other computed properties
+ ...mapState(useCounterStore, ['count', 'double'])
+ },
+
+ created() {
+ this.count // 2
+ this.double // 4
+ }
+}
+```
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / mapStores
+
+# Function: mapStores()
+
+> **mapStores**\<`Stores`\>(...`stores`): [`_Spread`](../type-aliases/Spread.md)\<`Stores`\>
+
+Allows using stores without the composition API (`setup()`) by generating an
+object to be spread in the `computed` field of a component. It accepts a list
+of store definitions.
+
+## Type Parameters
+
+• **Stores** *extends* `any`[]
+
+## Parameters
+
+• ...**stores**: [`...Stores[]`]
+
+list of stores to map to an object
+
+## Returns
+
+[`_Spread`](../type-aliases/Spread.md)\<`Stores`\>
+
+## Example
+
+```js
+export default {
+ computed: {
+ // other computed properties
+ ...mapStores(useUserStore, useCartStore)
+ },
+
+ created() {
+ this.userStore // store with id "user"
+ this.cartStore // store with id "cart"
+ }
+}
+```
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / mapWritableState
+
+# Function: mapWritableState()
+
+Allows using state and getters from one store without using the composition
+API (`setup()`) by generating an object to be spread in the `computed` field
+of a component.
+
+## Param
+
+store to map from
+
+## Param
+
+array or object
+
+## mapWritableState(useStore, keyMapper)
+
+> **mapWritableState**\<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapWritableStateObjectReturn`](../type-aliases/MapWritableStateObjectReturn.md)\<`S`, `KeyMapper`\>
+
+Same as `mapState()` but creates computed setters as well so the state can be
+modified. Differently from `mapState()`, only `state` properties can be
+added.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A**
+
+• **KeyMapper** *extends* `Record`\<`string`, keyof `S`\>
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keyMapper**: `KeyMapper`
+
+object of state properties
+
+### Returns
+
+[`_MapWritableStateObjectReturn`](../type-aliases/MapWritableStateObjectReturn.md)\<`S`, `KeyMapper`\>
+
+## mapWritableState(useStore, keys)
+
+> **mapWritableState**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): `{ [K in Keys]: Object }`
+
+Allows using state and getters from one store without using the composition
+API (`setup()`) by generating an object to be spread in the `computed` field
+of a component.
+
+### Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** *extends* [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A**
+
+• **Keys** *extends* `string` \| `number` \| `symbol`
+
+### Parameters
+
+• **useStore**: [`StoreDefinition`](../interfaces/StoreDefinition.md)\<`Id`, `S`, `G`, `A`\>
+
+store to map from
+
+• **keys**: readonly `Keys`[]
+
+array of state properties
+
+### Returns
+
+`{ [K in Keys]: Object }`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / setActivePinia
+
+# Function: setActivePinia()
+
+Sets or unsets the active pinia. Used in SSR and internally when calling
+actions and getters
+
+## Param
+
+Pinia instance
+
+## setActivePinia(pinia)
+
+> **setActivePinia**(`pinia`): [`Pinia`](../interfaces/Pinia.md)
+
+Sets or unsets the active pinia. Used in SSR and internally when calling
+actions and getters
+
+### Parameters
+
+• **pinia**: [`Pinia`](../interfaces/Pinia.md)
+
+### Returns
+
+[`Pinia`](../interfaces/Pinia.md)
+
+## setActivePinia(pinia)
+
+> **setActivePinia**(`pinia`): `undefined`
+
+Sets or unsets the active pinia. Used in SSR and internally when calling
+actions and getters
+
+### Parameters
+
+• **pinia**: `undefined`
+
+### Returns
+
+`undefined`
+
+## setActivePinia(pinia)
+
+> **setActivePinia**(`pinia`): `undefined` \| [`Pinia`](../interfaces/Pinia.md)
+
+Sets or unsets the active pinia. Used in SSR and internally when calling
+actions and getters
+
+### Parameters
+
+• **pinia**: `undefined` \| [`Pinia`](../interfaces/Pinia.md)
+
+### Returns
+
+`undefined` \| [`Pinia`](../interfaces/Pinia.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / setMapStoreSuffix
+
+# Function: setMapStoreSuffix()
+
+> **setMapStoreSuffix**(`suffix`): `void`
+
+Changes the suffix added by `mapStores()`. Can be set to an empty string.
+Defaults to `"Store"`. Make sure to extend the MapStoresCustomization
+interface if you are using TypeScript.
+
+## Parameters
+
+• **suffix**: `string`
+
+new suffix
+
+## Returns
+
+`void`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / skipHydrate
+
+# Function: skipHydrate()
+
+> **skipHydrate**\<`T`\>(`obj`): `T`
+
+Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a
+stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.
+
+## Type Parameters
+
+• **T** = `any`
+
+## Parameters
+
+• **obj**: `T`
+
+target object
+
+## Returns
+
+`T`
+
+obj
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / storeToRefs
+
+# Function: storeToRefs()
+
+> **storeToRefs**\<`SS`\>(`store`): `StoreToRefs`\<`SS`\>
+
+Creates an object of references with all the state, getters, and plugin-added
+state properties of the store. Similar to `toRefs()` but specifically
+designed for Pinia stores so methods and non reactive properties are
+completely ignored.
+
+## Type Parameters
+
+• **SS** *extends* [`StoreGeneric`](../type-aliases/StoreGeneric.md)
+
+## Parameters
+
+• **store**: `SS`
+
+store to extract the refs from
+
+## Returns
+
+`StoreToRefs`\<`SS`\>
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../index.md) • **Docs**
+
+***
+
+[API Documentation](../index.md) / pinia
+
+# pinia
+
+## Index
+
+### Enumerations
+
+- [MutationType](enumerations/MutationType.md)
+
+### Interfaces
+
+- [DefineSetupStoreOptions](interfaces/DefineSetupStoreOptions.md)
+- [DefineStoreOptions](interfaces/DefineStoreOptions.md)
+- [DefineStoreOptionsBase](interfaces/DefineStoreOptionsBase.md)
+- [DefineStoreOptionsInPlugin](interfaces/DefineStoreOptionsInPlugin.md)
+- [MapStoresCustomization](interfaces/MapStoresCustomization.md)
+- [Pinia](interfaces/Pinia.md)
+- [PiniaCustomProperties](interfaces/PiniaCustomProperties.md)
+- [PiniaCustomStateProperties](interfaces/PiniaCustomStateProperties.md)
+- [PiniaPlugin](interfaces/PiniaPlugin.md)
+- [PiniaPluginContext](interfaces/PiniaPluginContext.md)
+- [SetupStoreDefinition](interfaces/SetupStoreDefinition.md)
+- [StoreDefinition](interfaces/StoreDefinition.md)
+- [StoreProperties](interfaces/StoreProperties.md)
+- [SubscriptionCallbackMutationDirect](interfaces/SubscriptionCallbackMutationDirect.md)
+- [SubscriptionCallbackMutationPatchFunction](interfaces/SubscriptionCallbackMutationPatchFunction.md)
+- [SubscriptionCallbackMutationPatchObject](interfaces/SubscriptionCallbackMutationPatchObject.md)
+- [\_StoreOnActionListenerContext](interfaces/StoreOnActionListenerContext.md)
+- [\_StoreWithState](interfaces/StoreWithState.md)
+- [\_SubscriptionCallbackMutationBase](interfaces/SubscriptionCallbackMutationBase.md)
+
+### Type Aliases
+
+- [PiniaStorePlugin](type-aliases/PiniaStorePlugin.md)
+- [StateTree](type-aliases/StateTree.md)
+- [Store](type-aliases/Store.md)
+- [StoreActions](type-aliases/StoreActions.md)
+- [StoreGeneric](type-aliases/StoreGeneric.md)
+- [StoreGetters](type-aliases/StoreGetters.md)
+- [StoreOnActionListener](type-aliases/StoreOnActionListener.md)
+- [StoreOnActionListenerContext](type-aliases/StoreOnActionListenerContext.md)
+- [StoreState](type-aliases/StoreState.md)
+- [SubscriptionCallback](type-aliases/SubscriptionCallback.md)
+- [SubscriptionCallbackMutation](type-aliases/SubscriptionCallbackMutation.md)
+- [\_ActionsTree](type-aliases/ActionsTree.md)
+- [\_Awaited](type-aliases/Awaited.md)
+- [\_DeepPartial](type-aliases/DeepPartial.md)
+- [\_ExtractActionsFromSetupStore](type-aliases/ExtractActionsFromSetupStore.md)
+- [\_ExtractActionsFromSetupStore\_Keys](type-aliases/ExtractActionsFromSetupStore_Keys.md)
+- [\_ExtractGettersFromSetupStore](type-aliases/ExtractGettersFromSetupStore.md)
+- [\_ExtractGettersFromSetupStore\_Keys](type-aliases/ExtractGettersFromSetupStore_Keys.md)
+- [\_ExtractStateFromSetupStore](type-aliases/ExtractStateFromSetupStore.md)
+- [\_ExtractStateFromSetupStore\_Keys](type-aliases/ExtractStateFromSetupStore_Keys.md)
+- [\_GettersTree](type-aliases/GettersTree.md)
+- [\_MapActionsObjectReturn](type-aliases/MapActionsObjectReturn.md)
+- [\_MapActionsReturn](type-aliases/MapActionsReturn.md)
+- [\_MapStateObjectReturn](type-aliases/MapStateObjectReturn.md)
+- [\_MapStateReturn](type-aliases/MapStateReturn.md)
+- [\_MapWritableStateObjectReturn](type-aliases/MapWritableStateObjectReturn.md)
+- [\_MapWritableStateReturn](type-aliases/MapWritableStateReturn.md)
+- [\_Method](type-aliases/Method.md)
+- [\_Spread](type-aliases/Spread.md)
+- [\_StoreObject](type-aliases/StoreObject.md)
+- [\_StoreWithActions](type-aliases/StoreWithActions.md)
+- [\_StoreWithGetters](type-aliases/StoreWithGetters.md)
+- [\_UnwrapAll](type-aliases/UnwrapAll.md)
+
+### Variables
+
+- [PiniaVuePlugin](variables/PiniaVuePlugin.md)
+
+### Functions
+
+- [acceptHMRUpdate](functions/acceptHMRUpdate.md)
+- [createPinia](functions/createPinia.md)
+- [defineStore](functions/defineStore.md)
+- [disposePinia](functions/disposePinia.md)
+- [getActivePinia](functions/getActivePinia.md)
+- [mapActions](functions/mapActions.md)
+- [mapGetters](functions/mapGetters.md)
+- [mapState](functions/mapState.md)
+- [mapStores](functions/mapStores.md)
+- [mapWritableState](functions/mapWritableState.md)
+- [setActivePinia](functions/setActivePinia.md)
+- [setMapStoreSuffix](functions/setMapStoreSuffix.md)
+- [skipHydrate](functions/skipHydrate.md)
+- [storeToRefs](functions/storeToRefs.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / DefineSetupStoreOptions
+
+# Interface: DefineSetupStoreOptions\<Id, S, G, A\>
+
+Options parameter of `defineStore()` for setup stores. Can be extended to
+augment stores with the plugin API.
+
+## See
+
+[DefineStoreOptionsBase](DefineStoreOptionsBase.md).
+
+## Extends
+
+- [`DefineStoreOptionsBase`](DefineStoreOptionsBase.md)\<`S`, [`Store`](../type-aliases/Store.md)\<`Id`, `S`, `G`, `A`\>\>
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G**
+
+• **A**
+
+## Properties
+
+### actions?
+
+> `optional` **actions**: `A`
+
+Extracted actions. Added by useStore(). SHOULD NOT be added by the user when
+creating the store. Can be used in plugins to get the list of actions in a
+store defined with a setup function. Note this is always defined
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / DefineStoreOptions
+
+# Interface: DefineStoreOptions\<Id, S, G, A\>
+
+Options parameter of `defineStore()` for option stores. Can be extended to
+augment stores with the plugin API.
+
+## See
+
+[DefineStoreOptionsBase](DefineStoreOptionsBase.md).
+
+## Extends
+
+- [`DefineStoreOptionsBase`](DefineStoreOptionsBase.md)\<`S`, [`Store`](../type-aliases/Store.md)\<`Id`, `S`, `G`, `A`\>\>
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G**
+
+• **A**
+
+## Properties
+
+### actions?
+
+> `optional` **actions**: `A` & `ThisType`\<`A` & `UnwrapRef`\<`S`\> & [`_StoreWithState`](StoreWithState.md)\<`Id`, `S`, `G`, `A`\> & [`_StoreWithGetters`](../type-aliases/StoreWithGetters.md)\<`G`\> & [`PiniaCustomProperties`](PiniaCustomProperties.md)\<`string`, [`StateTree`](../type-aliases/StateTree.md), [`_GettersTree`](../type-aliases/GettersTree.md)\<[`StateTree`](../type-aliases/StateTree.md)\>, [`_ActionsTree`](../type-aliases/ActionsTree.md)\>\>
+
+Optional object of actions.
+
+***
+
+### getters?
+
+> `optional` **getters**: `G` & `ThisType`\<`UnwrapRef`\<`S`\> & [`_StoreWithGetters`](../type-aliases/StoreWithGetters.md)\<`G`\> & [`PiniaCustomProperties`](PiniaCustomProperties.md)\<`string`, [`StateTree`](../type-aliases/StateTree.md), [`_GettersTree`](../type-aliases/GettersTree.md)\<[`StateTree`](../type-aliases/StateTree.md)\>, [`_ActionsTree`](../type-aliases/ActionsTree.md)\>\> & [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+Optional object of getters.
+
+***
+
+### id
+
+> **id**: `Id`
+
+Unique string key to identify the store across the application.
+
+***
+
+### state()?
+
+> `optional` **state**: () => `S`
+
+Function to create a fresh state. **Must be an arrow function** to ensure
+correct typings!
+
+#### Returns
+
+`S`
+
+## Methods
+
+### hydrate()?
+
+> `optional` **hydrate**(`storeState`, `initialState`): `void`
+
+Allows hydrating the store during SSR when complex state (like client side only refs) are used in the store
+definition and copying the value from `pinia.state` isn't enough.
+
+#### Parameters
+
+• **storeState**: `UnwrapRef`\<`S`\>
+
+the current state in the store
+
+• **initialState**: `UnwrapRef`\<`S`\>
+
+initialState
+
+#### Returns
+
+`void`
+
+#### Example
+
+If in your `state`, you use any `customRef`s, any `computed`s, or any `ref`s that have a different value on
+Server and Client, you need to manually hydrate them. e.g., a custom ref that is stored in the local
+storage:
+
+```ts
+const useStore = defineStore('main', {
+ state: () => ({
+ n: useLocalStorage('key', 0)
+ }),
+ hydrate(storeState, initialState) {
+ // @ts-expect-error: https://github.com/microsoft/TypeScript/issues/43826
+ storeState.n = useLocalStorage('key', 0)
+ }
+})
+```
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / DefineStoreOptionsBase
+
+# Interface: DefineStoreOptionsBase\<S, Store\>
+
+Options passed to `defineStore()` that are common between option and setup
+stores. Extend this interface if you want to add custom options to both kinds
+of stores.
+
+## Extended by
+
+- [`DefineStoreOptions`](DefineStoreOptions.md)
+- [`DefineSetupStoreOptions`](DefineSetupStoreOptions.md)
+
+## Type Parameters
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **Store**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / DefineStoreOptionsInPlugin
+
+# Interface: DefineStoreOptionsInPlugin\<Id, S, G, A\>
+
+Available `options` when creating a pinia plugin.
+
+## Extends
+
+- `Omit`\<[`DefineStoreOptions`](DefineStoreOptions.md)\<`Id`, `S`, `G`, `A`\>, `"id"` \| `"actions"`\>
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G**
+
+• **A**
+
+## Properties
+
+### actions
+
+> **actions**: `A`
+
+Extracted object of actions. Added by useStore() when the store is built
+using the setup API, otherwise uses the one passed to `defineStore()`.
+Defaults to an empty object if no actions are defined.
+
+***
+
+### getters?
+
+> `optional` **getters**: `G` & `ThisType`\<`UnwrapRef`\<`S`\> & [`_StoreWithGetters`](../type-aliases/StoreWithGetters.md)\<`G`\> & [`PiniaCustomProperties`](PiniaCustomProperties.md)\<`string`, [`StateTree`](../type-aliases/StateTree.md), [`_GettersTree`](../type-aliases/GettersTree.md)\<[`StateTree`](../type-aliases/StateTree.md)\>, [`_ActionsTree`](../type-aliases/ActionsTree.md)\>\> & [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+Optional object of getters.
+
+#### Inherited from
+
+`Omit.getters`
+
+***
+
+### state()?
+
+> `optional` **state**: () => `S`
+
+Function to create a fresh state. **Must be an arrow function** to ensure
+correct typings!
+
+#### Returns
+
+`S`
+
+#### Inherited from
+
+`Omit.state`
+
+## Methods
+
+### hydrate()?
+
+> `optional` **hydrate**(`storeState`, `initialState`): `void`
+
+Allows hydrating the store during SSR when complex state (like client side only refs) are used in the store
+definition and copying the value from `pinia.state` isn't enough.
+
+#### Parameters
+
+• **storeState**: `UnwrapRef`\<`S`\>
+
+the current state in the store
+
+• **initialState**: `UnwrapRef`\<`S`\>
+
+initialState
+
+#### Returns
+
+`void`
+
+#### Inherited from
+
+`Omit.hydrate`
+
+#### Example
+
+If in your `state`, you use any `customRef`s, any `computed`s, or any `ref`s that have a different value on
+Server and Client, you need to manually hydrate them. e.g., a custom ref that is stored in the local
+storage:
+
+```ts
+const useStore = defineStore('main', {
+ state: () => ({
+ n: useLocalStorage('key', 0)
+ }),
+ hydrate(storeState, initialState) {
+ // @ts-expect-error: https://github.com/microsoft/TypeScript/issues/43826
+ storeState.n = useLocalStorage('key', 0)
+ }
+})
+```
editLink: false
---
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / MapStoresCustomization
+[**API Documentation**](../../index.md) • **Docs**
-# Interface: MapStoresCustomization
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / MapStoresCustomization
-[pinia](../modules/pinia.md).MapStoresCustomization
+# Interface: MapStoresCustomization
Interface to allow customizing map helpers. Extend this interface with the
following properties:
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / Pinia
+
+# Interface: Pinia
+
+Every application must own its own pinia to be able to create stores
+
+## Extended by
+
+- [`TestingPinia`](../../@pinia/testing/interfaces/TestingPinia.md)
+
+## Properties
+
+### install()
+
+> **install**: (`app`) => `void`
+
+#### Parameters
+
+• **app**: `App`\<`any`\>
+
+#### Returns
+
+`void`
+
+***
+
+### state
+
+> **state**: `Ref`\<`Record`\<`string`, [`StateTree`](../type-aliases/StateTree.md)\>\>
+
+root state
+
+## Methods
+
+### use()
+
+> **use**(`plugin`): [`Pinia`](Pinia.md)
+
+Adds a store plugin to extend every store
+
+#### Parameters
+
+• **plugin**: [`PiniaPlugin`](PiniaPlugin.md)
+
+store plugin to add
+
+#### Returns
+
+[`Pinia`](Pinia.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / PiniaCustomProperties
+
+# Interface: PiniaCustomProperties\<Id, S, G, A\>
+
+Interface to be extended by the user when they add properties through plugins.
+
+## Type Parameters
+
+• **Id** *extends* `string` = `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md) = [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** = [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A** = [`_ActionsTree`](../type-aliases/ActionsTree.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / PiniaCustomStateProperties
+
+# Interface: PiniaCustomStateProperties\<S\>
+
+Properties that are added to every `store.$state` by `pinia.use()`.
+
+## Type Parameters
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md) = [`StateTree`](../type-aliases/StateTree.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / PiniaPlugin
+
+# Interface: PiniaPlugin()
+
+Plugin to extend every store.
+
+> **PiniaPlugin**(`context`): `void` \| `Partial`\<[`PiniaCustomProperties`](PiniaCustomProperties.md)\<`string`, [`StateTree`](../type-aliases/StateTree.md), [`_GettersTree`](../type-aliases/GettersTree.md)\<[`StateTree`](../type-aliases/StateTree.md)\>, [`_ActionsTree`](../type-aliases/ActionsTree.md)\> & [`PiniaCustomStateProperties`](PiniaCustomStateProperties.md)\<[`StateTree`](../type-aliases/StateTree.md)\>\>
+
+Plugin to extend every store. Returns an object to extend the store or
+nothing.
+
+## Parameters
+
+• **context**: [`PiniaPluginContext`](PiniaPluginContext.md)\<`string`, [`StateTree`](../type-aliases/StateTree.md), [`_GettersTree`](../type-aliases/GettersTree.md)\<[`StateTree`](../type-aliases/StateTree.md)\>, [`_ActionsTree`](../type-aliases/ActionsTree.md)\>
+
+Context
+
+## Returns
+
+`void` \| `Partial`\<[`PiniaCustomProperties`](PiniaCustomProperties.md)\<`string`, [`StateTree`](../type-aliases/StateTree.md), [`_GettersTree`](../type-aliases/GettersTree.md)\<[`StateTree`](../type-aliases/StateTree.md)\>, [`_ActionsTree`](../type-aliases/ActionsTree.md)\> & [`PiniaCustomStateProperties`](PiniaCustomStateProperties.md)\<[`StateTree`](../type-aliases/StateTree.md)\>\>
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / PiniaPluginContext
+
+# Interface: PiniaPluginContext\<Id, S, G, A\>
+
+Context argument passed to Pinia plugins.
+
+## Type Parameters
+
+• **Id** *extends* `string` = `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md) = [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** = [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A** = [`_ActionsTree`](../type-aliases/ActionsTree.md)
+
+## Properties
+
+### app
+
+> **app**: `App`\<`any`\>
+
+Current app created with `Vue.createApp()`.
+
+***
+
+### options
+
+> **options**: [`DefineStoreOptionsInPlugin`](DefineStoreOptionsInPlugin.md)\<`Id`, `S`, `G`, `A`\>
+
+Initial options defining the store when calling `defineStore()`.
+
+***
+
+### pinia
+
+> **pinia**: [`Pinia`](Pinia.md)
+
+pinia instance.
+
+***
+
+### store
+
+> **store**: [`Store`](../type-aliases/Store.md)\<`Id`, `S`, `G`, `A`\>
+
+Current store being extended.
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / SetupStoreDefinition
+
+# Interface: SetupStoreDefinition()\<Id, SS\>
+
+Return type of `defineStore()` with a setup function.
+- `Id` is a string literal of the store's name
+- `SS` is the return type of the setup function
+
+## See
+
+[StoreDefinition](StoreDefinition.md)
+
+## Extends
+
+- [`StoreDefinition`](StoreDefinition.md)\<`Id`, [`_ExtractStateFromSetupStore`](../type-aliases/ExtractStateFromSetupStore.md)\<`SS`\>, [`_ExtractGettersFromSetupStore`](../type-aliases/ExtractGettersFromSetupStore.md)\<`SS`\>, [`_ExtractActionsFromSetupStore`](../type-aliases/ExtractActionsFromSetupStore.md)\<`SS`\>\>
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+• **SS**
+
+> **SetupStoreDefinition**(`pinia`?, `hot`?): [`Store`](../type-aliases/Store.md)\<`Id`, [`_ExtractStateFromSetupStore`](../type-aliases/ExtractStateFromSetupStore.md)\<`SS`\>, [`_ExtractGettersFromSetupStore`](../type-aliases/ExtractGettersFromSetupStore.md)\<`SS`\>, [`_ExtractActionsFromSetupStore`](../type-aliases/ExtractActionsFromSetupStore.md)\<`SS`\>\>
+
+Returns a store, creates it if necessary.
+
+## Parameters
+
+• **pinia?**: `null` \| [`Pinia`](Pinia.md)
+
+Pinia instance to retrieve the store
+
+• **hot?**: [`StoreGeneric`](../type-aliases/StoreGeneric.md)
+
+dev only hot module replacement
+
+## Returns
+
+[`Store`](../type-aliases/Store.md)\<`Id`, [`_ExtractStateFromSetupStore`](../type-aliases/ExtractStateFromSetupStore.md)\<`SS`\>, [`_ExtractGettersFromSetupStore`](../type-aliases/ExtractGettersFromSetupStore.md)\<`SS`\>, [`_ExtractActionsFromSetupStore`](../type-aliases/ExtractActionsFromSetupStore.md)\<`SS`\>\>
+
+## Properties
+
+### $id
+
+> **$id**: `Id`
+
+Id of the store. Used by map helpers.
+
+#### Inherited from
+
+[`StoreDefinition`](StoreDefinition.md).[`$id`](StoreDefinition.md#$id)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreDefinition
+
+# Interface: StoreDefinition()\<Id, S, G, A\>
+
+Return type of `defineStore()`. Function that allows instantiating a store.
+
+## Extended by
+
+- [`SetupStoreDefinition`](SetupStoreDefinition.md)
+
+## Type Parameters
+
+• **Id** *extends* `string` = `string`
+
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md) = [`StateTree`](../type-aliases/StateTree.md)
+
+• **G** = [`_GettersTree`](../type-aliases/GettersTree.md)\<`S`\>
+
+• **A** = [`_ActionsTree`](../type-aliases/ActionsTree.md)
+
+> **StoreDefinition**(`pinia`?, `hot`?): [`Store`](../type-aliases/Store.md)\<`Id`, `S`, `G`, `A`\>
+
+Returns a store, creates it if necessary.
+
+## Parameters
+
+• **pinia?**: `null` \| [`Pinia`](Pinia.md)
+
+Pinia instance to retrieve the store
+
+• **hot?**: [`StoreGeneric`](../type-aliases/StoreGeneric.md)
+
+dev only hot module replacement
+
+## Returns
+
+[`Store`](../type-aliases/Store.md)\<`Id`, `S`, `G`, `A`\>
+
+## Properties
+
+### $id
+
+> **$id**: `Id`
+
+Id of the store. Used by map helpers.
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_StoreOnActionListenerContext
+
+# Interface: \_StoreOnActionListenerContext\<Store, ActionName, A\>
+
+Actual type for [StoreOnActionListenerContext](../type-aliases/StoreOnActionListenerContext.md). Exists for refactoring
+purposes. For internal use only.
+For internal use **only**
+
+## Type Parameters
+
+• **Store**
+
+• **ActionName** *extends* `string`
+
+• **A**
+
+## Properties
+
+### after()
+
+> **after**: (`callback`) => `void`
+
+Sets up a hook once the action is finished. It receives the return value
+of the action, if it's a Promise, it will be unwrapped.
+
+#### Parameters
+
+• **callback**: `A` *extends* `Record`\<`ActionName`, [`_Method`](../type-aliases/Method.md)\> ? (`resolvedReturn`) => `void` : () => `void`
+
+#### Returns
+
+`void`
+
+***
+
+### args
+
+> **args**: `A` *extends* `Record`\<`ActionName`, [`_Method`](../type-aliases/Method.md)\> ? `Parameters`\<`A`\<`A`\>\[`ActionName`\]\> : `unknown`[]
+
+Parameters passed to the action
+
+***
+
+### name
+
+> **name**: `ActionName`
+
+Name of the action
+
+***
+
+### onError()
+
+> **onError**: (`callback`) => `void`
+
+Sets up a hook if the action fails. Return `false` to catch the error and
+stop it from propagating.
+
+#### Parameters
+
+• **callback**
+
+#### Returns
+
+`void`
+
+***
+
+### store
+
+> **store**: `Store`
+
+Store that is invoking the action
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreProperties
+
+# Interface: StoreProperties\<Id\>
+
+Properties of a store.
+
+## Extended by
+
+- [`_StoreWithState`](StoreWithState.md)
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+## Properties
+
+### $id
+
+> **$id**: `Id`
+
+Unique identifier of the store
+
+***
+
+### \_customProperties
+
+> **\_customProperties**: `Set`\<`string`\>
+
+Used by devtools plugin to retrieve properties added with plugins. Removed
+in production. Can be used by the user to add property keys of the store
+that should be displayed in devtools.
editLink: false
---
-[API Documentation](../index.md) / [pinia](../modules/pinia.md) / \_StoreWithState
+[**API Documentation**](../../index.md) • **Docs**
-# Interface: \_StoreWithState\<Id, S, G, A\>
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_StoreWithState
-[pinia](../modules/pinia.md)._StoreWithState
+# Interface: \_StoreWithState\<Id, S, G, A\>
Base store with state and functions. Should not be used directly.
-## Type parameters
+## Extends
-| Name | Type |
-| :------ | :------ |
-| `Id` | extends `string` |
-| `S` | extends [`StateTree`](../modules/pinia.md#StateTree) |
-| `G` | `G` |
-| `A` | `A` |
+- [`StoreProperties`](StoreProperties.md)\<`Id`\>
-## Hierarchy
+## Type Parameters
-- [`StoreProperties`](pinia.StoreProperties.md)\<`Id`\>
+• **Id** *extends* `string`
- ↳ **`_StoreWithState`**
+• **S** *extends* [`StateTree`](../type-aliases/StateTree.md)
+
+• **G**
+
+• **A**
## Properties
### $id
-• **$id**: `Id`
+> **$id**: `Id`
Unique identifier of the store
#### Inherited from
-[StoreProperties](pinia.StoreProperties.md).[$id](pinia.StoreProperties.md#$id)
+[`StoreProperties`](StoreProperties.md).[`$id`](StoreProperties.md#$id)
-___
+***
### $state
-• **$state**: `UnwrapRef`\<`S`\> & [`PiniaCustomStateProperties`](pinia.PiniaCustomStateProperties.md)\<`S`\>
+> **$state**: `UnwrapRef`\<`S`\> & [`PiniaCustomStateProperties`](PiniaCustomStateProperties.md)\<`S`\>
State of the Store. Setting it will internally call `$patch()` to update the state.
-___
+***
### \_customProperties
-• **\_customProperties**: `Set`\<`string`\>
+> **\_customProperties**: `Set`\<`string`\>
Used by devtools plugin to retrieve properties added with plugins. Removed
in production. Can be used by the user to add property keys of the store
#### Inherited from
-[StoreProperties](pinia.StoreProperties.md).[_customProperties](pinia.StoreProperties.md#_customProperties)
+[`StoreProperties`](StoreProperties.md).[`_customProperties`](StoreProperties.md#_customProperties)
## Methods
-### $dispose
+### $dispose()
-▸ **$dispose**(): `void`
+> **$dispose**(): `void`
Stops the associated effect scope of the store and remove it from the store
registry. Plugins can override this method to cleanup any added effects.
`void`
-___
+***
-### $onAction
+### $onAction()
-▸ **$onAction**(`callback`, `detached?`): () => `void`
+> **$onAction**(`callback`, `detached`?): () => `void`
Setups a callback to be called every time an action is about to get
invoked. The callback receives an object with all the relevant information
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `callback` | [`StoreOnActionListener`](../modules/pinia.md#StoreOnActionListener)\<`Id`, `S`, `G`, `A`\> | callback called before every action |
-| `detached?` | `boolean` | detach the subscription from the context this is called from |
+• **callback**: [`StoreOnActionListener`](../type-aliases/StoreOnActionListener.md)\<`Id`, `S`, `G`, `A`\>
+
+callback called before every action
+
+• **detached?**: `boolean`
+
+detach the subscription from the context this is called from
#### Returns
-`fn`
+`Function`
function that removes the watcher
-▸ (): `void`
-
##### Returns
`void`
-**`Example`**
+#### Example
```js
store.$onAction(({ after, onError }) => {
})
```
-___
+***
-### $patch
+### $patch()
-▸ **$patch**(`partialState`): `void`
+#### $patch(partialState)
+
+> **$patch**(`partialState`): `void`
Applies a state patch to current state. Allows passing nested values
-#### Parameters
+##### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `partialState` | [`_DeepPartial`](../modules/pinia.md#_DeepPartial)\<`UnwrapRef`\<`S`\>\> | patch to apply to the state |
+• **partialState**: [`_DeepPartial`](../type-aliases/DeepPartial.md)\<`UnwrapRef`\<`S`\>\>
-#### Returns
+patch to apply to the state
+
+##### Returns
`void`
-▸ **$patch**\<`F`\>(`stateMutator`): `void`
+#### $patch(stateMutator)
+
+> **$patch**\<`F`\>(`stateMutator`): `void`
Group multiple changes into one function. Useful when mutating objects like
Sets or arrays and applying an object patch isn't practical, e.g. appending
to an array. The function passed to `$patch()` **must be synchronous**.
-#### Type parameters
+##### Type Parameters
-| Name | Type |
-| :------ | :------ |
-| `F` | extends (`state`: `UnwrapRef`\<`S`\>) => `any` |
+• **F** *extends* (`state`) => `any`
-#### Parameters
+##### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `stateMutator` | `ReturnType`\<`F`\> extends `Promise`\<`any`\> ? `never` : `F` | function that mutates `state`, cannot be asynchronous |
+• **stateMutator**: `ReturnType`\<`F`\> *extends* `Promise`\<`any`\> ? `never` : `F`
-#### Returns
+function that mutates `state`, cannot be asynchronous
+
+##### Returns
`void`
-___
+***
-### $reset
+### $reset()
-▸ **$reset**(): `void`
+> **$reset**(): `void`
Resets the store to its initial state by building a new state object.
`void`
-___
+***
-### $subscribe
+### $subscribe()
-▸ **$subscribe**(`callback`, `options?`): () => `void`
+> **$subscribe**(`callback`, `options`?): () => `void`
Setups a callback to be called whenever the state changes. It also returns a function to remove the callback. Note
that when calling `store.$subscribe()` inside of a component, it will be automatically cleaned up when the
#### Parameters
-| Name | Type | Description |
-| :------ | :------ | :------ |
-| `callback` | [`SubscriptionCallback`](../modules/pinia.md#SubscriptionCallback)\<`S`\> | callback passed to the watcher |
-| `options?` | \{ `detached?`: `boolean` } & `WatchOptions`\<`boolean`\> | `watch` options + `detached` to detach the subscription from the context (usually a component) this is called from. Note that the `flush` option does not affect calls to `store.$patch()`. |
+• **callback**: [`SubscriptionCallback`](../type-aliases/SubscriptionCallback.md)\<`S`\>
+
+callback passed to the watcher
+
+• **options?**: `object` & `WatchOptions`\<`boolean`\>
+
+`watch` options + `detached` to detach the subscription from the context (usually a component)
+this is called from. Note that the `flush` option does not affect calls to `store.$patch()`.
#### Returns
-`fn`
+`Function`
function that removes the watcher
-▸ (): `void`
-
##### Returns
`void`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_SubscriptionCallbackMutationBase
+
+# Interface: \_SubscriptionCallbackMutationBase
+
+Base type for the context passed to a subscription callback. Internal type.
+
+## Extended by
+
+- [`SubscriptionCallbackMutationDirect`](SubscriptionCallbackMutationDirect.md)
+- [`SubscriptionCallbackMutationPatchFunction`](SubscriptionCallbackMutationPatchFunction.md)
+- [`SubscriptionCallbackMutationPatchObject`](SubscriptionCallbackMutationPatchObject.md)
+
+## Properties
+
+### events?
+
+> `optional` **events**: `DebuggerEvent` \| `DebuggerEvent`[]
+
+🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
+https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
+devtools and plugins **during development only**.
+
+***
+
+### storeId
+
+> **storeId**: `string`
+
+`id` of the store doing the mutation.
+
+***
+
+### type
+
+> **type**: [`MutationType`](../enumerations/MutationType.md)
+
+Type of the mutation.
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / SubscriptionCallbackMutationDirect
+
+# Interface: SubscriptionCallbackMutationDirect
+
+Context passed to a subscription callback when directly mutating the state of
+a store with `store.someState = newValue` or `store.$state.someState =
+newValue`.
+
+## Extends
+
+- [`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md)
+
+## Properties
+
+### events
+
+> **events**: `DebuggerEvent`
+
+🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
+https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
+devtools and plugins **during development only**.
+
+#### Overrides
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`events`](SubscriptionCallbackMutationBase.md#events)
+
+***
+
+### storeId
+
+> **storeId**: `string`
+
+`id` of the store doing the mutation.
+
+#### Inherited from
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`storeId`](SubscriptionCallbackMutationBase.md#storeId)
+
+***
+
+### type
+
+> **type**: [`direct`](../enumerations/MutationType.md#direct)
+
+Type of the mutation.
+
+#### Overrides
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`type`](SubscriptionCallbackMutationBase.md#type)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / SubscriptionCallbackMutationPatchFunction
+
+# Interface: SubscriptionCallbackMutationPatchFunction
+
+Context passed to a subscription callback when `store.$patch()` is called
+with a function.
+
+## Extends
+
+- [`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md)
+
+## Properties
+
+### events
+
+> **events**: `DebuggerEvent`[]
+
+🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
+https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
+devtools and plugins **during development only**.
+
+#### Overrides
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`events`](SubscriptionCallbackMutationBase.md#events)
+
+***
+
+### storeId
+
+> **storeId**: `string`
+
+`id` of the store doing the mutation.
+
+#### Inherited from
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`storeId`](SubscriptionCallbackMutationBase.md#storeId)
+
+***
+
+### type
+
+> **type**: [`patchFunction`](../enumerations/MutationType.md#patchFunction)
+
+Type of the mutation.
+
+#### Overrides
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`type`](SubscriptionCallbackMutationBase.md#type)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / SubscriptionCallbackMutationPatchObject
+
+# Interface: SubscriptionCallbackMutationPatchObject\<S\>
+
+Context passed to a subscription callback when `store.$patch()` is called
+with an object.
+
+## Extends
+
+- [`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md)
+
+## Type Parameters
+
+• **S**
+
+## Properties
+
+### events
+
+> **events**: `DebuggerEvent`[]
+
+🔴 DEV ONLY, DO NOT use for production code. Different mutation calls. Comes from
+https://vuejs.org/guide/extras/reactivity-in-depth.html#reactivity-debugging and allows to track mutations in
+devtools and plugins **during development only**.
+
+#### Overrides
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`events`](SubscriptionCallbackMutationBase.md#events)
+
+***
+
+### payload
+
+> **payload**: [`_DeepPartial`](../type-aliases/DeepPartial.md)\<`UnwrapRef`\<`S`\>\>
+
+Object passed to `store.$patch()`.
+
+***
+
+### storeId
+
+> **storeId**: `string`
+
+`id` of the store doing the mutation.
+
+#### Inherited from
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`storeId`](SubscriptionCallbackMutationBase.md#storeId)
+
+***
+
+### type
+
+> **type**: [`patchObject`](../enumerations/MutationType.md#patchObject)
+
+Type of the mutation.
+
+#### Overrides
+
+[`_SubscriptionCallbackMutationBase`](SubscriptionCallbackMutationBase.md).[`type`](SubscriptionCallbackMutationBase.md#type)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_ActionsTree
+
+# Type Alias: \_ActionsTree
+
+> **\_ActionsTree**: `Record`\<`string`, [`_Method`](Method.md)\>
+
+Type of an object of Actions. For internal usage only.
+For internal use **only**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_Awaited
+
+# Type Alias: \_Awaited\<T\>
+
+> **\_Awaited**\<`T`\>: `T` *extends* `null` \| `undefined` ? `T` : `T` *extends* `object` & `object` ? `F` *extends* (`value`, ...`args`) => `any` ? [`_Awaited`](Awaited.md)\<`V`\> : `never` : `T`
+
+## Type Parameters
+
+• **T**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_DeepPartial
+
+# Type Alias: \_DeepPartial\<T\>
+
+> **\_DeepPartial**\<`T`\>: `{ [K in keyof T]?: _DeepPartial<T[K]> }`
+
+Recursive `Partial<T>`. Used by [['$patch']](Store.md).
+
+For internal use **only**
+
+## Type Parameters
+
+• **T**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_ExtractActionsFromSetupStore
+
+# Type Alias: \_ExtractActionsFromSetupStore\<SS\>
+
+> **\_ExtractActionsFromSetupStore**\<`SS`\>: `SS` *extends* `undefined` \| `void` ? `object` : [`_ExtractActionsFromSetupStore_Keys`](ExtractActionsFromSetupStore_Keys.md)\<`SS`\> *extends* keyof `SS` ? `Pick`\<`SS`, [`_ExtractActionsFromSetupStore_Keys`](ExtractActionsFromSetupStore_Keys.md)\<`SS`\>\> : `never`
+
+For internal use **only**
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_ExtractActionsFromSetupStore\_Keys
+
+# Type Alias: \_ExtractActionsFromSetupStore\_Keys\<SS\>
+
+> **\_ExtractActionsFromSetupStore\_Keys**\<`SS`\>: keyof `{ [K in keyof SS as SS[K] extends _Method ? K : never]: any }`
+
+Type that enables refactoring through IDE.
+For internal use **only**
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_ExtractGettersFromSetupStore
+
+# Type Alias: \_ExtractGettersFromSetupStore\<SS\>
+
+> **\_ExtractGettersFromSetupStore**\<`SS`\>: `SS` *extends* `undefined` \| `void` ? `object` : [`_ExtractGettersFromSetupStore_Keys`](ExtractGettersFromSetupStore_Keys.md)\<`SS`\> *extends* keyof `SS` ? `Pick`\<`SS`, [`_ExtractGettersFromSetupStore_Keys`](ExtractGettersFromSetupStore_Keys.md)\<`SS`\>\> : `never`
+
+For internal use **only**
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_ExtractGettersFromSetupStore\_Keys
+
+# Type Alias: \_ExtractGettersFromSetupStore\_Keys\<SS\>
+
+> **\_ExtractGettersFromSetupStore\_Keys**\<`SS`\>: keyof `{ [K in keyof SS as SS[K] extends ComputedRef ? K : never]: any }`
+
+Type that enables refactoring through IDE.
+For internal use **only**
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_ExtractStateFromSetupStore
+
+# Type Alias: \_ExtractStateFromSetupStore\<SS\>
+
+> **\_ExtractStateFromSetupStore**\<`SS`\>: `SS` *extends* `undefined` \| `void` ? `object` : [`_ExtractStateFromSetupStore_Keys`](ExtractStateFromSetupStore_Keys.md)\<`SS`\> *extends* keyof `SS` ? [`_UnwrapAll`](UnwrapAll.md)\<`Pick`\<`SS`, [`_ExtractStateFromSetupStore_Keys`](ExtractStateFromSetupStore_Keys.md)\<`SS`\>\>\> : `never`
+
+For internal use **only**
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_ExtractStateFromSetupStore\_Keys
+
+# Type Alias: \_ExtractStateFromSetupStore\_Keys\<SS\>
+
+> **\_ExtractStateFromSetupStore\_Keys**\<`SS`\>: keyof \{ \[K in keyof SS as SS\[K\] extends \_Method \| ComputedRef ? never : K\]: any \}
+
+Type that enables refactoring through IDE.
+For internal use **only**
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_GettersTree
+
+# Type Alias: \_GettersTree\<S\>
+
+> **\_GettersTree**\<`S`\>: `Record`\<`string`, (`state`) => `any` \| () => `any`\>
+
+Type of an object of Getters that infers the argument. For internal usage only.
+For internal use **only**
+
+## Type Parameters
+
+• **S** *extends* [`StateTree`](StateTree.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_MapActionsObjectReturn
+
+# Type Alias: \_MapActionsObjectReturn\<A, T\>
+
+> **\_MapActionsObjectReturn**\<`A`, `T`\>: `{ [key in keyof T]: A[T[key]] }`
+
+For internal use **only**
+
+## Type Parameters
+
+• **A**
+
+• **T** *extends* `Record`\<`string`, keyof `A`\>
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_MapActionsReturn
+
+# Type Alias: \_MapActionsReturn\<A\>
+
+> **\_MapActionsReturn**\<`A`\>: `{ [key in keyof A]: A[key] }`
+
+For internal use **only**
+
+## Type Parameters
+
+• **A**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_MapStateObjectReturn
+
+# Type Alias: \_MapStateObjectReturn\<Id, S, G, A, T\>
+
+> **\_MapStateObjectReturn**\<`Id`, `S`, `G`, `A`, `T`\>: `{ [key in keyof T]: Function }`
+
+For internal use **only**
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](StateTree.md)
+
+• **G** *extends* [`_GettersTree`](GettersTree.md)\<`S`\> \| `object`
+
+• **A**
+
+• **T** *extends* `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`) => `any`\> = `object`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_MapStateReturn
+
+# Type Alias: \_MapStateReturn\<S, G, Keys\>
+
+> **\_MapStateReturn**\<`S`, `G`, `Keys`\>: `{ [key in Keys]: key extends keyof Store<string, S, G, Object> ? Function : never }`
+
+For internal use **only**
+
+## Type Parameters
+
+• **S** *extends* [`StateTree`](StateTree.md)
+
+• **G** *extends* [`_GettersTree`](GettersTree.md)\<`S`\> \| `object`
+
+• **Keys** *extends* keyof `S` \| keyof `G` = keyof `S` \| keyof `G`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_MapWritableStateObjectReturn
+
+# Type Alias: \_MapWritableStateObjectReturn\<S, T\>
+
+> **\_MapWritableStateObjectReturn**\<`S`, `T`\>: `{ [key in keyof T]: Object }`
+
+For internal use **only**
+
+## Type Parameters
+
+• **S** *extends* [`StateTree`](StateTree.md)
+
+• **T** *extends* `Record`\<`string`, keyof `S`\>
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_MapWritableStateReturn
+
+# Type Alias: \_MapWritableStateReturn\<S\>
+
+> **\_MapWritableStateReturn**\<`S`\>: `{ [key in keyof S]: Object }`
+
+For internal use **only**
+
+## Type Parameters
+
+• **S** *extends* [`StateTree`](StateTree.md)
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_Method
+
+# Type Alias: \_Method()
+
+> **\_Method**: (...`args`) => `any`
+
+Generic type for a function that can infer arguments and return type
+
+For internal use **only**
+
+## Parameters
+
+• ...**args**: `any`[]
+
+## Returns
+
+`any`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / PiniaStorePlugin
+
+# Type Alias: ~~PiniaStorePlugin~~
+
+> **PiniaStorePlugin**: [`PiniaPlugin`](../interfaces/PiniaPlugin.md)
+
+Plugin to extend every store.
+
+## Deprecated
+
+use PiniaPlugin instead
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_Spread
+
+# Type Alias: \_Spread\<A\>
+
+> **\_Spread**\<`A`\>: `A` *extends* [infer L, `...(infer R)`] ? [`_StoreObject`](StoreObject.md)\<`L`\> & [`_Spread`](Spread.md)\<`R`\> : `unknown`
+
+For internal use **only**.
+
+## Type Parameters
+
+• **A** *extends* readonly `any`[]
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StateTree
+
+# Type Alias: StateTree
+
+> **StateTree**: `Record`\<`string` \| `number` \| `symbol`, `any`\>
+
+Generic state of a Store
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / Store
+
+# Type Alias: Store\<Id, S, G, A\>
+
+> **Store**\<`Id`, `S`, `G`, `A`\>: [`_StoreWithState`](../interfaces/StoreWithState.md)\<`Id`, `S`, `G`, `A`\> & `UnwrapRef`\<`S`\> & [`_StoreWithGetters`](StoreWithGetters.md)\<`G`\> & [`_ActionsTree`](ActionsTree.md) *extends* `A` ? `object` : `A` & [`PiniaCustomProperties`](../interfaces/PiniaCustomProperties.md)\<`Id`, `S`, `G`, `A`\> & [`PiniaCustomStateProperties`](../interfaces/PiniaCustomStateProperties.md)\<`S`\>
+
+Store type to build a store.
+
+## Type Parameters
+
+• **Id** *extends* `string` = `string`
+
+• **S** *extends* [`StateTree`](StateTree.md) = `object`
+
+• **G** = `object`
+
+• **A** = `object`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreActions
+
+# Type Alias: StoreActions\<SS\>
+
+> **StoreActions**\<`SS`\>: `SS` *extends* [`Store`](Store.md)\<`string`, [`StateTree`](StateTree.md), [`_GettersTree`](GettersTree.md)\<[`StateTree`](StateTree.md)\>, infer A\> ? `A` : [`_ExtractActionsFromSetupStore`](ExtractActionsFromSetupStore.md)\<`SS`\>
+
+Extract the actions of a store type. Works with both a Setup Store or an
+Options Store.
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreGeneric
+
+# Type Alias: StoreGeneric
+
+> **StoreGeneric**: [`Store`](Store.md)\<`string`, [`StateTree`](StateTree.md), [`_GettersTree`](GettersTree.md)\<[`StateTree`](StateTree.md)\>, [`_ActionsTree`](ActionsTree.md)\>
+
+Generic and type-unsafe version of Store. Doesn't fail on access with
+strings, making it much easier to write generic functions that do not care
+about the kind of store that is passed.
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreGetters
+
+# Type Alias: StoreGetters\<SS\>
+
+> **StoreGetters**\<`SS`\>: `SS` *extends* [`Store`](Store.md)\<`string`, [`StateTree`](StateTree.md), infer G, [`_ActionsTree`](ActionsTree.md)\> ? [`_StoreWithGetters`](StoreWithGetters.md)\<`G`\> : [`_ExtractGettersFromSetupStore`](ExtractGettersFromSetupStore.md)\<`SS`\>
+
+Extract the getters of a store type. Works with both a Setup Store or an
+Options Store.
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_StoreObject
+
+# Type Alias: \_StoreObject\<S\>
+
+> **\_StoreObject**\<`S`\>: `S` *extends* [`StoreDefinition`](../interfaces/StoreDefinition.md)\<infer Ids, infer State, infer Getters, infer Actions\> ? \{ \[Id in \`$\{Ids\}$\{MapStoresCustomization extends Record\<"suffix", infer Suffix\> ? Suffix : "Store"\}\`\]: Function \} : `object`
+
+For internal use **only**.
+
+## Type Parameters
+
+• **S**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreOnActionListener
+
+# Type Alias: StoreOnActionListener()\<Id, S, G, A\>
+
+> **StoreOnActionListener**\<`Id`, `S`, `G`, `A`\>: (`context`) => `void`
+
+Argument of `store.$onAction()`
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](StateTree.md)
+
+• **G**
+
+• **A**
+
+## Parameters
+
+• **context**: [`StoreOnActionListenerContext`](StoreOnActionListenerContext.md)\<`Id`, `S`, `G`, `object` *extends* `A` ? [`_ActionsTree`](ActionsTree.md) : `A`\>
+
+## Returns
+
+`void`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreOnActionListenerContext
+
+# Type Alias: StoreOnActionListenerContext\<Id, S, G, A\>
+
+> **StoreOnActionListenerContext**\<`Id`, `S`, `G`, `A`\>: [`_ActionsTree`](ActionsTree.md) *extends* `A` ? [`_StoreOnActionListenerContext`](../interfaces/StoreOnActionListenerContext.md)\<[`StoreGeneric`](StoreGeneric.md), `string`, [`_ActionsTree`](ActionsTree.md)\> : `{ [Name in keyof A]: Name extends string ? _StoreOnActionListenerContext<Store<Id, S, G, A>, Name, A> : never }`\[keyof `A`\]
+
+Context object passed to callbacks of `store.$onAction(context => {})`
+TODO: should have only the Id, the Store and Actions to generate the proper object
+
+## Type Parameters
+
+• **Id** *extends* `string`
+
+• **S** *extends* [`StateTree`](StateTree.md)
+
+• **G**
+
+• **A**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / StoreState
+
+# Type Alias: StoreState\<SS\>
+
+> **StoreState**\<`SS`\>: `SS` *extends* [`Store`](Store.md)\<`string`, infer S, [`_GettersTree`](GettersTree.md)\<[`StateTree`](StateTree.md)\>, [`_ActionsTree`](ActionsTree.md)\> ? `UnwrapRef`\<`S`\> : [`_ExtractStateFromSetupStore`](ExtractStateFromSetupStore.md)\<`SS`\>
+
+Extract the state of a store type. Works with both a Setup Store or an
+Options Store. Note this unwraps refs.
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_StoreWithActions
+
+# Type Alias: \_StoreWithActions\<A\>
+
+> **\_StoreWithActions**\<`A`\>: `{ [k in keyof A]: A[k] extends Function ? Function : never }`
+
+Store augmented for actions. For internal usage only.
+For internal use **only**
+
+## Type Parameters
+
+• **A**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_StoreWithGetters
+
+# Type Alias: \_StoreWithGetters\<G\>
+
+> **\_StoreWithGetters**\<`G`\>: `{ readonly [k in keyof G]: G[k] extends Function ? R : UnwrapRef<G[k]> }`
+
+Store augmented with getters. For internal usage only.
+For internal use **only**
+
+## Type Parameters
+
+• **G**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / SubscriptionCallback
+
+# Type Alias: SubscriptionCallback()\<S\>
+
+> **SubscriptionCallback**\<`S`\>: (`mutation`, `state`) => `void`
+
+Callback of a subscription
+
+## Type Parameters
+
+• **S**
+
+## Parameters
+
+• **mutation**: [`SubscriptionCallbackMutation`](SubscriptionCallbackMutation.md)\<`S`\>
+
+• **state**: `UnwrapRef`\<`S`\>
+
+## Returns
+
+`void`
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / SubscriptionCallbackMutation
+
+# Type Alias: SubscriptionCallbackMutation\<S\>
+
+> **SubscriptionCallbackMutation**\<`S`\>: [`SubscriptionCallbackMutationDirect`](../interfaces/SubscriptionCallbackMutationDirect.md) \| [`SubscriptionCallbackMutationPatchObject`](../interfaces/SubscriptionCallbackMutationPatchObject.md)\<`S`\> \| [`SubscriptionCallbackMutationPatchFunction`](../interfaces/SubscriptionCallbackMutationPatchFunction.md)
+
+Context object passed to a subscription callback.
+
+## Type Parameters
+
+• **S**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / \_UnwrapAll
+
+# Type Alias: \_UnwrapAll\<SS\>
+
+> **\_UnwrapAll**\<`SS`\>: `{ [K in keyof SS]: UnwrapRef<SS[K]> }`
+
+Type that enables refactoring through IDE.
+For internal use **only**
+
+## Type Parameters
+
+• **SS**
--- /dev/null
+---
+editLink: false
+---
+
+[**API Documentation**](../../index.md) • **Docs**
+
+***
+
+[API Documentation](../../index.md) / [pinia](../index.md) / PiniaVuePlugin
+
+# Variable: PiniaVuePlugin
+
+> `const` **PiniaVuePlugin**: `Plugin`
+
+Vue 2 Plugin that must be installed for pinia to work. Note **you don't need
+this plugin if you are using Nuxt.js**. Use the `buildModule` instead:
+https://pinia.vuejs.org/ssr/nuxt.html.
+
+## Example
+
+```js
+import Vue from 'vue'
+import { PiniaVuePlugin, createPinia } from 'pinia'
+
+Vue.use(PiniaVuePlugin)
+const pinia = createPinia()
+
+new Vue({
+ el: '#app',
+ // ...
+ pinia,
+})
+```
+
+## Param
+
+`Vue` imported from 'vue'.
### Specifying the createSpy function
-When using Jest, or vitest with `globals: true`, `createTestingPinia` automatically stubs actions using the spy function based on the existing test framework (`jest.fn` or `vitest.fn`). If you are not using `globals: true` or using a different framework, you'll need to provide a [createSpy](/api/interfaces/pinia_testing.TestingOptions.html#createspy) option:
+When using Jest, or vitest with `globals: true`, `createTestingPinia` automatically stubs actions using the spy function based on the existing test framework (`jest.fn` or `vitest.fn`). If you are not using `globals: true` or using a different framework, you'll need to provide a [createSpy](../api/@pinia/testing/interfaces/TestingOptions.html#createSpy-) option:
::: code-group