Skip to content

Commit 53e76b3

Browse files
Add the Omit helper type.
1 parent 0f6f3b7 commit 53e76b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/es5.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,11 @@ type Exclude<T, U> = T extends U ? never : T;
14431443
*/
14441444
type Extract<T, U> = T extends U ? T : never;
14451445

1446+
/**
1447+
* Construct a type with the properties of T except for those in type K.
1448+
*/
1449+
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
1450+
14461451
/**
14471452
* Exclude null and undefined from T
14481453
*/

0 commit comments

Comments
 (0)