mirror of https://github.com/jitsi/jitsi-meet
parent
679acbae16
commit
2063ad467d
@ -0,0 +1,6 @@ |
||||
// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583
|
||||
// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x
|
||||
|
||||
declare module "flow-bin" { |
||||
declare module.exports: string; |
||||
} |
@ -0,0 +1,89 @@ |
||||
// flow-typed signature: 0ed284c5a2e97a9e3c0e87af3dedc09d
|
||||
// flow-typed version: bdf1e66252/react-redux_v5.x.x/flow_>=v0.30.x
|
||||
|
||||
import type { Dispatch, Store } from 'redux' |
||||
|
||||
declare module 'react-redux' { |
||||
|
||||
/* |
||||
|
||||
S = State |
||||
A = Action |
||||
OP = OwnProps |
||||
SP = StateProps |
||||
DP = DispatchProps |
||||
|
||||
*/ |
||||
|
||||
declare type MapStateToProps<S, OP: Object, SP: Object> = (state: S, ownProps: OP) => SP | MapStateToProps<S, OP, SP>; |
||||
|
||||
declare type MapDispatchToProps<A, OP: Object, DP: Object> = ((dispatch: Dispatch<A>, ownProps: OP) => DP) | DP; |
||||
|
||||
declare type MergeProps<SP, DP: Object, OP: Object, P: Object> = (stateProps: SP, dispatchProps: DP, ownProps: OP) => P; |
||||
|
||||
declare type StatelessComponent<P> = (props: P) => ?React$Element<any>; |
||||
|
||||
declare class ConnectedComponent<OP, P, Def, St> extends React$Component<void, OP, void> { |
||||
static WrappedComponent: Class<React$Component<Def, P, St>>; |
||||
getWrappedInstance(): React$Component<Def, P, St>; |
||||
static defaultProps: void; |
||||
props: OP; |
||||
state: void; |
||||
} |
||||
|
||||
declare type ConnectedComponentClass<OP, P, Def, St> = Class<ConnectedComponent<OP, P, Def, St>>; |
||||
|
||||
declare type Connector<OP, P> = { |
||||
(component: StatelessComponent<P>): ConnectedComponentClass<OP, P, void, void>; |
||||
<Def, St>(component: Class<React$Component<Def, P, St>>): ConnectedComponentClass<OP, P, Def, St>; |
||||
}; |
||||
|
||||
declare class Provider<S, A> extends React$Component<void, { store: Store<S, A>, children?: any }, void> { } |
||||
|
||||
declare type ConnectOptions = { |
||||
pure?: boolean, |
||||
withRef?: boolean |
||||
}; |
||||
|
||||
declare type Null = null | void; |
||||
|
||||
declare function connect<A, OP>( |
||||
...rest: Array<void> // <= workaround for https://github.com/facebook/flow/issues/2360
|
||||
): Connector<OP, $Supertype<{ dispatch: Dispatch<A> } & OP>>; |
||||
|
||||
declare function connect<A, OP>( |
||||
mapStateToProps: Null, |
||||
mapDispatchToProps: Null, |
||||
mergeProps: Null, |
||||
options: ConnectOptions |
||||
): Connector<OP, $Supertype<{ dispatch: Dispatch<A> } & OP>>; |
||||
|
||||
declare function connect<S, A, OP, SP>( |
||||
mapStateToProps: MapStateToProps<S, OP, SP>, |
||||
mapDispatchToProps: Null, |
||||
mergeProps: Null, |
||||
options?: ConnectOptions |
||||
): Connector<OP, $Supertype<SP & { dispatch: Dispatch<A> } & OP>>; |
||||
|
||||
declare function connect<A, OP, DP>( |
||||
mapStateToProps: Null, |
||||
mapDispatchToProps: MapDispatchToProps<A, OP, DP>, |
||||
mergeProps: Null, |
||||
options?: ConnectOptions |
||||
): Connector<OP, $Supertype<DP & OP>>; |
||||
|
||||
declare function connect<S, A, OP, SP, DP>( |
||||
mapStateToProps: MapStateToProps<S, OP, SP>, |
||||
mapDispatchToProps: MapDispatchToProps<A, OP, DP>, |
||||
mergeProps: Null, |
||||
options?: ConnectOptions |
||||
): Connector<OP, $Supertype<SP & DP & OP>>; |
||||
|
||||
declare function connect<S, A, OP, SP, DP, P>( |
||||
mapStateToProps: MapStateToProps<S, OP, SP>, |
||||
mapDispatchToProps: MapDispatchToProps<A, OP, DP>, |
||||
mergeProps: MergeProps<SP, DP, OP, P>, |
||||
options?: ConnectOptions |
||||
): Connector<OP, P>; |
||||
|
||||
} |
@ -0,0 +1,56 @@ |
||||
// flow-typed signature: ba132c96664f1a05288f3eb2272a3c35
|
||||
// flow-typed version: c4bbd91cfc/redux_v3.x.x/flow_>=v0.33.x
|
||||
|
||||
declare module 'redux' { |
||||
|
||||
/* |
||||
|
||||
S = State |
||||
A = Action |
||||
|
||||
*/ |
||||
|
||||
declare type Dispatch<A: { type: $Subtype<string> }> = (action: A) => A; |
||||
|
||||
declare type MiddlewareAPI<S, A> = { |
||||
dispatch: Dispatch<A>; |
||||
getState(): S; |
||||
}; |
||||
|
||||
declare type Store<S, A> = { |
||||
// rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages)
|
||||
dispatch: Dispatch<A>; |
||||
getState(): S; |
||||
subscribe(listener: () => void): () => void; |
||||
replaceReducer(nextReducer: Reducer<S, A>): void |
||||
}; |
||||
|
||||
declare type Reducer<S, A> = (state: S, action: A) => S; |
||||
|
||||
declare type Middleware<S, A> = |
||||
(api: MiddlewareAPI<S, A>) => |
||||
(next: Dispatch<A>) => Dispatch<A>; |
||||
|
||||
declare type StoreCreator<S, A> = { |
||||
(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A>): Store<S, A>; |
||||
(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A>): Store<S, A>; |
||||
}; |
||||
|
||||
declare type StoreEnhancer<S, A> = (next: StoreCreator<S, A>) => StoreCreator<S, A>; |
||||
|
||||
declare function createStore<S, A>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A>): Store<S, A>; |
||||
declare function createStore<S, A>(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A>): Store<S, A>; |
||||
|
||||
declare function applyMiddleware<S, A>(...middlewares: Array<Middleware<S, A>>): StoreEnhancer<S, A>; |
||||
|
||||
declare type ActionCreator<A, B> = (...args: Array<B>) => A; |
||||
declare type ActionCreators<K, A> = { [key: K]: ActionCreator<A, any> }; |
||||
|
||||
declare function bindActionCreators<A, C: ActionCreator<A, any>>(actionCreator: C, dispatch: Dispatch<A>): C; |
||||
declare function bindActionCreators<A, K, C: ActionCreators<K, A>>(actionCreators: C, dispatch: Dispatch<A>): C; |
||||
|
||||
declare function combineReducers<O: Object, A>(reducers: O): Reducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>; |
||||
|
||||
declare function compose<S, A>(...fns: Array<StoreEnhancer<S, A>>): Function; |
||||
|
||||
} |
Loading…
Reference in new issue