From: Eduardo San Martin Morote Date: Wed, 29 May 2024 07:06:14 +0000 (+0200) Subject: docs: fix mockedStore example X-Git-Tag: @pinia/nuxt@0.5.2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72186910bb01b4dbb0c771ee3a098a2e1a17c48c;p=thirdparty%2Fvuejs%2Fpinia.git docs: fix mockedStore example Close #1605 --- diff --git a/packages/docs/cookbook/testing.md b/packages/docs/cookbook/testing.md index 0127440a..8c992b11 100644 --- a/packages/docs/cookbook/testing.md +++ b/packages/docs/cookbook/testing.md @@ -186,7 +186,7 @@ function mockedStore unknown>( ? Store< Id, State, - Getters, + Record, { [K in keyof Actions]: Actions[K] extends ( ...args: infer Args @@ -195,7 +195,9 @@ function mockedStore unknown>( Mock : Actions[K] } - > + > & { + [K in keyof Getters]: Getters[K] extends ComputedRef ? T : never + } : ReturnType { return useStore() as any }