Closed
Description
As spread and rest types is taking time I usually have to copy these types in projects. They solve the primary use case for spread/rest types and works today. I think they should fit right in next to Pick and Partial.
And even when (if?) spread and rest types is merged these would still arguably have some value.
export type Diff<T extends string, U extends string> = ({[P in T]: P} &
{[P in U]: never} & {[x: string]: never})[T]
export type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>>