- 链接地址:https://blog.csdn.net/weixin_41767962/article/details/119549260
- 链接标题:typescript的学习_tuple type '[]' of length '0' has no element at in-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:3490
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'.
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除