IssueRaiser

Re-write in Typescript ๐Ÿ“„

Hi ๐Ÿ‘‹ I'm building a Design System powered by Styled System and would like to have proper Typescript support. I believe that Typescript will provide a better developer experience and better usage of the components. Styled System is not currently written in Typescript, so I'm relying on [@types/styled-system](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/styled-system). Although the types are not [fully accurate](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34794). Are there any plans to re-write Styled System in Typescript? I think this would be the best solution, rather than relying on third party types. Since Typescript would type check the Theme and its values, we could make sure there's a consistent way for developers to use the Theme. The spec is still WIP and there's some open discussion [here](https://github.com/system-ui/theme-specification/issues/1). I've noticed on Spectrum and Twitter that a lot of people love Styled System but also have some concerns with current implementation assumptions. Here's a few examples: - Can we clear the confusion about [multiple variants](https://spectrum.chat/styled-system/general/dealing-with-multiple-variants~b808556e-80e9-4c8e-be3f-dde9ae186c44)? - Should scales be [unitless](https://spectrum.chat/styled-system/general/unitless-scales~dbd3da0b-398b-4498-9b39-4c4bd82165ea)? - Why isn't the `width` supported, but documented in the Theme spec? - Perhaps include better error/warning/deprec

Posted by peduarte on Apr 23, 2019, 9:45 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

ux (Software)

Re-write in Typescript ๐Ÿ“„

peduarteApr 23, 2019, 9:45 AM

Hi ๐Ÿ‘‹ I'm building a Design System powered by Styled System and would like to have proper Typescript support. I believe that Typescript will provide a better developer experience and better usage of the components. Styled System is not currently written in Typescript, so I'm relying on [@types/styled-system](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/styled-system). Although the types are not [fully accurate](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34794). Are there any plans to re-write Styled System in Typescript? I think this would be the best solution, rather than relying on third party types. Since Typescript would type check the Theme and its values, we could make sure there's a consistent way for developers to use the Theme. The spec is still WIP and there's some open discussion [here](https://github.com/system-ui/theme-specification/issues/1). I've noticed on Spectrum and Twitter that a lot of people love Styled System but also have some concerns with current implementation assumptions. Here's a few examples: - Can we clear the confusion about [multiple variants](https://spectrum.chat/styled-system/general/dealing-with-multiple-variants~b808556e-80e9-4c8e-be3f-dde9ae186c44)? - Should scales be [unitless](https://spectrum.chat/styled-system/general/unitless-scales~dbd3da0b-398b-4498-9b39-4c4bd82165ea)? - Why isn't the `width` supported, but documented in the Theme spec? - Perhaps include better error/warning/deprec

Comments (0)

No comments yet. Start the discussion.

Comment on this issue