
* [CHORE] Improve types * [CHORE] Example of actions & thunks specs * [CHORE] Example of reducer & selectors specs * [CHORE] Update dependencies
37 lines
917 B
TypeScript
37 lines
917 B
TypeScript
import { ActionType } from 'typesafe-actions';
|
|
import { ThunkAction } from 'redux-thunk';
|
|
|
|
import * as actions from 'redux/actions/actions';
|
|
|
|
import { TopicsState } from './topic';
|
|
import { ClusterState } from './cluster';
|
|
import { BrokersState } from './broker';
|
|
import { LoaderState } from './loader';
|
|
import { ConsumerGroupsState } from './consumerGroup';
|
|
|
|
export * from './topic';
|
|
export * from './cluster';
|
|
export * from './broker';
|
|
export * from './consumerGroup';
|
|
export * from './loader';
|
|
|
|
export interface RootState {
|
|
topics: TopicsState;
|
|
clusters: ClusterState;
|
|
brokers: BrokersState;
|
|
consumerGroups: ConsumerGroupsState;
|
|
loader: LoaderState;
|
|
}
|
|
|
|
export type Action = ActionType<typeof actions>;
|
|
|
|
export type ThunkResult<ReturnType = void> = ThunkAction<
|
|
ReturnType,
|
|
RootState,
|
|
undefined,
|
|
Action
|
|
>;
|
|
|
|
export type PromiseThunkResult<ReturnType = void> = ThunkResult<
|
|
Promise<ReturnType>
|
|
>;
|