Skip to content

Instantly share code, notes, and snippets.

@Luchanso
Last active March 30, 2020 11:16
Show Gist options
  • Save Luchanso/95647810f21bbd674d771fe37958e2c8 to your computer and use it in GitHub Desktop.
Save Luchanso/95647810f21bbd674d771fe37958e2c8 to your computer and use it in GitHub Desktop.
ReturnTypeMapDispatchToProps
export type ReturnTypeMapDispatchToProps<T> = {
[P in keyof T]: T[P] extends (
...args: infer A
) => (...args: any[]) => infer R
? (...args: A) => R
: T[P];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment