Description
using as BaseProps is incorrect on this line, isn't it? Shouldn't that be as Diff<BaseProps, InjectedProps>? https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hoc/with-connected-count.tsx#L43
As far as I can tell all properties of InjectedProps have been removed on line 37, and restProps now contains only those properties which would be in Diff<BaseProps, InjectedProps>.
Suggested solution(s)
Maybe on line 23 or line 29, add:
type RemainingProps = Diff<BaseProps, InjectedProps>
And then use it as the cast type on line 43, and use it again on line 52.
Description
using
as BasePropsis incorrect on this line, isn't it? Shouldn't that beas Diff<BaseProps, InjectedProps>? https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hoc/with-connected-count.tsx#L43As far as I can tell all properties of
InjectedPropshave been removed on line 37, andrestPropsnow contains only those properties which would be inDiff<BaseProps, InjectedProps>.Suggested solution(s)
Maybe on line 23 or line 29, add:
type RemainingProps = Diff<BaseProps, InjectedProps>And then use it as the cast type on line 43, and use it again on line 52.