-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add TypeScript definitions #40
Comments
Just made a wip PR this morning. Would you be interested in collaborating? |
Yup :) you can have a look at this in the meanwhile /~https://github.com/styled-components/styled-components/blob/master/typings/styled-components.d.ts :) |
@patrick91 That's awesome! Thanks for the link 👍 I managed to get the Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. My guess is that this was the reason you guys went with custom component declarations for |
@marvinhagemeister This is going to be tricky I think. the signature for
I think typescript is seeing a tagged template literal and expecting it to have a signature like
|
Similarly, could we get flow definitions as well? While I'm a rookie with Flow and inexperienced with TypeScript, I would greatly appreciate the definitions in flow, so I'd be happy to try my hand at contributing that side of the equation |
@hawkins tag me in when you sent the PR. Installing flow to my new project and seeing a lot of red lines :D P/S: Emotion is partially written in Flow /~https://github.com/tkh44/emotion/blob/0485de608c9ea7f039c78dc06788040ef009d258/src/index.js#L1 |
any progress here? |
Hey guys, I've created a PR! Check it out: #398 |
Hey @tkh44, I think you can close this issue since it's already merged and published. |
I'll do this when I have some free time (probably right after #EuroPython, I have a talk to prepare :) ).
Should be pretty straightforward to port styled-components' definitions.
What are the main API differences with it?
The text was updated successfully, but these errors were encountered: