]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: api
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 16 Apr 2024 15:31:23 +0000 (17:31 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 16 Apr 2024 15:31:23 +0000 (17:31 +0200)
packages/docs/api/interfaces/pinia.DefineStoreOptions.md
packages/docs/api/interfaces/pinia.DefineStoreOptionsInPlugin.md
packages/docs/api/interfaces/pinia._StoreOnActionListenerContext.md
packages/docs/api/interfaces/pinia_testing.TestingOptions.md
packages/docs/api/modules/pinia.md
packages/docs/public/vue-cert-logo.svg [new file with mode: 0644]

index 8c769ec1a8e65667b74974328b837b08c9ec90de..6d43bc67c3920e0dfae1579c45923044e702eac5 100644 (file)
@@ -67,9 +67,6 @@ correct typings!
 
 ▸ (): `S`
 
-Function to create a fresh state. **Must be an arrow function** to ensure
-correct typings!
-
 ##### Returns
 
 `S`
index c5634ecd4347d99ab497b814a10d4c0b831c5ca5..d7fafe9f5042fd9940d98c65440c80610025e2bf 100644 (file)
@@ -60,9 +60,6 @@ correct typings!
 
 ▸ (): `S`
 
-Function to create a fresh state. **Must be an arrow function** to ensure
-correct typings!
-
 ##### Returns
 
 `S`
index abd1608e8eade2b457b802205de46968b059aec4..4fd238ec7d0231d5ac6fc5186d84ca3ec658bbaa 100644 (file)
@@ -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`\<`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.
@@ -33,14 +33,11 @@ of the action, if it's a Promise, it will be unwrapped.
 
 ▸ (`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
 
 | 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`\<`A`\>[`ActionName`]\>\>) => `void` : () => `void` |
 
 ##### Returns
 
@@ -50,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`\<`A`\>[`ActionName`]\> : `unknown`[]
 
 Parameters passed to the action
 
@@ -75,9 +72,6 @@ stop it from propagating.
 
 ▸ (`callback`): `void`
 
-Sets up a hook if the action fails. Return `false` to catch the error and
-stop it from propagating.
-
 ##### Parameters
 
 | Name | Type |
index 6b18f13971a2380f39611ccbd320d6dc5cfb2a05..3d3db832d92b62ad8622193a40b9fc461bb3a546 100644 (file)
@@ -22,10 +22,6 @@ with `jest.fn` in Jest projects or `vi.fn` in Vitest projects if
 
 ▸ (`fn?`): (...`args`: `any`[]) => `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.
-
 ##### Parameters
 
 | Name | Type |
index 0cb48eda53505e72e062be6a94bce7dc0b09dcc5..ec780193766d03dad5ac94ed99f0debe37eeb4cd 100644 (file)
@@ -398,7 +398,7 @@ 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`\> \| \{ `[key: string]`: `ComputedRef`;  } |
 | `A` | `A` |
 | `T` | extends `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)\<`Id`, `S`, `G`, `A`\>) => `any`\> = {} |
 
@@ -415,7 +415,7 @@ 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`\> \| \{ `[key: string]`: `ComputedRef`;  } |
 | `Keys` | extends keyof `S` \| keyof `G` = keyof `S` \| keyof `G` |
 
 ___
@@ -717,6 +717,7 @@ ___
 
 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
 
@@ -845,7 +846,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`\> \| \{ `[key: string]`: `ComputedRef`;  } |
 | `A` | `A` |
 | `KeyMapper` | extends `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)\<`Id`, `S`, `G`, `A`\>) => `any`\> |
 
@@ -874,7 +875,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`\> \| \{ `[key: string]`: `ComputedRef`;  } |
 | `A` | `A` |
 | `Keys` | extends `string` \| `number` \| `symbol` |
 
@@ -913,7 +914,7 @@ 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`\> \| \{ `[key: string]`: `ComputedRef`;  } |
 | `A` | `A` |
 | `KeyMapper` | extends `Record`\<`string`, keyof `S` \| keyof `G` \| (`store`: [`Store`](pinia.md#Store)\<`Id`, `S`, `G`, `A`\>) => `any`\> |
 
@@ -965,7 +966,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`\> \| \{ `[key: string]`: `ComputedRef`;  } |
 | `A` | `A` |
 | `Keys` | extends `string` \| `number` \| `symbol` |
 
diff --git a/packages/docs/public/vue-cert-logo.svg b/packages/docs/public/vue-cert-logo.svg
new file mode 100644 (file)
index 0000000..e01247d
--- /dev/null
@@ -0,0 +1,5 @@
+<svg fill="none" viewBox="0 0 82 84" height="84" width="82" xmlns="http://www.w3.org/2000/svg" alt="Logo" class="hidden h-[50px] w-[50px] dark:block"><title xmlns="http://www.w3.org/2000/svg">Home</title>
+<path xmlns="http://www.w3.org/2000/svg" d="M0 36.2975L4.54024 42.2261L0 48.1495L6.0213 52.5485L3.31963 59.519L10.3317 62.0341L9.69332 69.4872L17.1242 69.9183L18.6053 77.2482L25.8574 75.5543L29.3302 82.1707L35.8112 78.4904L41 83.8543L46.1888 78.4904L52.6698 82.1707L56.1426 75.5543L63.3947 77.2482L64.8758 69.9183L72.3067 69.4872L71.6683 62.0341L78.6804 59.519L75.9787 52.5485L82 48.1495L77.4598 42.2261L82 36.2975L75.9787 31.8986L78.6804 24.9281L71.6683 22.4129L72.3067 14.9599L64.8758 14.5339L63.3947 7.20401L56.1426 8.89275L52.6698 2.28151L46.1888 5.9567L41 0.592773L35.8112 5.9567L29.3302 2.28151L25.8574 8.89275L18.6053 7.20401L17.1242 14.5339L9.69332 14.9599L10.3317 22.4129L3.31963 24.9281L6.0213 31.8986L0 36.2975Z" fill="white"></path>
+<path xmlns="http://www.w3.org/2000/svg" d="M20.9512 26.7803L40.691 60.3675L60.4309 26.7803L52.535 26.7803L40.691 46.9326L28.7484 26.7803L20.9512 26.7803Z" fill="#3DD491"></path>
+<path xmlns="http://www.w3.org/2000/svg" d="M28.8452 26.7803L40.7383 47.196L52.5331 26.7803L45.2596 26.7803L40.7383 34.6325L36.1187 26.7803L28.8452 26.7803Z" fill="#2C3D4F"></path>
+</svg>