From: Eduardo San Martin Morote Date: Wed, 29 Sep 2021 09:08:04 +0000 (+0200) Subject: docs: update DefineStoreOptions in plugin section X-Git-Tag: pinia@2.0.0-rc.10~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6407d8cedb1f10263372eafafef445628c75d814;p=thirdparty%2Fvuejs%2Fpinia.git docs: update DefineStoreOptions in plugin section --- diff --git a/packages/docs/core-concepts/plugins.md b/packages/docs/core-concepts/plugins.md index d0a19c8a..028d278c 100644 --- a/packages/docs/core-concepts/plugins.md +++ b/packages/docs/core-concepts/plugins.md @@ -343,14 +343,16 @@ import 'pinia' declare module 'pinia' { export interface DefineStoreOptionsBase { - debounce?: { - // allow defining a number of ms for any of the actions - [k in keyof A]?: number - } + // allow defining a number of ms for any of the actions + debounce?: Partial, number>> } } ``` +:::tip +There is also a `StoreGetters` type to extract the _getters_ from a Store type. You can also extend the options of _setup stores_ or _option stores_ **only** by extending the types `DefineStoreOptions` and `DefineSetupStoreOptions` respectively. +::: + ## Nuxt.js When [using pinia alongside Nuxt](../ssr/nuxt.md), you will have to create a [Nuxt plugin](https://nuxtjs.org/docs/2.x/directory-structure/plugins) first. This will give you access to the `pinia` instance: