mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
11 lines
341 B
TypeScript
11 lines
341 B
TypeScript
export type Writable<T> = { -readonly [P in keyof T]: T[P] }
|
|
export type WritableArray<T> = T extends readonly any[] ? Writable<T> : T
|
|
|
|
export type IfNever<T, Y = true, N = false> = [T] extends [never] ? Y : N
|
|
|
|
export type IfUnknown<T, Y, N> = [unknown] extends [T] ? Y : N
|
|
|
|
export type UnknownToNever<T> = IfUnknown<T, never, T>
|
|
|
|
export {}
|