Add Rest<T, K> type to lib.d.ts

This commit is contained in:
Anders Hejlsberg 2018-11-01 12:33:18 -07:00
parent 3a2f7c0df1
commit f555261d7a

7
src/lib/es5.d.ts vendored
View File

@ -1416,6 +1416,13 @@ type Pick<T, K extends keyof T> = {
[P in K]: T[P];
};
/**
* From T, omit a set of properties whose keys are in the union K
*/
type Rest<T, K extends keyof T> = {
[P in Exclude<keyof T, K>]: T[P];
};
/**
* Construct a type with a set of properties K of type T
*/