Skip to content

Commit f555261

Browse files
committed
Add Rest<T, K> type to lib.d.ts
1 parent 3a2f7c0 commit f555261

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib/es5.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,13 @@ type Pick<T, K extends keyof T> = {
14161416
[P in K]: T[P];
14171417
};
14181418

1419+
/**
1420+
* From T, omit a set of properties whose keys are in the union K
1421+
*/
1422+
type Rest<T, K extends keyof T> = {
1423+
[P in Exclude<keyof T, K>]: T[P];
1424+
};
1425+
14191426
/**
14201427
* Construct a type with a set of properties K of type T
14211428
*/

0 commit comments

Comments
 (0)