]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: api
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 26 Jul 2024 12:44:18 +0000 (14:44 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 26 Jul 2024 12:44:18 +0000 (14:44 +0200)
packages/docs/api/pinia/functions/mapActions.md
packages/docs/api/pinia/functions/mapGetters.md
packages/docs/api/pinia/functions/mapState.md
packages/docs/api/pinia/functions/mapWritableState.md
packages/docs/api/pinia/functions/setActivePinia.md
packages/docs/api/pinia/interfaces/DefineStoreOptionsInPlugin.md
packages/docs/api/pinia/interfaces/PiniaPlugin.md
packages/docs/api/pinia/interfaces/SetupStoreDefinition.md
packages/docs/api/pinia/interfaces/StoreDefinition.md

index 409c503bd775c682c3583d68bbe34d4a1c324e27..927e272bff0e31b99a86c4d566354295fd175903 100644 (file)
@@ -57,6 +57,14 @@ object to define new names for the actions
 
 [`_MapActionsObjectReturn`](../type-aliases/MapActionsObjectReturn.md)\<`A`, `KeyMapper`\>
 
+### Param
+
+store to map from
+
+### Param
+
+array or object
+
 ### Example
 
 ```js
@@ -106,6 +114,14 @@ array of action names to map
 
 [`_MapActionsReturn`](../type-aliases/MapActionsReturn.md)\<`A`\>
 
+### Param
+
+store to map from
+
+### Param
+
+array or object
+
 ### Example
 
 ```js
index 28c8e52480262203cbaee7829beddf6955bf070d..75fe09bd1d6171c7355530d46ece7f8f65270059 100644 (file)
@@ -54,6 +54,10 @@ object of state properties or getters
 
 [`_MapStateObjectReturn`](../type-aliases/MapStateObjectReturn.md)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
 
+### Deprecated
+
+use `mapState()` instead.
+
 ### Example
 
 ```js
@@ -113,6 +117,10 @@ array of state properties or getters
 
 [`_MapStateReturn`](../type-aliases/MapStateReturn.md)\<`S`, `G`, `Keys`\>
 
+### Deprecated
+
+use `mapState()` instead.
+
 ### Example
 
 ```js
index 0670d08ce247c97084dd2a9648bd06f60f6ca8f0..17983169a366bf95fa7cc825490c22281da21079 100644 (file)
@@ -60,6 +60,14 @@ object of state properties or getters
 
 [`_MapStateObjectReturn`](../type-aliases/MapStateObjectReturn.md)\<`Id`, `S`, `G`, `A`, `KeyMapper`\>
 
+### Param
+
+store to map from
+
+### Param
+
+array or object
+
 ### Example
 
 ```js
@@ -119,6 +127,14 @@ array of state properties or getters
 
 [`_MapStateReturn`](../type-aliases/MapStateReturn.md)\<`S`, `G`, `Keys`\>
 
+### Param
+
+store to map from
+
+### Param
+
+array or object
+
 ### Example
 
 ```js
index caf59c3be30b1ed140428c58f77650e880d5af07..c8b572d022cae29db80d76396dd0691a85c5d714 100644 (file)
@@ -56,6 +56,14 @@ object of state properties
 
 [`_MapWritableStateObjectReturn`](../type-aliases/MapWritableStateObjectReturn.md)\<`S`, `KeyMapper`\>
 
+### Param
+
+store to map from
+
+### Param
+
+array or object
+
 ## mapWritableState(useStore, keys)
 
 > **mapWritableState**\<`Id`, `S`, `G`, `A`, `Keys`\>(`useStore`, `keys`): `{ [K in Keys]: Object }`
@@ -89,3 +97,11 @@ array of state properties
 ### Returns
 
 `{ [K in Keys]: Object }`
+
+### Param
+
+store to map from
+
+### Param
+
+array or object
index 110d134ec8358d57b5154af31d79073cb7512755..1d97b0302e5a6172cdb9cb5f9afe88b43e52c8ac 100644 (file)
@@ -32,6 +32,10 @@ actions and getters
 
 [`Pinia`](../interfaces/Pinia.md)
 
+### Param
+
+Pinia instance
+
 ## setActivePinia(pinia)
 
 > **setActivePinia**(`pinia`): `undefined`
@@ -47,6 +51,10 @@ actions and getters
 
 `undefined`
 
+### Param
+
+Pinia instance
+
 ## setActivePinia(pinia)
 
 > **setActivePinia**(`pinia`): `undefined` \| [`Pinia`](../interfaces/Pinia.md)
@@ -61,3 +69,7 @@ actions and getters
 ### Returns
 
 `undefined` \| [`Pinia`](../interfaces/Pinia.md)
+
+### Param
+
+Pinia instance
index 65cc86a3d23cb67aa52080fb2fe0f212963bb1ea..543a0f0b9ad3cef00ef020e95763d88a93127d03 100644 (file)
@@ -88,10 +88,6 @@ initialState
 
 `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
@@ -109,3 +105,7 @@ const useStore = defineStore('main', {
   }
 })
 ```
+
+#### Inherited from
+
+`Omit.hydrate`
index 2f1c9b38a81ff3e81b49d0e97ff6db506a2e429b..598048351d1a0c9afe0af39af92221c2960239f2 100644 (file)
@@ -14,8 +14,7 @@ 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.
+Plugin to extend every store.
 
 ## Parameters
 
index 1288a751e0dc39c37a9194b035f2af3e760140e8..494af3fbd3c3b02be484c550c05bd4884ae70329 100644 (file)
@@ -30,7 +30,9 @@ Return type of `defineStore()` with a setup function.
 
 > **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.
+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
 
 ## Parameters
 
@@ -46,6 +48,10 @@ dev only hot module replacement
 
 [`Store`](../type-aliases/Store.md)\<`Id`, [`_ExtractStateFromSetupStore`](../type-aliases/ExtractStateFromSetupStore.md)\<`SS`\>, [`_ExtractGettersFromSetupStore`](../type-aliases/ExtractGettersFromSetupStore.md)\<`SS`\>, [`_ExtractActionsFromSetupStore`](../type-aliases/ExtractActionsFromSetupStore.md)\<`SS`\>\>
 
+## See
+
+[StoreDefinition](StoreDefinition.md)
+
 ## Properties
 
 ### $id
index f046eef8fded8f91efa16d61c62ddfd285da4e83..d58231ac87f46d4e937b4cd31eb41cd5dbd1f5d1 100644 (file)
@@ -28,7 +28,7 @@ Return type of `defineStore()`. Function that allows instantiating a store.
 
 > **StoreDefinition**(`pinia`?, `hot`?): [`Store`](../type-aliases/Store.md)\<`Id`, `S`, `G`, `A`\>
 
-Returns a store, creates it if necessary.
+Return type of `defineStore()`. Function that allows instantiating a store.
 
 ## Parameters