说我有类型 type Atom = string | boolean | number.我想定义一种类型的数组:
type Atom = string | boolean | number
NestedArray = Atom | [a_0, a_1, ... , a_n]每个a_i都是a Atom或a NestedArray.
NestedArray = Atom | [a_0, a_1, ... , a_n]
a_i
Atom
NestedArray
这可以在打字稿中实现吗?
typescript
typescript ×1