diff --git a/packages/pinia/src/storeToRefs.ts b/packages/pinia/src/storeToRefs.ts index a6b91217e..c56ff6a83 100644 --- a/packages/pinia/src/storeToRefs.ts +++ b/packages/pinia/src/storeToRefs.ts @@ -29,10 +29,9 @@ type ToComputedRefs = { /** * Extracts the refs of a state object from a store. If the state value is a Ref or type that extends ref, it will be kept as is. - * Otherwise, it will be converted into a Ref. - * @internal + * Otherwise, it will be converted into a Ref. **Internal type DO NOT USE**. */ -type ToStateRefs = +type _ToStateRefs = SS extends Store< string, infer UnwrappedState, @@ -50,7 +49,7 @@ type ToStateRefs = * Extracts the return type for `storeToRefs`. * Will convert any `getters` into `ComputedRef`. */ -export type StoreToRefs = ToStateRefs & +export type StoreToRefs = _ToStateRefs & ToRefs>> & ToComputedRefs>