Yao Zhao

Results 80 comments of Yao Zhao

`0 extends 1` is not about tail-recursion, it is just a hack or bug for current version of ts. see https://github.com/microsoft/TypeScript/issues/49459

我现在也在用外部编辑器,但是混合管理总归有点奇怪。 另一种模式你看如何呢,就是允许所有配置都拿到外面来管理,比如指向并一个 index.js 文件并 watch 一个目录,它导出的规则就是启用的规则。然后只要它们都在一个目录里,就可以用外部编辑器统一管理了

I am using zod to valid http api params and response data. It is very convenient to use function type to implement an async function, but it is too slow...

The solution now fails the last two cases. ```ts Expect, Expect, ``` They must be added after your solution. The newest solution would be like ```ts type IsElemInSet = S...

Why you fallback to `T` instead of `never`? like this ```ts type MyReturnType = T extends (...args: any[]) => infer R ? R : never; ```

This doesn't work for such cases ```ts Expect, Expect, ```

@ghaiklor sadlly, I didn't find a perfect solution yet. Naive solution would indeed pass most cases but the `Partial` one. see https://github.com/type-challenges/type-challenges/issues/19507

Here is my solution without `String2Union`, welcome disscussion and improvement :) [issue with explanation](https://github.com/type-challenges/type-challenges/issues/19690) code snippet: ```ts type Head = T extends `${infer First}${any}` ? First : never type AllCombinations...

Share [my version](https://github.com/type-challenges/type-challenges/issues/19041) with the idea that: 1. convert string to tuple first (since we can get length from tuple) 2. get the length of the tuple ```ts type StringToTuple...

+1 this happens on Meteor 1.2.0.2