New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1885: fix missing generic type arguments in .d.ts #1886

merged 1 commit into from Aug 5, 2018


None yet
5 participants

PzYon commented Aug 5, 2018

fixes #1885

As mentioned in the issue, I guess it's ok to set the the generic types to any (i.e. {}), as they aren't relevant when simply checking if a component is a styled component or not.

Another option would be to set the default type params on the StyledComponentClass-type itself. But I guess that would mean that when using the StyledComponentClass-interface the generic types could be omitted and hence some type-safety would be lost?

Last option would be to pass them to the isStyledComponent-function when using it. But that would a) break existing code and b) make the usage much more verbose, without any extra benefit.

@kitten kitten merged commit 4da518c into styled-components:master Aug 5, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.


mxstbr commented Aug 5, 2018

Thank you so much for helping us improve styled-components! Based on our Community Guidelines every person that has a PR of any kind merged is offered an invitation to the styled-components organization—that is you right now!

Should you accept, you'll get write access to the main repository. (and a fancy styled-components logo on your GitHub profile!) You'll be able to label and close issues, merge pull requests, create new branches, etc. We want you to help us out with those things, so don't be scared to do them! Make sure to read our contribution and community guidelines, which explains all of this in more detail. Of course, if you have any questions just let me know!

@kitten kitten referenced this pull request Aug 5, 2018


Broken on TypeScript? #1888


This comment has been minimized.

mikewheaton commented Aug 7, 2018

Will this be included in a 3.4.2 patch release?


This comment has been minimized.


probablyup commented Aug 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment