Typescript allows one to define an Array with either syntax:
var myStrArry1: string[] = [];
or
var myStrArry1: Array<string> = [];
The compiled output appears to be the same. Does the compiler treat them identically, or are there some quirks to be aware of?
Does the compiler treat them identically, or are there some quirks to be aware of?
They are identical. I prefer syntax 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With