You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add basic flow types for css and styled tags
Now the result of the `css` tag will always be of the type string, and the result of the `styled.x` or `styled(x)` tag will be `React.ComponentType`. If the `styled(x)` tag wraps another component, the type of the props will also include the type from that component.
Limitations:
- It's not possible to type-check the interpolations currently. I have added annotations for them, but they don't work.
- It doesn't handle `defaultProps` property on the styled component, will look into it in future.
- The type annotations for tags (e.g. - `styled.div`) are broad, but React DOM [doesn't seem to type it either](https://github.com/facebook/flow/blob/master/lib/react-dom.js#L406).
0 commit comments