pinia-class-component
pinia-class-component copied to clipboard
ECMAScript / TypeScript decorator for class-style Pinia store.
Hello! I was experimenting adding `$reset` to a setup function store (Composition API style), and found about this lib in the process. Tried it, and `$reset` is not resetting the...
``` import { Pinia } from 'pinia-class-component' @Store export class Parent extends Pinia { protected _name?: string get name(){ return this._name } setName(name: string) { this._name = name } }...
Actually, it looks like only computed properties are handled as getters. Regarding the [Pinia documentation](https://pinia.vuejs.org/core-concepts/getters.html#passing-arguments-to-getters), parametrized getters are also allowed. By changing the detection mecanism, this library could allow some...