Let’s say I define some custom properties for Pinia stores:
declare module 'pinia' {
export interface PiniaCustomProperties {
readonly router: Router;
set hello(value: string | Ref<string>)
get hello(): string
}
}
How can I access these custom properties within a setup store?
export const useFilterStore = defineStore('filter', () => {
// how to access "hello" and "router" here?
console.log(this.hello) // <--- this is undefined
console.log(hello) // <--- hello is undefined
})