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
Can we add type hint to the selectors properties? Just like
constxxx=style({selectors: {// Each property gets a type hint"&":{":nth-child(2n)":{
...
}}}})
or
constxxx=style({selectors: {// Each property gets a type hint[`${parent}`]:{":hover":{"&":{":nth-child(2n)":{
...
}}},":focus":{"&":{":nth-child(1n)":{
...
}}},}}})
At the moment this is just a preliminary idea and it looks like there will be some holes. But I think we can rely on typescript Template String types to make vanill-extra more type-safe. I think it will enhance a lot of the development experience. I could submit a PR.
This discussion was converted from issue #643 on May 03, 2022 12:55.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, Thanks for this amazing library.
Can we add type hint to the selectors properties? Just like
or
output:
${parent}:hover &:nth-child(2n)
${parent}:focus &:nth-child(1n)
At the moment this is just a preliminary idea and it looks like there will be some holes. But I think we can rely on typescript Template String types to make vanill-extra more
type-safe
. I think it will enhance a lot of the development experience. I could submit a PR.Beta Was this translation helpful? Give feedback.
All reactions