1
0
Fork 0
mirror of https://github.com/elk-zone/elk.git synced 2024-12-22 04:34:34 +03:00
elk/types/utils.ts
2023-01-04 18:21:18 +08:00

8 lines
215 B
TypeScript

export type Mutable<T> = {
-readonly[P in keyof T]: T[P]
}
export type Overwrite<T, O> = Omit<T, keyof O> & O
export type MarkNonNullable<T, K extends keyof T> = Overwrite<T, {
[P in K]-?: NonNullable<T[P]>
}>