Closed oeduardoal closed 1 year ago
Would you mind creating a repo with the issue? worth trying is to remove node_modules and your lock files
@hadihallak Of course! I'll comment here!
Hey @hadihallak !
https://github.com/oeduardoal/stitches-issue
it's looks like something with Type in "utils":
Github Actions: https://github.com/oeduardoal/stitches-issue/runs/6258791386?check_suite_focus=true
export const designsystem = createStitches({
prefix: "designsystem-",
theme: {},
media: {},
utils: {
p: (value: Stitches.PropertyValue<"padding">) => ({
padding: value,
}),
},
});
When not used, the error does not occur
@oeduardoal Try this instead
import { createStitches, ScaleValue } from '@stitches/react';
export const designsystem = createStitches({
prefix: "designsystem-",
theme: {},
media: {},
utils: {
p: (value: ScaleValue<'space'> | string | number) => ({
padding: value
})
}
});
Hi guys 🙌🏻 , any update on this?
@oeduardoal @jrgarciadev are you guys importing * as Stitches
type in your stitches.config.ts
file?
removing the type and just importing ScaleValue
and/or PropertyValue
from @stitches/react
solved the issue for me. Hope this might help 👍
After updating to 1.2.8, I'm getting all kinds of Type errors. https://github.com/modulz/stitches/releases/tag/v1.2.8