Should store.update be type safe? #289
Replies: 4 comments
-
Interested to know if you found an alternative or if @NetanelBasal as a recommendation on this ? That's the only thing that bothers me a bit when using Elf in a team project. |
Beta Was this translation helpful? Give feedback.
-
Yea I agree.... I will try to get a bit more into that but from a quick check, @NetanelBasal thought about that. Either a problem with the lang support in our IDE or something else...
|
Beta Was this translation helpful? Give feedback.
-
I played with this lately. It seems to be a typescript problem. TS seems to only check all required properties and not pay attention to the unrelative to type ones if you haven't added an explicit return type. And when you add an explicit return type to the function declaration TS starts to check for full equality to the type. |
Beta Was this translation helpful? Give feedback.
-
As of now there's |
Beta Was this translation helpful? Give feedback.
-
I really should not be able to do this right, where
unknown
is NOT declared on thewithProps
interface?but I can!
Beta Was this translation helpful? Give feedback.
All reactions