2021年3月27日星期六

Typescript number array no errors if empty

Why this code gives no error?

type X = number[];    let z: X = [];  

Empty array is not the same as array of numbers

https://stackoverflow.com/questions/66837464/typescript-number-array-no-errors-if-empty March 28, 2021 at 08:43AM

没有评论:

发表评论