Skip to content

Add TypeScript support for connecting class based components.#107

Merged
developit merged 2 commits intodevelopit:masterfrom
lukelindsey:enh/classBased
Sep 20, 2018
Merged

Add TypeScript support for connecting class based components.#107
developit merged 2 commits intodevelopit:masterfrom
lukelindsey:enh/classBased

Conversation

@lukelindsey
Copy link

Fixes an issue where typescript won't allow connecting a class based component as the types were written only for SFC. Example error is below.

Argument of type 'typeof MyClassBasedComponent' is not assignable to parameter of type '(props: OwnProps & PropsFromStore) => VNode'. Type 'typeof MyClassBasedComponent' provides no match for the signature '(props: OwnProps & PropsFromStore): VNode'.

@lukelindsey
Copy link
Author

CI failed because this doesn't include the fix from #106

@developit
Copy link
Owner

developit commented Aug 29, 2018

@lukelindsey I hadn't seen this yet and just merged #102 - do you think your typings are preferable to those? They seem more standard to me. Thanks!

@developit developit merged commit 9c756c2 into developit:master Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants