react-redux-typescript
react-redux-typescript copied to clipboard
Type '{}' does not satisfy the constraint
I followed the instructions all the way to webpack.
I had to run webpack as ./node_modules/.bin/webpack
, so this might be the source of the issue, but I got:
ERROR in [at-loader] ./client/containers/greeting.ts:27:3 TS2344: Type '{}' does not satisfy the constraint 'Pick<Props, "greeting"> & Pick<Props, "updateGreeting">'. Type '{}' is not assignable to type 'Pick<Props, "greeting">'. Property 'greeting' is missing in type '{}'.
ERROR in [at-loader] ./client/containers/increment.ts:26:3 TS2344: Type '{}' does not satisfy the constraint 'Pick<Props, "count"> & Pick<Props, "increment">'. Type '{}' is not assignable to type 'Pick<Props, "count">'. Property 'count' is missing in type '{}'.
I think the connect
type definitions may have changed - it may work if you omit the {}
for now - so change <{}>
to <>
I will investigate and follow up.
Thanks for the fast reply. You're right, <{}>
was the issue. <any>
works, although I'm not sure that's the best solution.