Skip to content

API DocumentationDocs


API Documentation / pinia / StoreDefinition

Interface: StoreDefinition()<Id, S, G, A>

Return type of defineStore(). Function that allows instantiating a store.

Extended by

Type Parameters

Id extends string = string

S extends StateTree = StateTree

G = _GettersTree<S>

A = _ActionsTree

StoreDefinition(pinia?, hot?): Store<Id, S, G, A>

Return type of defineStore(). Function that allows instantiating a store.

Parameters

pinia?: null | Pinia

Pinia instance to retrieve the store

hot?: StoreGeneric

dev only hot module replacement

Returns

Store<Id, S, G, A>

Properties

$id

$id: Id

Id of the store. Used by map helpers.

Released under the MIT License.