@AntJanus per #200 updates the types for connect to allow for a null first argument in the event that your component does not require a mapStateToThis function.
Also, makes various updates to the types, and adds type annotations (taken from redux) for an improved intellisense experience. Updates to the types themselves include:
replacing Reducer, MiddlewareArg, and Middleware with more precise types taken from redux typings
removing getReducer, which is no longer part of the redux API (so far as I can tell)
indicate that connect returns Unsubscribe
replace references to Object with the non-primitive object type, in mapDispatchToTarget - though these types could definitely be improved further and made more specific to avoid referencing this as all, however, I didn't have the time today to put together really well thought out types for this.
Let me know what you think or if you'd like to see any changes to this.
@AntJanus per #200 updates the types for
connect
to allow for a null first argument in the event that your component does not require amapStateToThis
function.Also, makes various updates to the types, and adds type annotations (taken from redux) for an improved intellisense experience. Updates to the types themselves include:
Unsubscribe
Object
with the non-primitiveobject
type, inmapDispatchToTarget
- though these types could definitely be improved further and made more specific to avoid referencing this as all, however, I didn't have the time today to put together really well thought out types for this.Let me know what you think or if you'd like to see any changes to this.
closes #200