Reputation: 28338
I'm a bit confused when it comes to defining arrays in TypeScript, because I don't understand the difference between any[]
and Array<any>
.
I read this question in hope to gain some understanding, but it didn't enlighten me. And I can't seem to find any general sources that describes this.
When should I be using any[]
and when should I use Array<any>
? Does it even matter which one I use?
Upvotes: 2
Views: 383
Reputation: 31602
There is no difference to the generated Javascript. It's a matter of style.
Upvotes: 3