特牛网址导航

typescript的学习_tuple type '[]' of length '0' has no element at in-CSDN博客

网友收藏
typescript的类型数组let list1: number[] = [1, 2, 3, 4]let list2: Array<number> = [1, 2, 3, 4]let list3 = [1, 2, 3, 4]let list4 = (number | string)[] = [1, '2']let list5: any[] = [1, 'dss', true]元组固定长度、固定类型的arraylet person1: [number, string] _tuple type '[]' of length '0' has no element at index '0'.