Simba
Simba
做不到,因为联合类型是无序的,而元组是有序的。 这个不太满足要求: ```typescript type UnionToArray = [U] extends [never] ?[] :U extends U?[U,...UnionToArray]:[] type A0 = UnionToArray //=>type A0 = ["a", "b", "c"] | ["a", "c", "b"] | ["b", "a",...
> ```ts > type Tail = T extends [infer A, ...infer B] ? B : []; > > // 测试用例 > type T0 = Tail; // [] > type T1...
```Typescript type Permutation = T extends K ?[T,...Permutation] :[] ``` 这个实现看着也可以,不知有没有什么弊端
> @xiaoYuanDun 既然都通过返回值了为什么不直接 type IsEqual = (() => T) extends (() => U) ? true : false 你这种写法,不能判断`IsEqual`这种的包含**any**类型的判断。 原因是**any**类型和任何类型都会判为一样。
How to use the `enableSVGO` feature.
了解了,感谢解答!
> 暂时不支持这种,G2 5.0 发布后会有相关能力@pearmini 现在g2版本到 v5.1.3 了,`2.5d饼图`相关能力可以用了吗?