-
Notifications
You must be signed in to change notification settings - Fork 117
No support for typescript syntax #22
Comments
As far as I know, you can't specify the props that way. (Reference: microsoft/TypeScript#11947) You can however remove |
Can this issue be closed or can someone confirm that we do need to support something like |
We definitely need to support this. It's 100% allowed. I use it with stateless components as so: interface RootProps {
label: React.ReactNode,
}
const Root = styled<RootProps>('div')`
height: ${(props) => props.label ? 72 : 48}px;
` Without specifying the props that way it TypeScript will complain about |
+1 This could be pretty easily solved by changing the regex-statement in line 7: I will try to make it work and add a pull-request |
Specifying proptypes with typescript syntax breaks highlighting:
All of the rules are highlighted with string highlighting.
The text was updated successfully, but these errors were encountered: