Skip to content

Commit d9e8246

Browse files
Change Omit back to using Pick<T, Exclude<keyof T, K>> in order to maintain modifiers.
1 parent d22cb0c commit d9e8246

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib/es5.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,9 +1446,7 @@ 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> = {
1450-
[P in Exclude<keyof T, K>]: T[P]
1451-
};
1449+
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
14521450

14531451
/**
14541452
* Exclude null and undefined from T

0 commit comments

Comments
 (0)