mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-25 05:29:07 -05:00
Add Rest<T, K> type to lib.d.ts
This commit is contained in:
7
src/lib/es5.d.ts
vendored
7
src/lib/es5.d.ts
vendored
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user