mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Merge pull request #18130 from GiedriusGrabauskas/patch-8
Flux: added StoresList type
This commit is contained in:
Vendored
+3
-1
@@ -37,8 +37,10 @@ export interface RealOptions {
|
||||
|
||||
export type ComponentConstructor<TProps> = React.ComponentClass<TProps> | React.StatelessComponent<TProps>;
|
||||
|
||||
export type StoresList = Array<FluxStore<any>>;
|
||||
|
||||
export interface ComponentStatic<TProps, TState, TContext> {
|
||||
getStores(maybeProps?: TProps, maybeContext?: TContext): Array<FluxStore<any>>;
|
||||
getStores(maybeProps?: TProps, maybeContext?: TContext): StoresList;
|
||||
calculateState(prevState: TState, maybeProps?: TProps, maybeContext?: TContext): TState;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ interface State {
|
||||
}
|
||||
|
||||
class CounterContainer extends React.Component<Props, State> {
|
||||
static getStores() {
|
||||
static getStores(): Container.StoresList {
|
||||
return [Store];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user