styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.28k stars 105 forks source link

Typescript docs #230

Closed incompletude closed 3 years ago

incompletude commented 3 years ago

It would be nice to have better docs for typescript users.

I think currently this is the only page related to typescript:

https://xstyled.dev/docs/typescript/

@gregberge you need a beer bro.

gregberge commented 3 years ago

Yeah it is a not very complete, and TypeScript is so difficult! Do you have one for me? 😅

incompletude commented 3 years ago

Yeah it is a not very complete, and TypeScript is so difficult! Do you have one for me? 😅

For me, unfortunately, it is. :(

Does your library need funding? I work for a medium-size company and we fund a few projects. (I subscribed to personally fund xstyled)

We can take a web beer. If you agree we can talk about postmodernism.

https://www.youtube.com/watch?v=2doZROwdte4

gregberge commented 3 years ago

Thanks for the beer! Yeah I always need fund, i would be happy to take some days to work on it!

incompletude commented 3 years ago

Thanks for the beer! Yeah I always need fund, i would be happy to take some days to work on it!

We are considering adopting react + typescript + xstyled, but I still have a lot of convincing to do. I think it is currently the best way to achieve consistent design across multiple projects. (I have built pocs with theme-ui, chackra-ui, styled system and xstyled, and I think xstyled has the best api). For now, if you could help me make my generic heading work it would be great. :)

gregberge commented 3 years ago

@incompletude // @ts-ignore is your friend, you know only the external interface is really important. If your code work, my advice is to not try harder. You will fix it when you will acquire enough TypeScript knowledge.

incompletude commented 3 years ago

@gregberge

I just decided to drop this idea and follow other alternatives. It is never a good sign when a maintainer is arrogant, ironic, and answer questions using blame and zero value comments. I hope the repo grows because it deserves better governance.

Best,

gregberge commented 3 years ago

@incompletude it was not arrogant or ironic at all. Check xstyled code, there is lot of // @ts-ignore in internals. It doesn't make any sense to waste time on typing internal of a method if it works.

incompletude commented 3 years ago

@incompletude it was not arrogant or ironic at all. Check xstyled code, there is lot of // @ts-ignore in internals. It doesn't make any sense to waste time on typing internal of a method if it works.

I was not mentioning this answer, but a few others. Thx anyways.

gregberge commented 3 years ago

Good luck then!