【发布时间】:2020-12-30 16:34:34
【问题描述】:
我有一个类型
type mytype = 'tipe-1' | 'tipe-2' | 'tipe-3'
如何这样输入
type mytype2 = '1' | '2' | '3'
但输出仍然相同'tipe-1' | 'tipe-2' | 'tipe-3'
【问题讨论】:
-
你尝试了什么?
-
如果要生成更多数字,请查看此答案stackoverflow.com/questions/65307438/…
标签: typescript tuples