摘要:
Typescript has NonNullable<T>, let's build a Nullable<T> type Nullable<T extends Record<PropertyKey, unknown>> = { [K in keyof T]: T[K] | null } type 阅读全文
摘要:
You can use `extends infer X` to assign the result of an expression to a variable type SomeFunction<U> = SuperHeavyComputation<U> extends infer Result 阅读全文