简体中文
主题
自 1.1.0 起
数字类型自增 1。
type Inc<N extends number> = [...NumberToArray<N>, 0]['length']
N
import type { Inc } from 'uni-types' type A = Inc<5> // 6 type B = Inc<0> // 1 type C = Inc<10> // 11
Dec
Add