diff --git a/src/preact-redux.d.ts b/src/preact-redux.d.ts index 84226e1..5d79d13 100644 --- a/src/preact-redux.d.ts +++ b/src/preact-redux.d.ts @@ -9,13 +9,12 @@ // TypeScript Version: 2.4 import { AnyComponent, Component, ComponentConstructor, VNode } from 'preact'; -import { Store, Dispatch, ActionCreator } from 'redux'; +import { Store, Dispatch, ActionCreator, AnyAction } from 'redux'; -// Diff / Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766 -type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; -type Omit = Pick>; +// Use buildin Exclude. taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-377567046 +type Omit = Pick>; -export interface DispatchProp { +export interface DispatchProp { dispatch?: Dispatch; } @@ -197,7 +196,7 @@ interface Options extends C * @param connectOptions If specified, further customizes the behavior of the connector. Additionally, any extra * options will be passed through to your selectorFactory in the factoryOptions argument. */ -export declare function connectAdvanced( +export declare function connectAdvanced( selectorFactory: SelectorFactory, connectOptions?: ConnectOptions & TFactoryOptions ): AdvancedComponentDecorator; @@ -210,7 +209,7 @@ export declare function connectAdvancedselector to return that * previous object when appropriate. */ -export interface SelectorFactory { +export interface SelectorFactory { (dispatch: Dispatch, factoryOptions: TFactoryOptions): Selector }