From 525c4e23b2cca10b9a87de4f2b9e28a5873f7b36 Mon Sep 17 00:00:00 2001 From: Bruno Castro Date: Thu, 6 May 2021 06:09:34 -0300 Subject: [PATCH] fix: type $Without does not distribute over discriminated unions (#96) --- typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index fece91b..d2bb222 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -4,7 +4,7 @@ import * as React from 'react'; import hoistNonReactStatics = require('./hoist-non-react-statics'); -type $Without = Pick>; +type $Without = T extends any ? Pick> : never; type $DeepPartial = { [P in keyof T]?: $DeepPartial }; export type ThemingType = {