3 ms·
Passing props through a higher-order component using JSX's spread operator instead of the attribute syntax, e.g. `{...{...props, foo, }}` and accessing that pro
by maxhallinan 8y ago
Passing props through a higher-order component using JSX's spread operator instead of the attribute syntax, e.g. `{...{...props, foo, }}` and accessing that prop in the wrapped component. I found it was possible with the attribute syntax. More examples can be found in the issues for `@types/ramda`. In some cases, the types are incorrect. In other cases, TypeScript's type inference is too weak.
- tom_ 8y agoFrom your description, that sounds like the compiler accepting something that isn't correct. I'm more interested in the case(s?) mentioned where the types are correct and the compiler won't accept the code. I will have a quick skim through the @types/ramda issues, thanks.
- maxhallinan 8y agoThe compiler was telling me that there was no field foo on props but there clearly was.
- pas 8y agoLack of inference is usually not considered a soundness issue.