typescript - Typescript中的Concat元组类型?
问题描述
type T1 = ['a','b','c']
type T2 = ['d','e','f']
type TN = [.., .., ..]
type M = Concat<T1,T2,...,TN> //or Concat<[T1,T2,...,TN]>
//get ['a','b','c','d','e','f',...]
type Error =[...T1,...T2,...T3,...]//A rest element must be last in a tuple type.
我想将许多元组类型连接到一个元组中。如何定义类型Concat<>
?
解决方案
推荐阅读
- django - 使用实例编辑 django 表单总是加载空表单字段
- wordpress - wordpress 网站上上传的图片未显示在移动设备上
- css - 动画名称属性中的“足够”和“太多”值是什么意思?
- sql-server - 将 CAST、CONCAT 和 COLLATE 与 LEFT OUTER JOIN 结合使用
- node.js - Angular 7 e2e 连接 ETIMEDOUT,无法建立隧道套接字
- java - restAssured 发送请求的两种方式有什么区别?
- c# - 在 WPF MVVM 应用程序中的多个 ViewModel 之间传递图像/数据
- php - 如何将数字的字符串值转换为锚标签内的电话格式?
- python - 如何在正则表达式中为一组条件定义量词?
- swift - '(key: String, value: Any)' 不能转换为 '[String : Any]'