Files
DefinitelyTyped/types/redux-auth-wrapper/index.d.ts
Karol Janyst 76241738dc Update redux-auth-wrapper to v2 (#18236)
* Update redux-auth-wrapper to version 2

* Fix linter errors

* Add redirectAction optiona to router decorator
2017-07-20 01:41:12 -07:00

22 lines
864 B
TypeScript

// Type definitions for redux-auth-wrapper 2.0
// Project: https://github.com/mjrussell/redux-auth-wrapper
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { ComponentClass, StatelessComponent, ComponentType, ReactType } from "react";
export type StateSelector<State, OwnProps, R> = (state: State, props: OwnProps) => R;
export type AuthWrapperDecorator<Props> = (component: ComponentType<Props>) => ComponentClass<Props>;
export interface AuthConfig {
AuthenticatingComponent?: ReactType;
wrapperDisplayName?: string;
}
export interface AuthBaseConfig<OwnProps = {}, State = {}> extends AuthConfig {
authenticatedSelector: StateSelector<State, OwnProps, boolean>;
authenticatingSelector?: StateSelector<State, OwnProps, boolean>;
}