From f555261d7a6c8695de4953288965823c3089d33c Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 1 Nov 2018 12:33:18 -0700 Subject: [PATCH] Add Rest type to lib.d.ts --- src/lib/es5.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index c8e99f0d1db..70e7e805899 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1416,6 +1416,13 @@ type Pick = { [P in K]: T[P]; }; +/** + * From T, omit a set of properties whose keys are in the union K + */ +type Rest = { + [P in Exclude]: T[P]; +}; + /** * Construct a type with a set of properties K of type T */