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
{{ message }}
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
Currently, when changing theme tokens, some properties like fontFamily or color which accept arbitrary strings, don't error or otherwise indicate a problem. Ideally we would be notified by TS when we are erroneously using a non-existent token.
On one hand we could narrow string-based options, but in some cases this leads to type-explosions, like border="1px solid green", where the combinatorial for template-literal explodes. A more parsimonious approach could be just to wrap token-able parts with a sort-of ValidateToken<T> type which verifies the type is valid, if it begins with a $.
Not 100% certain on best approach yet.
The text was updated successfully, but these errors were encountered:
Currently, when changing theme tokens, some properties like
fontFamily
orcolor
which accept arbitrary strings, don't error or otherwise indicate a problem. Ideally we would be notified by TS when we are erroneously using a non-existent token.On one hand we could narrow string-based options, but in some cases this leads to type-explosions, like
border="1px solid green"
, where the combinatorial for template-literal explodes. A more parsimonious approach could be just to wrap token-able parts with a sort-ofValidateToken<T>
type which verifies the type is valid, if it begins with a$
.Not 100% certain on best approach yet.
The text was updated successfully, but these errors were encountered: