Suppose I define a new Object type:
interface NEWOBJECT {
name: {};
}
Is it possible to have the 'name' property in NEWOBJECT be able to accept either 'name1' or 'name2', allowing me to create instances of NEWOBJECT with different names as the property value?
For example, like this:
var object1: NEWOBJECT = {name1: {}};
var object2: NEWOBJECT = {name2: {}};
Thank you.