mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Add Rest<T, K> type to lib.d.ts
This commit is contained in:
parent
3a2f7c0df1
commit
f555261d7a
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
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user