Issue 1:
I tried using the @types/react-redux package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow.

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @surgeboris

The following (self-contained) component stopped working after upgrading @types/react-redux from v6.0.9 to v6.0.10:

import * as React from "react";
import { connect } from "react-redux";
import { Dispatch } from "redux";

interface Item {
id: number;
content: string;
}

interface RootState {
items: Item[];
}

interface StateProps {
items: RootState["items"];
}

interface DispatchProps {
remove: (item: Item) => () => void;
}

function BaseItemList({ items, remove }: StateProps & DispatchProps) {
return (
<ol>
{items.map((item) => (
<li key={item.id}>
{item.content}

<button onClick={remove(item)}>
Remove
</button>
</li>
))}
</ol>
);
}

const mapStateToProps = ({ items }: RootState): StateProps => ({ items });

const mapDispatchToProps = (dispatch: Dispatch): DispatchProps => ({
remove: (item) => () => dispatch({ type: "REMOVE_ITEM", item }),
});

export const ItemList = connect(mapStateToProps, mapDispatchToProps)(BaseItemList);

After the upgrade, the last line lets TS complain with error TS2345:

Argument of type '({ items, remove }: StateProps & DispatchProps) => Element' is not assignable to parameter of type 'ComponentType<Matching<StateProps & { remove: () => void; }, StateProps & DispatchProps>>'.
Type '({ items, remove }: StateProps & DispatchProps) => Element' is not assignable to type 'FunctionComponent<Matching<StateProps & { remove: () => void; }, StateProps & DispatchProps>>'.
Types of parameters '__0' and 'props' are incompatible.
Type 'Matching<StateProps & { remove: () => void; }, StateProps & DispatchProps> & { children?: ReactNode; }' is not assignable to type 'StateProps & DispatchProps'.
Type 'Matching<StateProps & { remove: () => void; }, StateProps & DispatchProps> & { children?: ReactNode; }' is not assignable to type 'DispatchProps'.
Types of property 'remove' are incompatible.
Type '() => void' is not assignable to type '(item: Item) => () => void'.
Type 'void' is not assignable to type '() => void'. [2345]

Issue 2:
I tried using the @types/react-redux package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @surgeboris

Hi @surgeboris, I see that your recent changes intend is to "properly support thunks". However they seem to have had the exact opposite effect in our code base!

This code works in 6.0.9:

export const OrderForm = connect(
(state: State) => ({
order: getOrder(state),
initialOrder: Order.createEmpty(),
isConfirming: isConfirming(state),
externalQuote: getExternalQuote(state),
panelQuote: getPanelQuote(state),
}),
{
onCancel: cancelOrder,
fetchExternalQuote,
fetchPanelQuote,
fetchQuoteQueued,
confirmOrder,
createOrder,
}

The new error in 6.0.10:

Argument of type 'typeof OrderForm' is not assignable to parameter of type 'ComponentType<Matching<{ order: Readonly<PermittedOrderParams>; initialOrder: PermittedOrderParams; isConfirming: boolean; externalQuote: Readonly<ThirdPartyQuote>; panelQuote: Readonly<PanelQuote>; } & { ...; }, Props>>'.
Type 'typeof OrderForm' is not assignable to type 'ComponentClass<Matching<{ order: Readonly<PermittedOrderParams>; initialOrder: PermittedOrderParams; isConfirming: boolean; externalQuote: Readonly<ThirdPartyQuote>; panelQuote: Readonly<PanelQuote>; } & { ...; }, Props>, any>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'Matching<{ order: Readonly<PermittedOrderParams>; initialOrder: PermittedOrderParams; isConfirming: boolean; externalQuote: Readonly<ThirdPartyQuote>; panelQuote: Readonly<PanelQuote>; } & { ...; }, Props>' is not assignable to type 'Readonly<Props>'.
Types of property 'confirmOrder' are incompatible.
Type 'ThunkAction<void, State, void, Action<any>>' is not assignable to type '(usabilityTestId: number, priceInCents: number) => void'.

This was all working perfectly before, in fact 6.0.9 (which I'll be sticking to for now) was fantastic in that I was able to remove many of my type hacks. With your new version I'm forced to go back to my old tricks:

const mapDispatchToProps = {
onCancel: cancelOrder,
fetchExternalQuote,
fetchPanelQuote,
fetchQuoteQueued,
confirmOrder,
createOrder,
}

export const OrderForm = connect(
(state: State) => ({
order: getOrder(state),
initialOrder: Order.createEmpty(),
isConfirming: isConfirming(state),
externalQuote: getExternalQuote(state),
panelQuote: getPanelQuote(state),
}),
{
onCancel: cancelOrder,
fetchExternalQuote,
fetchPanelQuote,
fetchQuoteQueued,
confirmOrder,
createOrder,
}
// :'(
mapDispatchToProps as Pick<ImplProps, keyof typeof mapDispatchToProps>
)(Impl)