sindresorhus/type-fest

Remove redundant code for compatibility with older versions of typescript

已關閉

#1,142 建立於 2025年5月16日

 (7 則留言) (0 個反應) (0 位負責人)TypeScript (471 個分叉)batch import
enhancementgood first issue

倉庫指標

星標
 (12,328 顆星)
PR 合併指標
 (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>

貢獻者指南