mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-09 22:40:18 +08:00
This fixes the resulting wrapped component type returned by the connect HOC when the `dispatchToProps` argument is an object. (Fixes issue #18955) Previously we were using `MapDispatchToPropsObject` but that doesn't work with `Omit<T, K>`, so dispatch props were being preserved on the resulting object. I've replaced that with `TDispatchProps` instead. I've added test code by @horiuchi, adapted from: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18955