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
Say I want to have a model property be a map from numbers to other things. Presumably that means myProp is type Record, like e.g.
model ModelA {
myProp: Record<string>;
}
But I'm specifically looking for number-alike keys, such as
{
myProp: {"0": "foo", "2": "bar"}
}
But it seems like that's impossible? Or it's impossible to give it an @example because the syntax disallows the example keys being provided as strings and integers are not valid property names?
Kinda likewise it seems impossible to declare an interface model that just has numeric keys? Like, how can I declare and @example an interface model that receives
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
-
Say I want to have a model property be a map from numbers to other things. Presumably that means myProp is type Record, like e.g.
But I'm specifically looking for number-alike keys, such as
But it seems like that's impossible? Or it's impossible to give it an
@example
because the syntax disallows the example keys being provided as strings and integers are not valid property names?Kinda likewise it seems impossible to declare an interface model that just has numeric keys? Like, how can I declare and @example an interface model that receives
?
Beta Was this translation helpful? Give feedback.
All reactions