API Documentation / pinia / StoreDefinition
Interface: StoreDefinition<Id, S, G, A> ¶
pinia.StoreDefinition
Type parameters ¶
Name | Type |
---|---|
Id | extends string = string |
S | extends StateTree = StateTree |
G | _GettersTree <S > |
A | _ActionsTree |
Callable ¶
StoreDefinition ¶
▸ StoreDefinition(pinia?
, hot?
): Store
<Id
, S
, G
, A
>
Returns a store, creates it if necessary.
Parameters ¶
Name | Type | Description |
---|---|---|
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.