react-redux: use Exclude in Omit (#27019)

The legacy definition doesn't work with TypeScript 2.9.

Fixes https://github.com/DefinitelyTyped/DefinitelyTyped/issues/26510
This commit is contained in:
Oliver Joseph Ash
2018-07-09 14:24:48 -07:00
committed by Ryan Cavanaugh
parent c6653d383f
commit 5e54cc92a7
+2 -2
View File
@@ -41,8 +41,8 @@ import {
Store
} from 'redux';
// Diff / Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766
type Omit<T, K extends keyof T> = Pick<T, ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never, [x: number]: never })[keyof T]>;
// Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export interface DispatchProp<A extends Action = AnyAction> {
dispatch: Dispatch<A>;