mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
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:
committed by
Ryan Cavanaugh
parent
c6653d383f
commit
5e54cc92a7
Vendored
+2
-2
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user