class Hero {
name: string = ''
}
const heroes: Hero[] = [];
const heroes2 = [] as Hero[];
I noticed there are these two separate ways of declaring an array in TypeScript. I wonder if this is just syntactical sugar, or is there some underlying logic I am missing?