I\'m coding a large TypeScript class and I\'ve set noImplicitAny to true. Is there any way to declare multiple variables of the same type on the same line?
I\'d lik
let [string1, string2]: string[] = [];
breaking it down:
[string1, string2]
is declared as string[]
, implying string1, string2
is of type string
[]
[undefined, undefined, undefined, ...]
when destructuring string1
and string2
gets assigned to undefined
string1, string2
are of type string
with value undefined