You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autocomplete bug on vscode when using action in prepare/reducer format #680
Inside the src/features/todos you have the slice that include a "basic" function addTodo and a version with the format reducer/prepare. If you use the reducer/prepare version you shoudn't be able to access to autocomplete in other file from the folder (src/features/todos) but it just work well if you use the other version.
You still could see autocomplete with 'abc' symbols if you already use the function but that's all.
Yeah. So our TypeScript support is so good that it even works for JavaScript (which is why you are getting all that autocomplete), but there are some edge cases where our TypeScript cannot catch on everything that JavaScript code without types does.
I'll try to find a solution for this, but no guarantees. Writing TS to support JS is kind of bonkers ;)
Activity
phryneas commentedon Aug 14, 2020
Can you validate if it works when you annotate the method parameters?
LoiKos commentedon Aug 15, 2020
Tested on project and works fine !
phryneas commentedon Aug 15, 2020
Yeah. So our TypeScript support is so good that it even works for JavaScript (which is why you are getting all that autocomplete), but there are some edge cases where our TypeScript cannot catch on everything that JavaScript code without types does.
I'll try to find a solution for this, but no guarantees. Writing TS to support JS is kind of bonkers ;)
LoiKos commentedon Aug 18, 2020
Yeah it's pretty awesome !
Thank you if a fix is possible, it would be perfect :).
sweetliquid commentedon Sep 11, 2020
When I used prepare in Typescript, a type error occurred. Is it related to this issue?
phryneas commentedon Sep 11, 2020
@sweetliquid the prepare notation requires you to specify an explicit type for the
actionparameter for thereducer.sweetliquid commentedon Sep 13, 2020
Yes thank you, it works.