}
/**
- * @internal
+ * For internal use **only**.
*/
export type _StoreObject<S> = S extends StoreDefinition<
infer Ids,
: {}
/**
- * @internal
+ * For internal use **only**.
*/
export type _Spread<A extends readonly any[]> = A extends [infer L, ...infer R]
? _StoreObject<L> & _Spread<R>
}
/**
- * @internal
+ * For internal use **only**
*/
export type _MapStateReturn<
S extends StateTree,
}
/**
- * @internal
+ * For internal use **only**
*/
export type _MapStateObjectReturn<
Id extends string,
export const mapGetters = mapState
/**
- * @internal
+ * For internal use **only**
*/
export type _MapActionsReturn<A> = {
[key in keyof A]: A[key]
}
/**
- * @internal
+ * For internal use **only**
*/
export type _MapActionsObjectReturn<A, T extends Record<string, keyof A>> = {
[key in keyof T]: A[T[key]]
}
/**
- * @internal
+ * For internal use **only**
*/
export type _MapWritableStateReturn<S extends StateTree> = {
[key in keyof S]: {
}
/**
- * @internal
+ * For internal use **only**
*/
export type _MapWritableStateObjectReturn<
S extends StateTree,
/**
* Recursive `Partial<T>`. Used by {@link Store.$patch}.
*
- * @internal
+ * For internal use **only**
*/
export type _DeepPartial<T> = { [K in keyof T]?: _DeepPartial<T[K]> }
// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }
/**
* Actual type for {@link StoreOnActionListenerContext}. Exists for refactoring
* purposes. For internal use only.
- * @internal
+ * For internal use **only**
*/
export interface _StoreOnActionListenerContext<
Store,
* 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
* that should be displayed in devtools.
- *
- * @internal
*/
_customProperties: Set<string>
/**
* Generic type for a function that can infer arguments and return type
*
- * @internal
+ * For internal use **only**
*/
export type _Method = (...args: any[]) => any
// in this type we forget about this because otherwise the type is recursive
/**
* Store augmented for actions. For internal usage only.
- * @internal
+ * For internal use **only**
*/
export type _StoreWithActions<A> = {
[k in keyof A]: A[k] extends (...args: infer P) => infer R
/**
* Store augmented with getters. For internal usage only.
- * @internal
+ * For internal use **only**
*/
export type _StoreWithGetters<G> = {
readonly [k in keyof G]: G[k] extends (...args: any[]) => infer R
/**
* Type of an object of Getters that infers the argument. For internal usage only.
- * @internal
+ * For internal use **only**
*/
export type _GettersTree<S extends StateTree> = Record<
string,
/**
* Type of an object of Actions. For internal usage only.
- * @internal
+ * For internal use **only**
*/
export type _ActionsTree = Record<string, _Method>
/**
* Type that enables refactoring through IDE.
- * @internal
+ * For internal use **only**
*/
export type _ExtractStateFromSetupStore_Keys<SS> = keyof {
[K in keyof SS as SS[K] extends _Method | ComputedRef ? never : K]: any
/**
* Type that enables refactoring through IDE.
- * @internal
+ * For internal use **only**
*/
export type _ExtractActionsFromSetupStore_Keys<SS> = keyof {
[K in keyof SS as SS[K] extends _Method ? K : never]: any
/**
* Type that enables refactoring through IDE.
- * @internal
+ * For internal use **only**
*/
export type _ExtractGettersFromSetupStore_Keys<SS> = keyof {
[K in keyof SS as SS[K] extends ComputedRef ? K : never]: any
/**
* Type that enables refactoring through IDE.
- * @internal
+ * For internal use **only**
*/
export type _UnwrapAll<SS> = { [K in keyof SS]: UnwrapRef<SS[K]> }
/**
- * @internal
+ * For internal use **only**
*/
export type _ExtractStateFromSetupStore<SS> = SS extends undefined | void
? {}
: never
/**
- * @internal
+ * For internal use **only**
*/
export type _ExtractActionsFromSetupStore<SS> = SS extends undefined | void
? {}
: never
/**
- * @internal
+ * For internal use **only**
*/
export type _ExtractGettersFromSetupStore<SS> = SS extends undefined | void
? {}