Change Omit back to using Pick<T, Exclude<keyof T, K>> in order to maintain modifiers.

This commit is contained in:
Daniel Rosenwasser
2019-05-01 14:00:11 -07:00
parent d22cb0c56b
commit d9e82466e2

4
src/lib/es5.d.ts vendored
View File

@@ -1446,9 +1446,7 @@ type Extract<T, U> = T extends U ? T : never;
/**
* Construct a type with the properties of T except for those in type K.
*/
type Omit<T, K extends keyof any> = {
[P in Exclude<keyof T, K>]: T[P]
};
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
/**
* Exclude null and undefined from T