javascript - How do I define an "any" array in an object literal in Typescript? -


this question has answer here:

the following fails error.

ts7018: object literal's property 'scopes' implicitly has 'any[]' type.

i want define foo array of any. how do in object literal?

{   foo: [], } 

if it's array then:

let foo: any[] = []; 

but there's no object literal here.
if want foo object array then:

let foo: { array: any[] } = { array: [] } foo.array.push(12); foo.array.push("stirng"); 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -