class Superhero {
name: string = ''
}
const superheroesList: Superhero[] = [];
const superheroesList2 = [] as Superhero[];
As I was exploring TypeScript, I stumbled upon these two distinct methods of declaring an array. This got me thinking whether it is simply a matter of syntax or if there is some deeper rationale that I am overlooking.