You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export type Diff<T, U> = T extends U ? never : T; // Remove types from T that are assignable to U
export type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>>
The text was updated successfully, but these errors were encountered:
Using a clever combination of
Pick
to create anOmit
: (Source: microsoft/TypeScript#19569)Better with conditional types : microsoft/TypeScript#19569 (comment)
The text was updated successfully, but these errors were encountered: