mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 18:43:21 +08:00
* feat(react-redux): add strict null check * feat(react-redux): remove improper inference tests Infered decorated typings would rely on the implicit and false assumption that decorated component props extend injected props and own props #24922 #24913 * fix(react-redux): injected props and decorated component props intersection * InjectedProps should not have to extend DecoratedProps * DecoratedProps should not have to extend InjectedProps * DecoratedProps should extend Intersection<InjectedProps, DecoratedProps> * Remaining Props should be required on the decoration output #24913 #24922 * feat(react-redux): add new commiters * feat(react-redux): 2.9 keyof compatibility depends on Extract (2.8)
22 lines
864 B
TypeScript
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.8
|
|
|
|
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>;
|
|
}
|