[SOLVED] Unsafe member access Using "this" inside store actions (TypeScript) #962
Replies: 5 comments 2 replies
-
SOLVED?I remembered that in TypeScript functions can have a reference to "this" as first parameter and add a type to that parameter, so this seems to solve my issue... |
Beta Was this translation helpful? Give feedback.
-
This could be a misconfiguration in your tsconfig.json. A working config can be seen here. Maybe you are modifying a default value that isn't there |
Beta Was this translation helpful? Give feedback.
-
Still error after adding those new entries in the tsconfig and reloading VSCode. tsconfig.json:
|
Beta Was this translation helpful? Give feedback.
-
Dependencies:
|
Beta Was this translation helpful? Give feedback.
-
SolvedWhen I installed pinia |
Beta Was this translation helpful? Give feedback.
-
Using Pinia with TypeScript, I get an error when trying to read state items using "this" inside actions, and I have to tell the tslint to ignore it with
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
.Beta Was this translation helpful? Give feedback.
All reactions