From 57938e6cc23ac8f9aededab1adc252b249153407 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 24 Apr 2019 16:57:20 -0700 Subject: [PATCH] Make `Omit` alias its own mapped type so that references to it never expand to `Pick<...>`. --- src/lib/es5.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index de4a612d3919f..994fb1d765330 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1446,7 +1446,9 @@ type Extract = T extends U ? T : never; /** * Construct a type with the properties of T except for those in type K. */ -type Omit = Pick>; +type Omit = { + [P in Exclude]: T[P] +}; /** * Exclude null and undefined from T