Skip to content

Commit

Permalink
docs(api): updates
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Dec 24, 2023
1 parent 75f5c51 commit 7b0746b
Show file tree
Hide file tree
Showing 16 changed files with 151 additions and 152 deletions.
4 changes: 2 additions & 2 deletions packages/docs/api/interfaces/pinia.DefineSetupStoreOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineSetupStoreOptions

# Interface: DefineSetupStoreOptions<Id, S, G, A\>
# Interface: DefineSetupStoreOptions\<Id, S, G, A\>

[pinia](../modules/pinia.md).DefineSetupStoreOptions

Expand All @@ -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`**

Expand Down
14 changes: 7 additions & 7 deletions packages/docs/api/interfaces/pinia.DefineStoreOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptions

# Interface: DefineStoreOptions<Id, S, G, A\>
# Interface: DefineStoreOptions\<Id, S, G, A\>

[pinia](../modules/pinia.md).DefineStoreOptions

Expand All @@ -26,23 +26,23 @@ 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`**

## 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` **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` **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.

Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptionsBase

# Interface: DefineStoreOptionsBase<S, Store\>
# Interface: DefineStoreOptionsBase\<S, Store\>

[pinia](../modules/pinia.md).DefineStoreOptionsBase

Expand Down
12 changes: 6 additions & 6 deletions packages/docs/api/interfaces/pinia.DefineStoreOptionsInPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / DefineStoreOptionsInPlugin

# Interface: DefineStoreOptionsInPlugin<Id, S, G, A\>
# Interface: DefineStoreOptionsInPlugin\<Id, S, G, A\>

[pinia](../modules/pinia.md).DefineStoreOptionsInPlugin

Expand All @@ -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`**

Expand All @@ -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.

Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions packages/docs/api/interfaces/pinia.Pinia.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/docs/api/interfaces/pinia.PiniaCustomProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaCustomProperties

# Interface: PiniaCustomProperties<Id, S, G, A\>
# Interface: PiniaCustomProperties\<Id, S, G, A\>

[pinia](../modules/pinia.md).PiniaCustomProperties

Expand All @@ -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) |
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaCustomStateProperties

# Interface: PiniaCustomStateProperties<S\>
# Interface: PiniaCustomStateProperties\<S\>

[pinia](../modules/pinia.md).PiniaCustomStateProperties

Expand Down
6 changes: 3 additions & 3 deletions packages/docs/api/interfaces/pinia.PiniaPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)\>\>
10 changes: 5 additions & 5 deletions packages/docs/api/interfaces/pinia.PiniaPluginContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / PiniaPluginContext

# Interface: PiniaPluginContext<Id, S, G, A\>
# Interface: PiniaPluginContext\<Id, S, G, A\>

[pinia](../modules/pinia.md).PiniaPluginContext

Expand All @@ -16,22 +16,22 @@ 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()`.

___

### 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()`.

Expand All @@ -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.
8 changes: 4 additions & 4 deletions packages/docs/api/interfaces/pinia.StoreDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / StoreDefinition

# Interface: StoreDefinition<Id, S, G, A\>
# Interface: StoreDefinition\<Id, S, G, A\>

[pinia](../modules/pinia.md).StoreDefinition

Expand All @@ -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
Expand All @@ -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.

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/docs/api/interfaces/pinia.StoreProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / StoreProperties

# Interface: StoreProperties<Id\>
# Interface: StoreProperties\<Id\>

[pinia](../modules/pinia.md).StoreProperties

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / SubscriptionCallbackMutationPatchObject

# Interface: SubscriptionCallbackMutationPatchObject<S\>
# Interface: SubscriptionCallbackMutationPatchObject\<S\>

[pinia](../modules/pinia.md).SubscriptionCallbackMutationPatchObject

Expand Down Expand Up @@ -41,7 +41,7 @@ ___

### payload

**payload**: [`_DeepPartial`](../modules/pinia.md#_DeepPartial)<`S`\>
**payload**: [`_DeepPartial`](../modules/pinia.md#_DeepPartial)\<`S`\>

Object passed to `store.$patch()`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ editLink: false

[API Documentation](../index.md) / [pinia](../modules/pinia.md) / \_StoreOnActionListenerContext

# Interface: \_StoreOnActionListenerContext<Store, ActionName, A\>
# Interface: \_StoreOnActionListenerContext\<Store, ActionName, A\>

[pinia](../modules/pinia.md)._StoreOnActionListenerContext

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
Loading

0 comments on commit 7b0746b

Please sign in to comment.