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
Properties like vertical-align allow literals but also the very wide string type. The issue with this is that TypeScript will widen the type to string, losing the ability to offer auto-completion hints for literal values and allowing any string value to pass type-checking. Would it be possible to define types which allow a very wide type like this:
It's possible that I'm missing an obvious way to remove string from the union and be left only with the literal types and Globals/TLength, but so far I've been unlucky with my attempts.
The text was updated successfully, but these errors were encountered:
Properties like vertical-align allow literals but also the very wide
string
type. The issue with this is that TypeScript will widen the type tostring
, losing the ability to offer auto-completion hints for literal values and allowing any string value to pass type-checking. Would it be possible to define types which allow a very wide type like this:Auto-completion without split-out types
Auto-completion with split-out types
It's possible that I'm missing an obvious way to remove
string
from the union and be left only with the literal types andGlobals
/TLength
, but so far I've been unlucky with my attempts.The text was updated successfully, but these errors were encountered: