I have seen typescript objects defined like this:
const MyObj = {
myVar1,
name1: myVar2
}
What is this object being defined here?
I understand that there is a key value pair here where name1
is the key, and myVar2
is the value. But what does it mean for there to be only a single value like myVar1
?
(This is very hard to Google an answer for)