StateTree,
Store,
StoreDefinition,
+ ActionsTree,
} from './types'
type ComponentPublicInstance = Vue
Id extends string = string,
S extends StateTree = StateTree,
G extends GettersTree<S> = GettersTree<S>,
- A = Record<string, _Method>
+ A = ActionsTree
>(
vm: ComponentPublicInstance,
useStore: StoreDefinition<Id, S, G, A>
-import { PluginFunction } from 'vue'
+import type { PluginFunction } from 'vue'
import { piniaSymbol } from './rootStore'
/**
StoreWithState,
StateDescriptor,
PiniaCustomProperties,
- GenericStore,
GettersTree,
- _Method,
Store,
DefineStoreOptions,
+ ActionsTree,
} from './types'
-import { VueConstructor } from 'vue'
+import type { VueConstructor } from 'vue'
import type Vue from 'vue'
/**
Id extends string = string,
S extends StateTree = StateTree,
G extends GettersTree<S> = GettersTree<S>,
- A = Record<string, _Method>
+ A = ActionsTree
> {
/**
* pinia instance.
Id extends string,
S extends StateTree,
G extends GettersTree<S>,
- A extends Record<string, _Method>
+ A extends ActionsTree
>(
partialStore: StoreWithState<Id, S>,
descriptor: StateDescriptor<S>,
storeAndDescriptor[1],
id,
getters as GettersTree<S> | undefined,
- actions as Record<string, _Method> | undefined,
+ actions as ActionsTree | undefined,
// @ts-expect-error: because of the extend on Actions
options
)
storeAndDescriptor[1],
id,
getters as GettersTree<S> | undefined,
- actions as Record<string, _Method> | undefined,
+ actions as ActionsTree | undefined,
// @ts-expect-error: because of the extend on Actions
options
)
Id extends string = string,
S extends StateTree = StateTree,
G extends GettersTree<S> = GettersTree<S>,
- A = Record<string, _Method>
+ A = ActionsTree
> {}
/**
-import { computed, ref } from 'vue'
+import { computed, ref } from '@vue/composition-api'
import { defineStore, expectType } from './'
const name = ref('Eduardo')