I have some experience with TypeScript, but one thing just keeps playing on my mind. I know the difference between Array<string> and string[]. I know that the declarations can be used interchangeably, f.e.
export class SomeClass {
someDeclaration: Array<SomeObject>;
otherDeclaration: SomeObject[];
}
But in my work, I faced other declaration structure, namely:
export class OtherClass {
strangeDeclaration: [SomeObject];
}
My question is: Is it correct way to declaring array? Which difference is beetwen this way and other (most popoular) ways? Where does the structure come from?