sindresorhus/type-fest
Remove redundant code for compatibility with older versions of typescript
已关闭
#1,142 创建于 2025年5月16日
enhancementgood first issue
仓库指标
- 星标
- (12,328 个星标)
- PR 合并指标
- (平均合并 3天 5小时) (30 天内合并 11 个 PR)
描述
In some previously supported but now unsupported versions of typescript, there would be some incorrect circular check, and in order to bypass the circular check, we have to add some non-essential code, for example:
type A<T> =
SomeToolType<T> extends infer B
? B
: never // Never happen
The above code can be simplified now:
type A<T> = SomeToolType<T>