We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc8c28b commit d14e1a7Copy full SHA for d14e1a7
packages/pinia/src/types.ts
@@ -474,7 +474,9 @@ export type _StoreWithGetters_Writable<G> = {
474
? K
475
: // NOTE: there is still no way to have a different type for a setter and a getter in TS with dynamic keys
476
// https://github.com/microsoft/TypeScript/issues/43826
477
- never]: G[K] extends WritableComputedRef<infer R, infer _S> ? R : never
+ // NOTE: to support Vue 2.7, we need to use Readonly and not infer the second type param
478
+ // https://github.com/vuejs/pinia/issues/2767#issuecomment-2601284366
479
+ never]: G[K] extends Readonly<WritableComputedRef<infer R>> ? R : never
480
}
481
482
/**
0 commit comments