diff --git a/packages/docs/api/interfaces/pinia.DefineSetupStoreOptions.md b/packages/docs/api/interfaces/pinia.DefineSetupStoreOptions.md index 1283d32dcb..a9404d9818 100644 --- a/packages/docs/api/interfaces/pinia.DefineSetupStoreOptions.md +++ b/packages/docs/api/interfaces/pinia.DefineSetupStoreOptions.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineSetupStoreOptions -# Interface: DefineSetupStoreOptions +# Interface: DefineSetupStoreOptions\ [pinia](../modules/pinia.md).DefineSetupStoreOptions @@ -26,7 +26,7 @@ augment stores with the plugin API. ## Hierarchy -- [`DefineStoreOptionsBase`](pinia.DefineStoreOptionsBase.md)<`S`, [`Store`](../modules/pinia.md#Store)<`Id`, `S`, `G`, `A`\>\> +- [`DefineStoreOptionsBase`](pinia.DefineStoreOptionsBase.md)\<`S`, [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\>\> ↳ **`DefineSetupStoreOptions`** diff --git a/packages/docs/api/interfaces/pinia.DefineStoreOptions.md b/packages/docs/api/interfaces/pinia.DefineStoreOptions.md index 2b53045c23..5a49133197 100644 --- a/packages/docs/api/interfaces/pinia.DefineStoreOptions.md +++ b/packages/docs/api/interfaces/pinia.DefineStoreOptions.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptions -# Interface: DefineStoreOptions +# Interface: DefineStoreOptions\ [pinia](../modules/pinia.md).DefineStoreOptions @@ -26,7 +26,7 @@ augment stores with the plugin API. ## Hierarchy -- [`DefineStoreOptionsBase`](pinia.DefineStoreOptionsBase.md)<`S`, [`Store`](../modules/pinia.md#Store)<`Id`, `S`, `G`, `A`\>\> +- [`DefineStoreOptionsBase`](pinia.DefineStoreOptionsBase.md)\<`S`, [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\>\> ↳ **`DefineStoreOptions`** @@ -34,7 +34,7 @@ augment stores with the plugin API. ### 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` **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. @@ -42,7 +42,7 @@ ___ ### 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` **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. @@ -75,7 +75,7 @@ correct typings! ### hydrate -▸ `Optional` **hydrate**(`storeState`, `initialState`): `void` +▸ **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. @@ -84,8 +84,8 @@ definition and copying the value from `pinia.state` isn't enough. | Name | Type | Description | | :------ | :------ | :------ | -| `storeState` | `UnwrapRef`<`S`\> | the current state in the store | -| `initialState` | `UnwrapRef`<`S`\> | initialState | +| `storeState` | `UnwrapRef`\<`S`\> | the current state in the store | +| `initialState` | `UnwrapRef`\<`S`\> | initialState | #### Returns diff --git a/packages/docs/api/interfaces/pinia.DefineStoreOptionsBase.md b/packages/docs/api/interfaces/pinia.DefineStoreOptionsBase.md index eae87cd40f..9a94f16b04 100644 --- a/packages/docs/api/interfaces/pinia.DefineStoreOptionsBase.md +++ b/packages/docs/api/interfaces/pinia.DefineStoreOptionsBase.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptionsBase -# Interface: DefineStoreOptionsBase +# Interface: DefineStoreOptionsBase\ [pinia](../modules/pinia.md).DefineStoreOptionsBase diff --git a/packages/docs/api/interfaces/pinia.DefineStoreOptionsInPlugin.md b/packages/docs/api/interfaces/pinia.DefineStoreOptionsInPlugin.md index ef90c8fc80..bbc20a8b89 100644 --- a/packages/docs/api/interfaces/pinia.DefineStoreOptionsInPlugin.md +++ b/packages/docs/api/interfaces/pinia.DefineStoreOptionsInPlugin.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptionsInPlugin -# Interface: DefineStoreOptionsInPlugin +# Interface: DefineStoreOptionsInPlugin\ [pinia](../modules/pinia.md).DefineStoreOptionsInPlugin @@ -21,7 +21,7 @@ Available `options` when creating a pinia plugin. ## Hierarchy -- `Omit`<[`DefineStoreOptions`](pinia.DefineStoreOptions.md)<`Id`, `S`, `G`, `A`\>, ``"id"`` \| ``"actions"``\> +- `Omit`\<[`DefineStoreOptions`](pinia.DefineStoreOptions.md)\<`Id`, `S`, `G`, `A`\>, ``"id"`` \| ``"actions"``\> ↳ **`DefineStoreOptionsInPlugin`** @@ -39,7 +39,7 @@ ___ ### 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` **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. @@ -72,7 +72,7 @@ Omit.state ### hydrate -▸ `Optional` **hydrate**(`storeState`, `initialState`): `void` +▸ **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. @@ -81,8 +81,8 @@ definition and copying the value from `pinia.state` isn't enough. | Name | Type | Description | | :------ | :------ | :------ | -| `storeState` | `UnwrapRef`<`S`\> | the current state in the store | -| `initialState` | `UnwrapRef`<`S`\> | initialState | +| `storeState` | `UnwrapRef`\<`S`\> | the current state in the store | +| `initialState` | `UnwrapRef`\<`S`\> | initialState | #### Returns diff --git a/packages/docs/api/interfaces/pinia.Pinia.md b/packages/docs/api/interfaces/pinia.Pinia.md index b680980471..9293ed8aa3 100644 --- a/packages/docs/api/interfaces/pinia.Pinia.md +++ b/packages/docs/api/interfaces/pinia.Pinia.md @@ -20,7 +20,7 @@ Every application must own its own pinia to be able to create stores ### install -• **install**: (`app`: `App`<`any`\>) => `void` +• **install**: (`app`: `App`\<`any`\>) => `void` #### Type declaration @@ -30,7 +30,7 @@ Every application must own its own pinia to be able to create stores | Name | Type | | :------ | :------ | -| `app` | `App`<`any`\> | +| `app` | `App`\<`any`\> | ##### Returns @@ -40,7 +40,7 @@ ___ ### state -• **state**: `Ref`<`Record`<`string`, [`StateTree`](../modules/pinia.md#StateTree)\>\> +• **state**: `Ref`\<`Record`\<`string`, [`StateTree`](../modules/pinia.md#StateTree)\>\> root state diff --git a/packages/docs/api/interfaces/pinia.PiniaCustomProperties.md b/packages/docs/api/interfaces/pinia.PiniaCustomProperties.md index e3fb54357c..7c673408c4 100644 --- a/packages/docs/api/interfaces/pinia.PiniaCustomProperties.md +++ b/packages/docs/api/interfaces/pinia.PiniaCustomProperties.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaCustomProperties -# Interface: PiniaCustomProperties +# Interface: PiniaCustomProperties\ [pinia](../modules/pinia.md).PiniaCustomProperties @@ -16,5 +16,5 @@ Interface to be extended by the user when they add properties through plugins. | :------ | :------ | | `Id` | extends `string` = `string` | | `S` | extends [`StateTree`](../modules/pinia.md#StateTree) = [`StateTree`](../modules/pinia.md#StateTree) | -| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)<`S`\> | +| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\> | | `A` | [`_ActionsTree`](../modules/pinia.md#_ActionsTree) | diff --git a/packages/docs/api/interfaces/pinia.PiniaCustomStateProperties.md b/packages/docs/api/interfaces/pinia.PiniaCustomStateProperties.md index cec3cb9319..927b75c277 100644 --- a/packages/docs/api/interfaces/pinia.PiniaCustomStateProperties.md +++ b/packages/docs/api/interfaces/pinia.PiniaCustomStateProperties.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaCustomStateProperties -# Interface: PiniaCustomStateProperties +# Interface: PiniaCustomStateProperties\ [pinia](../modules/pinia.md).PiniaCustomStateProperties diff --git a/packages/docs/api/interfaces/pinia.PiniaPlugin.md b/packages/docs/api/interfaces/pinia.PiniaPlugin.md index 8a3255b6b7..222585e953 100644 --- a/packages/docs/api/interfaces/pinia.PiniaPlugin.md +++ b/packages/docs/api/interfaces/pinia.PiniaPlugin.md @@ -14,7 +14,7 @@ Plugin to extend every store. ### 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)\>\> +▸ **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. @@ -23,8 +23,8 @@ nothing. | 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 | +| `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)\>\> +`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)\>\> diff --git a/packages/docs/api/interfaces/pinia.PiniaPluginContext.md b/packages/docs/api/interfaces/pinia.PiniaPluginContext.md index a33b28a9e5..cf9d7d05ad 100644 --- a/packages/docs/api/interfaces/pinia.PiniaPluginContext.md +++ b/packages/docs/api/interfaces/pinia.PiniaPluginContext.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaPluginContext -# Interface: PiniaPluginContext +# Interface: PiniaPluginContext\ [pinia](../modules/pinia.md).PiniaPluginContext @@ -16,14 +16,14 @@ Context argument passed to Pinia plugins. | :------ | :------ | | `Id` | extends `string` = `string` | | `S` | extends [`StateTree`](../modules/pinia.md#StateTree) = [`StateTree`](../modules/pinia.md#StateTree) | -| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)<`S`\> | +| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\> | | `A` | [`_ActionsTree`](../modules/pinia.md#_ActionsTree) | ## Properties ### app -• **app**: `App`<`any`\> +• **app**: `App`\<`any`\> Current app created with `Vue.createApp()`. @@ -31,7 +31,7 @@ ___ ### options -• **options**: [`DefineStoreOptionsInPlugin`](pinia.DefineStoreOptionsInPlugin.md)<`Id`, `S`, `G`, `A`\> +• **options**: [`DefineStoreOptionsInPlugin`](pinia.DefineStoreOptionsInPlugin.md)\<`Id`, `S`, `G`, `A`\> Initial options defining the store when calling `defineStore()`. @@ -47,6 +47,6 @@ ___ ### store -• **store**: [`Store`](../modules/pinia.md#Store)<`Id`, `S`, `G`, `A`\> +• **store**: [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\> Current store being extended. diff --git a/packages/docs/api/interfaces/pinia.StoreDefinition.md b/packages/docs/api/interfaces/pinia.StoreDefinition.md index 093bb474f7..5188f394d8 100644 --- a/packages/docs/api/interfaces/pinia.StoreDefinition.md +++ b/packages/docs/api/interfaces/pinia.StoreDefinition.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / StoreDefinition -# Interface: StoreDefinition +# Interface: StoreDefinition\ [pinia](../modules/pinia.md).StoreDefinition @@ -16,7 +16,7 @@ Return type of `defineStore()`. Function that allows instantiating a store. | :------ | :------ | | `Id` | extends `string` = `string` | | `S` | extends [`StateTree`](../modules/pinia.md#StateTree) = [`StateTree`](../modules/pinia.md#StateTree) | -| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)<`S`\> | +| `G` | [`_GettersTree`](../modules/pinia.md#_GettersTree)\<`S`\> | | `A` | [`_ActionsTree`](../modules/pinia.md#_ActionsTree) | ## Hierarchy @@ -29,7 +29,7 @@ Return type of `defineStore()`. Function that allows instantiating a store. ### StoreDefinition -▸ **StoreDefinition**(`pinia?`, `hot?`): [`Store`](../modules/pinia.md#Store)<`Id`, `S`, `G`, `A`\> +▸ **StoreDefinition**(`pinia?`, `hot?`): [`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\> Returns a store, creates it if necessary. @@ -42,7 +42,7 @@ Returns a store, creates it if necessary. #### Returns -[`Store`](../modules/pinia.md#Store)<`Id`, `S`, `G`, `A`\> +[`Store`](../modules/pinia.md#Store)\<`Id`, `S`, `G`, `A`\> ## Properties diff --git a/packages/docs/api/interfaces/pinia.StoreProperties.md b/packages/docs/api/interfaces/pinia.StoreProperties.md index 2c84d45bc9..1b02cf6380 100644 --- a/packages/docs/api/interfaces/pinia.StoreProperties.md +++ b/packages/docs/api/interfaces/pinia.StoreProperties.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / StoreProperties -# Interface: StoreProperties +# Interface: StoreProperties\ [pinia](../modules/pinia.md).StoreProperties @@ -34,7 +34,7 @@ ___ ### \_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 diff --git a/packages/docs/api/interfaces/pinia.SubscriptionCallbackMutationPatchObject.md b/packages/docs/api/interfaces/pinia.SubscriptionCallbackMutationPatchObject.md index af3505331b..b63fd21869 100644 --- a/packages/docs/api/interfaces/pinia.SubscriptionCallbackMutationPatchObject.md +++ b/packages/docs/api/interfaces/pinia.SubscriptionCallbackMutationPatchObject.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / SubscriptionCallbackMutationPatchObject -# Interface: SubscriptionCallbackMutationPatchObject +# Interface: SubscriptionCallbackMutationPatchObject\ [pinia](../modules/pinia.md).SubscriptionCallbackMutationPatchObject @@ -41,7 +41,7 @@ ___ ### payload -• **payload**: [`_DeepPartial`](../modules/pinia.md#_DeepPartial)<`S`\> +• **payload**: [`_DeepPartial`](../modules/pinia.md#_DeepPartial)\<`S`\> Object passed to `store.$patch()`. diff --git a/packages/docs/api/interfaces/pinia._StoreOnActionListenerContext.md b/packages/docs/api/interfaces/pinia._StoreOnActionListenerContext.md index 85568eaa21..4bdbf9f039 100644 --- a/packages/docs/api/interfaces/pinia._StoreOnActionListenerContext.md +++ b/packages/docs/api/interfaces/pinia._StoreOnActionListenerContext.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / \_StoreOnActionListenerContext -# Interface: \_StoreOnActionListenerContext +# Interface: \_StoreOnActionListenerContext\ [pinia](../modules/pinia.md)._StoreOnActionListenerContext @@ -24,7 +24,7 @@ For internal use **only** ### after -• **after**: (`callback`: `A` extends `Record`<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? (`resolvedReturn`: [`_Awaited`](../modules/pinia.md#_Awaited)<`ReturnType`<`A`[`ActionName`]\>\>) => `void` : () => `void`) => `void` +• **after**: (`callback`: `A` extends `Record`\<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? (`resolvedReturn`: [`_Awaited`](../modules/pinia.md#_Awaited)\<`ReturnType`\<`A`[`ActionName`]\>\>) => `void` : () => `void`) => `void` #### Type declaration @@ -37,7 +37,7 @@ of the action, if it's a Promise, it will be unwrapped. | Name | Type | | :------ | :------ | -| `callback` | `A` extends `Record`<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? (`resolvedReturn`: [`_Awaited`](../modules/pinia.md#_Awaited)<`ReturnType`<`A`[`ActionName`]\>\>) => `void` : () => `void` | +| `callback` | `A` extends `Record`\<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? (`resolvedReturn`: [`_Awaited`](../modules/pinia.md#_Awaited)\<`ReturnType`\<`A`[`ActionName`]\>\>) => `void` : () => `void` | ##### Returns @@ -47,7 +47,7 @@ ___ ### args -• **args**: `A` extends `Record`<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? `Parameters`<`A`[`ActionName`]\> : `unknown`[] +• **args**: `A` extends `Record`\<`ActionName`, [`_Method`](../modules/pinia.md#_Method)\> ? `Parameters`\<`A`[`ActionName`]\> : `unknown`[] Parameters passed to the action diff --git a/packages/docs/api/interfaces/pinia._StoreWithState.md b/packages/docs/api/interfaces/pinia._StoreWithState.md index a09a1ebe3c..c975e3017a 100644 --- a/packages/docs/api/interfaces/pinia._StoreWithState.md +++ b/packages/docs/api/interfaces/pinia._StoreWithState.md @@ -4,7 +4,7 @@ editLink: false [API Documentation](../index.md) / [pinia](../modules/pinia.md) / \_StoreWithState -# Interface: \_StoreWithState +# Interface: \_StoreWithState\ [pinia](../modules/pinia.md)._StoreWithState @@ -21,7 +21,7 @@ Base store with state and functions. Should not be used directly. ## Hierarchy -- [`StoreProperties`](pinia.StoreProperties.md)<`Id`\> +- [`StoreProperties`](pinia.StoreProperties.md)\<`Id`\> ↳ **`_StoreWithState`** @@ -41,7 +41,7 @@ ___ ### $state -• **$state**: `UnwrapRef`<`S`\> & [`PiniaCustomStateProperties`](pinia.PiniaCustomStateProperties.md)<`S`\> +• **$state**: `UnwrapRef`\<`S`\> & [`PiniaCustomStateProperties`](pinia.PiniaCustomStateProperties.md)\<`S`\> State of the Store. Setting it will internally call `$patch()` to update the state. @@ -49,7 +49,7 @@ ___ ### \_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 @@ -100,7 +100,7 @@ up when the component gets unmounted unless `detached` is set to true. | Name | Type | Description | | :------ | :------ | :------ | -| `callback` | [`StoreOnActionListener`](../modules/pinia.md#StoreOnActionListener)<`Id`, `S`, `G`, `A`\> | callback called before every action | +| `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 | #### Returns @@ -177,13 +177,13 @@ Applies a state patch to current state. Allows passing nested values | Name | Type | Description | | :------ | :------ | :------ | -| `partialState` | [`_DeepPartial`](../modules/pinia.md#_DeepPartial)<`UnwrapRef`<`S`\>\> | patch to apply to the state | +| `partialState` | [`_DeepPartial`](../modules/pinia.md#_DeepPartial)\<`UnwrapRef`\<`S`\>\> | patch to apply to the state | #### Returns `void` -▸ **$patch**<`F`\>(`stateMutator`): `void` +▸ **$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 @@ -193,13 +193,13 @@ to an array. The function passed to `$patch()` **must be synchronous**. | Name | Type | | :------ | :------ | -| `F` | extends (`state`: `UnwrapRef`<`S`\>) => `any` | +| `F` | extends (`state`: `UnwrapRef`\<`S`\>) => `any` | #### 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` | function that mutates `state`, cannot be asynchronous | #### Returns @@ -212,7 +212,6 @@ ___ ▸ **$reset**(): `void` Resets the store to its initial state by building a new state object. -TODO: make this options only #### Returns @@ -232,8 +231,8 @@ component gets unmounted unless `detached` is set to true. | 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`](../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()`. | #### Returns diff --git a/packages/docs/api/interfaces/pinia_testing.TestingPinia.md b/packages/docs/api/interfaces/pinia_testing.TestingPinia.md index b029836ae7..cc51968e3f 100644 --- a/packages/docs/api/interfaces/pinia_testing.TestingPinia.md +++ b/packages/docs/api/interfaces/pinia_testing.TestingPinia.md @@ -21,7 +21,7 @@ Pinia instance specifically designed for testing. Extends a regular ### app -• **app**: `App`<`any`\> +• **app**: `App`\<`any`\> App used by Pinia @@ -29,7 +29,7 @@ ___ ### install -• **install**: (`app`: `App`<`any`\>) => `void` +• **install**: (`app`: `App`\<`any`\>) => `void` #### Type declaration @@ -39,7 +39,7 @@ ___ | Name | Type | | :------ | :------ | -| `app` | `App`<`any`\> | +| `app` | `App`\<`any`\> | ##### Returns @@ -53,7 +53,7 @@ ___ ### state -• **state**: `Ref`<`Record`<`string`, [`StateTree`](../modules/pinia.md#StateTree)\>\> +• **state**: `Ref`\<`Record`\<`string`, [`StateTree`](../modules/pinia.md#StateTree)\>\> root state diff --git a/packages/docs/api/modules/pinia.md b/packages/docs/api/modules/pinia.md index f0c6607d74..959db867ad 100644 --- a/packages/docs/api/modules/pinia.md +++ b/packages/docs/api/modules/pinia.md @@ -48,7 +48,7 @@ ___ ### StateTree -Ƭ **StateTree**: `Record`<`string` \| `number` \| `symbol`, `any`\> +Ƭ **StateTree**: `Record`\<`string` \| `number` \| `symbol`, `any`\> Generic state of a Store @@ -56,7 +56,7 @@ ___ ### 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**\<`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. @@ -73,7 +73,7 @@ ___ ### 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`\> +Ƭ **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. @@ -88,7 +88,7 @@ ___ ### StoreGeneric -Ƭ **StoreGeneric**: [`Store`](pinia.md#Store)<`string`, [`StateTree`](pinia.md#StateTree), [`_GettersTree`](pinia.md#_GettersTree)<[`StateTree`](pinia.md#StateTree)\>, [`_ActionsTree`](pinia.md#_ActionsTree)\> +Ƭ **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 @@ -98,7 +98,7 @@ ___ ### 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`\> +Ƭ **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. @@ -113,7 +113,7 @@ ___ ### StoreOnActionListener -Ƭ **StoreOnActionListener**<`Id`, `S`, `G`, `A`\>: (`context`: [`StoreOnActionListenerContext`](pinia.md#StoreOnActionListenerContext)<`Id`, `S`, `G`, {} extends `A` ? [`_ActionsTree`](pinia.md#_ActionsTree) : `A`\>) => `void` +Ƭ **StoreOnActionListener**\<`Id`, `S`, `G`, `A`\>: (`context`: [`StoreOnActionListenerContext`](pinia.md#StoreOnActionListenerContext)\<`Id`, `S`, `G`, {} extends `A` ? [`_ActionsTree`](pinia.md#_ActionsTree) : `A`\>) => `void` #### Type parameters @@ -134,7 +134,7 @@ Argument of `store.$onAction()` | Name | Type | | :------ | :------ | -| `context` | [`StoreOnActionListenerContext`](pinia.md#StoreOnActionListenerContext)<`Id`, `S`, `G`, {} extends `A` ? [`_ActionsTree`](pinia.md#_ActionsTree) : `A`\> | +| `context` | [`StoreOnActionListenerContext`](pinia.md#StoreOnActionListenerContext)\<`Id`, `S`, `G`, {} extends `A` ? [`_ActionsTree`](pinia.md#_ActionsTree) : `A`\> | ##### Returns @@ -144,7 +144,7 @@ ___ ### 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, Name, A\> : never }[keyof `A`] +Ƭ **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\, 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 @@ -162,7 +162,7 @@ ___ ### 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`\> +Ƭ **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. @@ -177,7 +177,7 @@ ___ ### SubscriptionCallback -Ƭ **SubscriptionCallback**<`S`\>: (`mutation`: [`SubscriptionCallbackMutation`](pinia.md#SubscriptionCallbackMutation)<`S`\>, `state`: `UnwrapRef`<`S`\>) => `void` +Ƭ **SubscriptionCallback**\<`S`\>: (`mutation`: [`SubscriptionCallbackMutation`](pinia.md#SubscriptionCallbackMutation)\<`S`\>, `state`: `UnwrapRef`\<`S`\>) => `void` #### Type parameters @@ -195,8 +195,8 @@ Callback of a subscription | Name | Type | | :------ | :------ | -| `mutation` | [`SubscriptionCallbackMutation`](pinia.md#SubscriptionCallbackMutation)<`S`\> | -| `state` | `UnwrapRef`<`S`\> | +| `mutation` | [`SubscriptionCallbackMutation`](pinia.md#SubscriptionCallbackMutation)\<`S`\> | +| `state` | `UnwrapRef`\<`S`\> | ##### Returns @@ -206,7 +206,7 @@ ___ ### SubscriptionCallbackMutation -Ƭ **SubscriptionCallbackMutation**<`S`\>: [`SubscriptionCallbackMutationDirect`](../interfaces/pinia.SubscriptionCallbackMutationDirect.md) \| [`SubscriptionCallbackMutationPatchObject`](../interfaces/pinia.SubscriptionCallbackMutationPatchObject.md)<`S`\> \| [`SubscriptionCallbackMutationPatchFunction`](../interfaces/pinia.SubscriptionCallbackMutationPatchFunction.md) +Ƭ **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. @@ -220,7 +220,7 @@ ___ ### \_ActionsTree -Ƭ **\_ActionsTree**: `Record`<`string`, [`_Method`](pinia.md#_Method)\> +Ƭ **\_ActionsTree**: `Record`\<`string`, [`_Method`](pinia.md#_Method)\> Type of an object of Actions. For internal usage only. For internal use **only** @@ -229,7 +229,7 @@ ___ ### \_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` +Ƭ **\_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 @@ -241,7 +241,7 @@ ___ ### \_DeepPartial -Ƭ **\_DeepPartial**<`T`\>: { [K in keyof T]?: \_DeepPartial } +Ƭ **\_DeepPartial**\<`T`\>: \{ [K in keyof T]?: \_DeepPartial\ } Recursive `Partial`. Used by [['$patch']](pinia.md#Store). @@ -257,7 +257,7 @@ ___ ### \_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` +Ƭ **\_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** @@ -271,7 +271,7 @@ ___ ### \_ExtractActionsFromSetupStore\_Keys -Ƭ **\_ExtractActionsFromSetupStore\_Keys**<`SS`\>: keyof { [K in keyof SS as SS[K] extends \_Method ? K : never]: any } +Ƭ **\_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** @@ -286,7 +286,7 @@ ___ ### \_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` +Ƭ **\_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** @@ -300,7 +300,7 @@ ___ ### \_ExtractGettersFromSetupStore\_Keys -Ƭ **\_ExtractGettersFromSetupStore\_Keys**<`SS`\>: keyof { [K in keyof SS as SS[K] extends ComputedRef ? K : never]: any } +Ƭ **\_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** @@ -315,7 +315,7 @@ ___ ### \_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` +Ƭ **\_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** @@ -329,7 +329,7 @@ ___ ### \_ExtractStateFromSetupStore\_Keys -Ƭ **\_ExtractStateFromSetupStore\_Keys**<`SS`\>: keyof { [K in keyof SS as SS[K] extends \_Method \| ComputedRef ? never : K]: any } +Ƭ **\_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** @@ -344,7 +344,7 @@ ___ ### \_GettersTree -Ƭ **\_GettersTree**<`S`\>: `Record`<`string`, (`state`: `UnwrapRef`<`S`\> & `UnwrapRef`<[`PiniaCustomStateProperties`](../interfaces/pinia.PiniaCustomStateProperties.md)<`S`\>\>) => `any` \| () => `any`\> +Ƭ **\_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** @@ -359,7 +359,7 @@ ___ ### \_MapActionsObjectReturn -Ƭ **\_MapActionsObjectReturn**<`A`, `T`\>: { [key in keyof T]: A[T[key]] } +Ƭ **\_MapActionsObjectReturn**\<`A`, `T`\>: \{ [key in keyof T]: A[T[key]] } For internal use **only** @@ -368,13 +368,13 @@ For internal use **only** | Name | Type | | :------ | :------ | | `A` | `A` | -| `T` | extends `Record`<`string`, keyof `A`\> | +| `T` | extends `Record`\<`string`, keyof `A`\> | ___ ### \_MapActionsReturn -Ƭ **\_MapActionsReturn**<`A`\>: { [key in keyof A]: A[key] } +Ƭ **\_MapActionsReturn**\<`A`\>: \{ [key in keyof A]: A[key] } For internal use **only** @@ -388,7 +388,7 @@ ___ ### \_MapStateObjectReturn -Ƭ **\_MapStateObjectReturn**<`Id`, `S`, `G`, `A`, `T`\>: { [key in keyof T]: Function } +Ƭ **\_MapStateObjectReturn**\<`Id`, `S`, `G`, `A`, `T`\>: \{ [key in keyof T]: Function } For internal use **only** @@ -398,15 +398,15 @@ For internal use **only** | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | -| `T` | extends `Record`<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)<`Id`, `S`, `G`, `A`\>) => `any`\> = {} | +| `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 } +Ƭ **\_MapStateReturn**\<`S`, `G`, `Keys`\>: \{ [key in Keys]: Function } For internal use **only** @@ -415,14 +415,14 @@ For internal use **only** | Name | Type | | :------ | :------ | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `Keys` | extends keyof `S` \| keyof `G` = keyof `S` \| keyof `G` | ___ ### \_MapWritableStateObjectReturn -Ƭ **\_MapWritableStateObjectReturn**<`S`, `T`\>: { [key in keyof T]: Object } +Ƭ **\_MapWritableStateObjectReturn**\<`S`, `T`\>: \{ [key in keyof T]: Object } For internal use **only** @@ -431,13 +431,13 @@ For internal use **only** | Name | Type | | :------ | :------ | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `T` | extends `Record`<`string`, keyof `S`\> | +| `T` | extends `Record`\<`string`, keyof `S`\> | ___ ### \_MapWritableStateReturn -Ƭ **\_MapWritableStateReturn**<`S`\>: { [key in keyof S]: Object } +Ƭ **\_MapWritableStateReturn**\<`S`\>: \{ [key in keyof S]: Object } For internal use **only** @@ -475,7 +475,7 @@ ___ ### \_Spread -Ƭ **\_Spread**<`A`\>: `A` extends [infer L, ...(infer R)] ? [`_StoreObject`](pinia.md#_StoreObject)<`L`\> & [`_Spread`](pinia.md#_Spread)<`R`\> : `unknown` +Ƭ **\_Spread**\<`A`\>: `A` extends [infer L, ...(infer R)] ? [`_StoreObject`](pinia.md#_StoreObject)\<`L`\> & [`_Spread`](pinia.md#_Spread)\<`R`\> : `unknown` For internal use **only**. @@ -489,7 +489,7 @@ ___ ### \_StoreObject -Ƭ **\_StoreObject**<`S`\>: `S` extends [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md) ? { [Id in \`${Ids}${MapStoresCustomization extends Record<"suffix", infer Suffix\> ? Suffix : "Store"}\`]: Function } : {} +Ƭ **\_StoreObject**\<`S`\>: `S` extends [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\ ? \{ [Id in \`$\{Ids}$\{MapStoresCustomization extends Record\<"suffix", infer Suffix\> ? Suffix : "Store"}\`]: Function } : {} For internal use **only**. @@ -503,7 +503,7 @@ ___ ### \_StoreWithActions -Ƭ **\_StoreWithActions**<`A`\>: { [k in keyof A]: A[k] extends Function ? Function : never } +Ƭ **\_StoreWithActions**\<`A`\>: \{ [k in keyof A]: A[k] extends Function ? Function : never } Store augmented for actions. For internal usage only. For internal use **only** @@ -518,7 +518,7 @@ ___ ### \_StoreWithGetters -Ƭ **\_StoreWithGetters**<`G`\>: { readonly [k in keyof G]: G[k] extends Function ? R : UnwrapRef } +Ƭ **\_StoreWithGetters**\<`G`\>: \{ readonly [k in keyof G]: G[k] extends Function ? R : UnwrapRef\ } Store augmented with getters. For internal usage only. For internal use **only** @@ -533,7 +533,7 @@ ___ ### \_UnwrapAll -Ƭ **\_UnwrapAll**<`SS`\>: { [K in keyof SS]: UnwrapRef } +Ƭ **\_UnwrapAll**\<`SS`\>: \{ [K in keyof SS]: UnwrapRef\ } Type that enables refactoring through IDE. For internal use **only** @@ -578,7 +578,7 @@ new Vue({ ### acceptHMRUpdate -▸ **acceptHMRUpdate**<`Id`, `S`, `G`, `A`\>(`initialUseStore`, `hot`): (`newModule`: `any`) => `any` +▸ **acceptHMRUpdate**\<`Id`, `S`, `G`, `A`\>(`initialUseStore`, `hot`): (`newModule`: `any`) => `any` Creates an _accept_ function to pass to `import.meta.hot` in Vite applications. @@ -588,14 +588,14 @@ Creates an _accept_ function to pass to `import.meta.hot` in Vite applications. | :------ | :------ | | `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`\> | +| `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 | +| `initialUseStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | return of the defineStore to hot update | | `hot` | `any` | `import.meta.hot` | #### Returns @@ -639,7 +639,7 @@ ___ ### defineStore -▸ **defineStore**<`Id`, `S`, `G`, `A`\>(`id`, `options`): [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)<`Id`, `S`, `G`, `A`\> +▸ **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 @@ -649,7 +649,7 @@ Creates a `useStore` function that retrieves the store instance | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) = {} | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> = {} | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> = {} | | `A` | {} | #### Parameters @@ -657,13 +657,13 @@ Creates a `useStore` function that retrieves the store instance | 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 | +| `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`\> +[`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> -▸ **defineStore**<`Id`, `S`, `G`, `A`\>(`options`): [`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 @@ -673,20 +673,20 @@ Creates a `useStore` function that retrieves the store instance | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) = {} | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> = {} | +| `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 | +| `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`\> +[`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`\>\> +▸ **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 @@ -703,11 +703,11 @@ Creates a `useStore` function that retrieves the store instance | :------ | :------ | :------ | | `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 | +| `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`\>\> +[`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, [`_ExtractStateFromSetupStore`](pinia.md#_ExtractStateFromSetupStore)\<`SS`\>, [`_ExtractGettersFromSetupStore`](pinia.md#_ExtractGettersFromSetupStore)\<`SS`\>, [`_ExtractActionsFromSetupStore`](pinia.md#_ExtractActionsFromSetupStore)\<`SS`\>\> ___ @@ -744,7 +744,7 @@ ___ ### mapActions -▸ **mapActions**<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapActionsObjectReturn`](pinia.md#_MapActionsObjectReturn)<`A`, `KeyMapper`\> +▸ **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 @@ -757,20 +757,20 @@ the names of the resulting methods. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | -| `KeyMapper` | extends `Record`<`string`, keyof `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 | +| `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`\> +[`_MapActionsObjectReturn`](pinia.md#_MapActionsObjectReturn)\<`A`, `KeyMapper`\> **`Example`** @@ -789,7 +789,7 @@ export default { } ``` -▸ **mapActions**<`Id`, `S`, `G`, `A`\>(`useStore`, `keys`): [`_MapActionsReturn`](pinia.md#_MapActionsReturn)<`A`\> +▸ **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 @@ -801,19 +801,19 @@ of a component. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `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 | +| `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`\> +[`_MapActionsReturn`](pinia.md#_MapActionsReturn)\<`A`\> **`Example`** @@ -835,7 +835,7 @@ ___ ### mapGetters -▸ **mapGetters**<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)<`Id`, `S`, `G`, `A`, `KeyMapper`\> +▸ **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. @@ -845,26 +845,26 @@ Alias for `mapState()`. You should use `mapState()` instead. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | -| `KeyMapper` | extends `Record`<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)<`Id`, `S`, `G`, `A`\>) => `any`\> | +| `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`\> | +| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | | `keyMapper` | `KeyMapper` | #### Returns -[`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)<`Id`, `S`, `G`, `A`, `KeyMapper`\> +[`_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`\> +▸ **mapGetters**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): [`_MapStateReturn`](pinia.md#_MapStateReturn)\<`S`, `G`, `Keys`\> Alias for `mapState()`. You should use `mapState()` instead. @@ -874,7 +874,7 @@ Alias for `mapState()`. You should use `mapState()` instead. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | | `Keys` | extends `string` \| `number` \| `symbol` | @@ -882,12 +882,12 @@ Alias for `mapState()`. You should use `mapState()` instead. | Name | Type | | :------ | :------ | -| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)<`Id`, `S`, `G`, `A`\> | +| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)\<`Id`, `S`, `G`, `A`\> | | `keys` | readonly `Keys`[] | #### Returns -[`_MapStateReturn`](pinia.md#_MapStateReturn)<`S`, `G`, `Keys`\> +[`_MapStateReturn`](pinia.md#_MapStateReturn)\<`S`, `G`, `Keys`\> **`Deprecated`** @@ -897,7 +897,7 @@ ___ ### mapState -▸ **mapState**<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)<`Id`, `S`, `G`, `A`, `KeyMapper`\> +▸ **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 @@ -913,20 +913,20 @@ instance via `this`, it won't be typed. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | -| `KeyMapper` | extends `Record`<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)<`Id`, `S`, `G`, `A`\>) => `any`\> | +| `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 | +| `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`\> +[`_MapStateObjectReturn`](pinia.md#_MapStateObjectReturn)\<`Id`, `S`, `G`, `A`, `KeyMapper`\> **`Example`** @@ -953,7 +953,7 @@ export default { } ``` -▸ **mapState**<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): [`_MapStateReturn`](pinia.md#_MapStateReturn)<`S`, `G`, `Keys`\> +▸ **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 @@ -965,7 +965,7 @@ of a component. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | | `Keys` | extends `string` \| `number` \| `symbol` | @@ -973,12 +973,12 @@ of a component. | Name | Type | Description | | :------ | :------ | :------ | -| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)<`Id`, `S`, `G`, `A`\> | store to map from | +| `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`\> +[`_MapStateReturn`](pinia.md#_MapStateReturn)\<`S`, `G`, `Keys`\> **`Example`** @@ -1000,7 +1000,7 @@ ___ ### mapStores -▸ **mapStores**<`Stores`\>(`...stores`): [`_Spread`](pinia.md#_Spread)<`Stores`\> +▸ **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 @@ -1020,7 +1020,7 @@ of store definitions. #### Returns -[`_Spread`](pinia.md#_Spread)<`Stores`\> +[`_Spread`](pinia.md#_Spread)\<`Stores`\> **`Example`** @@ -1042,7 +1042,7 @@ ___ ### mapWritableState -▸ **mapWritableState**<`Id`, `S`, `G`, `A`, `KeyMapper`\>(`useStore`, `keyMapper`): [`_MapWritableStateObjectReturn`](pinia.md#_MapWritableStateObjectReturn)<`S`, `KeyMapper`\> +▸ **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 @@ -1054,22 +1054,22 @@ added. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | -| `KeyMapper` | extends `Record`<`string`, keyof `S`\> | +| `KeyMapper` | extends `Record`\<`string`, keyof `S`\> | #### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)<`Id`, `S`, `G`, `A`\> | store to map from | +| `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`\> +[`_MapWritableStateObjectReturn`](pinia.md#_MapWritableStateObjectReturn)\<`S`, `KeyMapper`\> -▸ **mapWritableState**<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): { [K in Keys]: Object } +▸ **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 @@ -1081,7 +1081,7 @@ of a component. | :------ | :------ | | `Id` | extends `string` | | `S` | extends [`StateTree`](pinia.md#StateTree) | -| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)<`S`\> | +| `G` | extends [`_GettersTree`](pinia.md#_GettersTree)\<`S`\> | | `A` | `A` | | `Keys` | extends `string` \| `number` \| `symbol` | @@ -1089,12 +1089,12 @@ of a component. | Name | Type | Description | | :------ | :------ | :------ | -| `useStore` | [`StoreDefinition`](../interfaces/pinia.StoreDefinition.md)<`Id`, `S`, `G`, `A`\> | store to map from | +| `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 } +\{ [K in Keys]: Object } ___ @@ -1169,7 +1169,7 @@ ___ ### skipHydrate -▸ **skipHydrate**<`T`\>(`obj`): `T` +▸ **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. @@ -1196,7 +1196,7 @@ ___ ### storeToRefs -▸ **storeToRefs**<`SS`\>(`store`): `StoreToRefs`<`SS`\> +▸ **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 @@ -1217,4 +1217,4 @@ completely ignored. #### Returns -`StoreToRefs`<`SS`\> +`StoreToRefs`\<`SS`\>