Skip to content

Commit

Permalink
fix: type $Without does not distribute over discriminated unions (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunohkbx authored May 6, 2021
1 parent 392e477 commit 525c4e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from 'react';
import hoistNonReactStatics = require('./hoist-non-react-statics');

type $Without<T, K> = Pick<T, Exclude<keyof T, K>>;
type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };

export type ThemingType<Theme> = {
Expand Down

0 comments on commit 525c4e2

Please sign in to comment.