* Lift the requirement of the omitted keys being of string type

* Remove unused Diff mapped type
This commit is contained in:
Karol Majewski 2018-06-01 10:58:15 +02:00 committed by Wei Zhu
parent 87163dfcd6
commit 7c273912fd

View File

@ -1,3 +1 @@
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>>;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;