mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-15 00:06:16 -06:00
Make Omit alias its own mapped type so that references to it never expand to Pick<...>.
This commit is contained in:
parent
622cb42137
commit
57938e6cc2
4
src/lib/es5.d.ts
vendored
4
src/lib/es5.d.ts
vendored
@ -1446,7 +1446,9 @@ 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> = Pick<T, Exclude<keyof T, K>>;
|
||||
type Omit<T, K extends keyof any> = {
|
||||
[P in Exclude<keyof T, K>]: T[P]
|
||||
};
|
||||
|
||||
/**
|
||||
* Exclude null and undefined from T
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user