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
The [key: string]: any indicates that the struct is "open".
An example where this would have been very useful is in the k8s.ApiObject winglib. Since Kubernetes API objects may have any schema, it would be really nice to be able to just pass them along like this:
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking for a way to model this TypeScript idiom in Wing:
The
[key: string]: anyindicates that the struct is "open".An example where this would have been very useful is in the
k8s.ApiObjectwinglib. Since Kubernetes API objects may have any schema, it would be really nice to be able to just pass them along like this:Thoughts about syntax - maybe use spreads?
Beta Was this translation helpful? Give feedback.
All reactions