Answer the question
In order to leave comments, you need to log in
Is it possible to specify one single type for all elements of an object?
Let's say there is an object
obj = {};
it will contain Ne number of elements.
Is it possible to somehow specify for this object that all element values in it will be of the same type,
for example Object or string, without specifying each element of the type:
obj = {
abc: <string>'abc',
def: <string>'def'
....
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question