declare module 'pinia' {
export interface DefineStoreOptionsBase<S, Store> {
- 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<Record<keyof StoreActions<Store>, 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: