Property ... does not exists on type Store #880
Replies: 2 comments
-
I assume this is TypeScript throwing this error rather than a linter. If that's the case then you need to add the type definitions for the In short, create a declaration file (for example import 'pinia'
declare module 'pinia' {
export interface PiniaCustomProperties {
testMe: () => void
}
} |
Beta Was this translation helpful? Give feedback.
-
Hi,
Getting this Typescript error:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I created a PiniaPlugin with some actions like this
on my main.ts file I added pinia
on my components I use other pinia stores
when I call
store.testMe()
the function is handled oke, it all works without any problem. but the linter throws errors `Property testMe does not exists on type Store.how can I avoid this error from linter?
Beta Was this translation helpful? Give feedback.
All reactions