From 8fa7532bd4c059e1665b0dc19e7c784ceb1be255 Mon Sep 17 00:00:00 2001 From: Bruno Castro Date: Fri, 22 Jan 2021 23:22:05 -0300 Subject: [PATCH] fix: type $Without does not distribute over discriminated unions --- 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 = {