数组
类型 Array
const arr: any[] = [1, '', true];
const arr: Array<number> = [1, 2, 3];
const arr: (number | string | boolean)[] = [1, 2, 3, "string", true];
类型 ReadonlyArray
只读数组
const arr:readonly number[] = [0, 1];
const arr = [0, 1] as const;
参考链接
https://www.typescriptlang.org/docs/handbook/2/objects.html#the-array-type