mg901/styled-breakpoints

Wrong type declaration for createTheme function

Closed this issue · 1 comments

Hi, you have wrong type declaration for createTheme method. If you provide breakpoints into the method, but return them without spreading, the object will be:

{'styled-components': { breakpoints: {...some obj with breakpoints}}}

but type definition suggests:

{'styled-components': {...some obj with breakpoints}}

I's like to fix this, but tell me what is wrong? Type or the function? Changing the method would be a breaking change, so I'll start with changing type definition.

mg901 commented

@flagoon, hello! Sorry for the long answer. Thank you so much for your help and interest in styled-breakpoints. This is a really useful change, but don't worry. It will not entail breaking changes. In this case, the types are needed to show what exactly lies in the theme, which is created by styled-breakpoints. Nowhere in the code are they (types) used.