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
I have encounter a few times in multiple applications an scenario in which I don't know the properties of an object but I do know that all its properties are of a certain type.
I don't know the property names or number of properties of metadata
I do know that Metadata is the type of all the properties of metadata
Now let's imagine that a function take the metadata object as argument:
functiondoSomething(metadata: any){// ...}
I used any as the type of the argument metadata but It would be great if I could let developers know that all the properties of this object must be of type Metadata.
is there any way to create such type annotation?
mnpenner, aristotll, thiagoh, mast4461, adrian-moisa and 21 more