stitchesjs/stitches

force createStitches return typing

yovanoc opened this issue · 0 comments

Hello,

I would like to know how to force the return type.

In this case, I want to build a wrapper around createStitches for my lib.

I want the users to be able to override the config BUT that there is ALWAYS this xs field for example.

image

The more curious case is that if we explicitly add the return type like this the typescript server crash and don't want to work anymore.

image

PS: If you want a branch to debug, you can pull this one, and try on this file: https://github.com/Achaak/pikas/blob/fix/stitches-typing/packages/ui/styles/src/css.ts

Thanks ☺️