You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I seem to have an issue with the types inferred by Unistyles.
Steps to reproduce
For example, I have this code which I got from the example in the Unistyles repo, and I modified it a bit match my situation.
It has 1 variant (type), which is used 2 times (for the button style and the buttonText style).
Description
Hi, I seem to have an issue with the types inferred by Unistyles.
Steps to reproduce
For example, I have this code which I got from the example in the Unistyles repo, and I modified it a bit match my situation.
It has 1 variant (
type
), which is used 2 times (for thebutton
style and thebuttonText
style).I would expect TS to show me something like this as the type of the styles:
However this is the type I'm getting (the style keys inside all the variants are missing):
Looks like it has something to do with the theme, because when putting the colors directly inline it seems to work:
I noticed that the types are correctly inferred when removing the
secondary
type from both variants (which leaves me with just theprimary
type):Snack or a link to a repository (optional)
No response
Unistyles version
2.9.2
React Native version
0.73.6
Platforms
Android, iOS
Engine
Hermes
Architecture
Paper (old)
The text was updated successfully, but these errors were encountered: