Skip to content

Commit 57938e6

Browse files
Make Omit alias its own mapped type so that references to it never expand to Pick<...>.
1 parent 622cb42 commit 57938e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/es5.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,9 @@ type Extract<T, U> = T extends U ? T : never;
14461446
/**
14471447
* Construct a type with the properties of T except for those in type K.
14481448
*/
1449-
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
1449+
type Omit<T, K extends keyof any> = {
1450+
[P in Exclude<keyof T, K>]: T[P]
1451+
};
14501452

14511453
/**
14521454
* Exclude null and undefined from T

0 commit comments

Comments
 (0)