Fix linter (#452)

This commit is contained in:
Alexander Krivonosov 2021-05-12 21:10:38 +03:00 committed by GitHub
parent 98fcc90c6b
commit b60ff8acf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 465 additions and 473 deletions

View file

@ -18,9 +18,8 @@ const mapStateToProps = (state: RootState) => ({
isFetching: getIsSchemaListFetching(state), isFetching: getIsSchemaListFetching(state),
schemas: getSchemaList(state), schemas: getSchemaList(state),
globalSchemaCompatibilityLevel: getGlobalSchemaCompatibilityLevel(state), globalSchemaCompatibilityLevel: getGlobalSchemaCompatibilityLevel(state),
isGlobalSchemaCompatibilityLevelFetched: getGlobalSchemaCompatibilityLevelFetched( isGlobalSchemaCompatibilityLevelFetched:
state getGlobalSchemaCompatibilityLevelFetched(state),
),
}); });
const mapDispatchToProps = { const mapDispatchToProps = {

View file

@ -23,10 +23,8 @@ const ListItem: React.FC<ListItemProps> = ({
clusterName, clusterName,
clearTopicMessages, clearTopicMessages,
}) => { }) => {
const [ const [isDeleteTopicConfirmationVisible, setDeleteTopicConfirmationVisible] =
isDeleteTopicConfirmationVisible, React.useState(false);
setDeleteTopicConfirmationVisible,
] = React.useState(false);
const outOfSyncReplicas = React.useMemo(() => { const outOfSyncReplicas = React.useMemo(() => {
if (partitions === undefined || partitions.length === 0) { if (partitions === undefined || partitions.length === 0) {

View file

@ -33,10 +33,8 @@ const Details: React.FC<Props> = ({
}) => { }) => {
const history = useHistory(); const history = useHistory();
const { isReadOnly } = React.useContext(ClusterContext); const { isReadOnly } = React.useContext(ClusterContext);
const [ const [isDeleteTopicConfirmationVisible, setDeleteTopicConfirmationVisible] =
isDeleteTopicConfirmationVisible, React.useState(false);
setDeleteTopicConfirmationVisible,
] = React.useState(false);
const deleteTopicHandler = React.useCallback(() => { const deleteTopicHandler = React.useCallback(() => {
deleteTopic(clusterName, topicName); deleteTopic(clusterName, topicName);
history.push(clusterTopicsPath(clusterName)); history.push(clusterTopicsPath(clusterName));

View file

@ -50,9 +50,8 @@ const Messages: React.FC<Props> = ({
fetchTopicMessages, fetchTopicMessages,
}) => { }) => {
const [searchQuery, setSearchQuery] = React.useState<string>(''); const [searchQuery, setSearchQuery] = React.useState<string>('');
const [searchTimestamp, setSearchTimestamp] = React.useState<Date | null>( const [searchTimestamp, setSearchTimestamp] =
null React.useState<Date | null>(null);
);
const [filterProps, setFilterProps] = React.useState<FilterProps[]>([]); const [filterProps, setFilterProps] = React.useState<FilterProps[]>([]);
const [selectedSeekType, setSelectedSeekType] = React.useState<SeekType>( const [selectedSeekType, setSelectedSeekType] = React.useState<SeekType>(
SeekType.OFFSET SeekType.OFFSET

View file

@ -39,9 +39,8 @@ const CustomParamSelect: React.FC<CustomParamSelectProps> = ({
return valid || 'Custom Parameter must be unique'; return valid || 'Custom Parameter must be unique';
}; };
const onChange = (inputName: string) => ( const onChange =
event: React.ChangeEvent<HTMLSelectElement> (inputName: string) => (event: React.ChangeEvent<HTMLSelectElement>) => {
) => {
trigger(inputName); trigger(inputName);
onNameChange(index, event.target.value); onNameChange(index, event.target.value);
}; };

View file

@ -35,10 +35,8 @@ const CustomParams: React.FC<Props> = ({ isSubmitting, config }) => {
) )
: {}; : {};
const [ const [formCustomParams, setFormCustomParams] =
formCustomParams, React.useState<TopicFormCustomParams>({
setFormCustomParams,
] = React.useState<TopicFormCustomParams>({
byIndex, byIndex,
allIndexes: Object.keys(byIndex), allIndexes: Object.keys(byIndex),
}); });

View file

@ -235,9 +235,8 @@ export const updateConnectorConfigAction = createAsyncAction(
'PATCH_CONNECTOR_CONFIG__FAILURE' 'PATCH_CONNECTOR_CONFIG__FAILURE'
)<undefined, { connector: Connector }, { alert?: FailurePayload }>(); )<undefined, { connector: Connector }, { alert?: FailurePayload }>();
export const setTopicsSearchAction = createAction( export const setTopicsSearchAction =
'SET_TOPICS_SEARCH' createAction('SET_TOPICS_SEARCH')<string>();
)<string>();
export const setTopicsOrderByAction = createAction( export const setTopicsOrderByAction = createAction(
'SET_TOPICS_ORDER_BY' 'SET_TOPICS_ORDER_BY'

View file

@ -6,9 +6,9 @@ import * as actions from 'redux/actions/actions';
const apiClientConf = new Configuration(BASE_PARAMS); const apiClientConf = new Configuration(BASE_PARAMS);
export const brokersApiClient = new BrokersApi(apiClientConf); export const brokersApiClient = new BrokersApi(apiClientConf);
export const fetchBrokers = ( export const fetchBrokers =
clusterName: ClusterName (clusterName: ClusterName): PromiseThunkResult =>
): PromiseThunkResult => async (dispatch) => { async (dispatch) => {
dispatch(actions.fetchBrokersAction.request()); dispatch(actions.fetchBrokersAction.request());
try { try {
const payload = await brokersApiClient.getBrokers({ clusterName }); const payload = await brokersApiClient.getBrokers({ clusterName });
@ -16,12 +16,11 @@ export const fetchBrokers = (
} catch (e) { } catch (e) {
dispatch(actions.fetchBrokersAction.failure()); dispatch(actions.fetchBrokersAction.failure());
} }
}; };
export const fetchBrokerMetrics = ( export const fetchBrokerMetrics =
clusterName: ClusterName, (clusterName: ClusterName, brokerId: BrokerId): PromiseThunkResult =>
brokerId: BrokerId async (dispatch) => {
): PromiseThunkResult => async (dispatch) => {
dispatch(actions.fetchBrokerMetricsAction.request()); dispatch(actions.fetchBrokerMetricsAction.request());
try { try {
const payload = await brokersApiClient.getBrokersMetrics({ const payload = await brokersApiClient.getBrokersMetrics({
@ -32,4 +31,4 @@ export const fetchBrokerMetrics = (
} catch (e) { } catch (e) {
dispatch(actions.fetchBrokerMetricsAction.failure()); dispatch(actions.fetchBrokerMetricsAction.failure());
} }
}; };

View file

@ -16,9 +16,9 @@ export const fetchClustersList = (): PromiseThunkResult => async (dispatch) => {
} }
}; };
export const fetchClusterStats = ( export const fetchClusterStats =
clusterName: ClusterName (clusterName: ClusterName): PromiseThunkResult =>
): PromiseThunkResult => async (dispatch) => { async (dispatch) => {
dispatch(actions.fetchClusterStatsAction.request()); dispatch(actions.fetchClusterStatsAction.request());
try { try {
const payload = await clustersApiClient.getClusterStats({ clusterName }); const payload = await clustersApiClient.getClusterStats({ clusterName });
@ -26,11 +26,11 @@ export const fetchClusterStats = (
} catch (e) { } catch (e) {
dispatch(actions.fetchClusterStatsAction.failure()); dispatch(actions.fetchClusterStatsAction.failure());
} }
}; };
export const fetchClusterMetrics = ( export const fetchClusterMetrics =
clusterName: ClusterName (clusterName: ClusterName): PromiseThunkResult =>
): PromiseThunkResult => async (dispatch) => { async (dispatch) => {
dispatch(actions.fetchClusterMetricsAction.request()); dispatch(actions.fetchClusterMetricsAction.request());
try { try {
const payload = await clustersApiClient.getClusterMetrics({ const payload = await clustersApiClient.getClusterMetrics({
@ -40,4 +40,4 @@ export const fetchClusterMetrics = (
} catch (e) { } catch (e) {
dispatch(actions.fetchClusterMetricsAction.failure()); dispatch(actions.fetchClusterMetricsAction.failure());
} }
}; };

View file

@ -10,9 +10,9 @@ import * as actions from 'redux/actions/actions';
const apiClientConf = new Configuration(BASE_PARAMS); const apiClientConf = new Configuration(BASE_PARAMS);
export const consumerGroupsApiClient = new ConsumerGroupsApi(apiClientConf); export const consumerGroupsApiClient = new ConsumerGroupsApi(apiClientConf);
export const fetchConsumerGroupsList = ( export const fetchConsumerGroupsList =
clusterName: ClusterName (clusterName: ClusterName): PromiseThunkResult =>
): PromiseThunkResult => async (dispatch) => { async (dispatch) => {
dispatch(actions.fetchConsumerGroupsAction.request()); dispatch(actions.fetchConsumerGroupsAction.request());
try { try {
const consumerGroups = await consumerGroupsApiClient.getConsumerGroups({ const consumerGroups = await consumerGroupsApiClient.getConsumerGroups({
@ -22,20 +22,21 @@ export const fetchConsumerGroupsList = (
} catch (e) { } catch (e) {
dispatch(actions.fetchConsumerGroupsAction.failure()); dispatch(actions.fetchConsumerGroupsAction.failure());
} }
}; };
export const fetchConsumerGroupDetails = ( export const fetchConsumerGroupDetails =
(
clusterName: ClusterName, clusterName: ClusterName,
consumerGroupID: ConsumerGroupID consumerGroupID: ConsumerGroupID
): PromiseThunkResult => async (dispatch) => { ): PromiseThunkResult =>
async (dispatch) => {
dispatch(actions.fetchConsumerGroupDetailsAction.request()); dispatch(actions.fetchConsumerGroupDetailsAction.request());
try { try {
const consumerGroupDetails = await consumerGroupsApiClient.getConsumerGroup( const consumerGroupDetails =
{ await consumerGroupsApiClient.getConsumerGroup({
clusterName, clusterName,
id: consumerGroupID, id: consumerGroupID,
} });
);
dispatch( dispatch(
actions.fetchConsumerGroupDetailsAction.success({ actions.fetchConsumerGroupDetailsAction.success({
consumerGroupID, consumerGroupID,
@ -45,4 +46,4 @@ export const fetchConsumerGroupDetails = (
} catch (e) { } catch (e) {
dispatch(actions.fetchConsumerGroupDetailsAction.failure()); dispatch(actions.fetchConsumerGroupDetailsAction.failure());
} }
}; };

View file

@ -20,9 +20,9 @@ import { isEqual } from 'lodash';
const apiClientConf = new Configuration(BASE_PARAMS); const apiClientConf = new Configuration(BASE_PARAMS);
export const schemasApiClient = new SchemasApi(apiClientConf); export const schemasApiClient = new SchemasApi(apiClientConf);
export const fetchSchemasByClusterName = ( export const fetchSchemasByClusterName =
clusterName: ClusterName (clusterName: ClusterName): PromiseThunkResult<void> =>
): PromiseThunkResult<void> => async (dispatch) => { async (dispatch) => {
dispatch(actions.fetchSchemasByClusterNameAction.request()); dispatch(actions.fetchSchemasByClusterNameAction.request());
try { try {
const schemas = await schemasApiClient.getSchemas({ clusterName }); const schemas = await schemasApiClient.getSchemas({ clusterName });
@ -30,12 +30,11 @@ export const fetchSchemasByClusterName = (
} catch (e) { } catch (e) {
dispatch(actions.fetchSchemasByClusterNameAction.failure()); dispatch(actions.fetchSchemasByClusterNameAction.failure());
} }
}; };
export const fetchSchemaVersions = ( export const fetchSchemaVersions =
clusterName: ClusterName, (clusterName: ClusterName, subject: SchemaName): PromiseThunkResult<void> =>
subject: SchemaName async (dispatch) => {
): PromiseThunkResult<void> => async (dispatch) => {
if (!subject) return; if (!subject) return;
dispatch(actions.fetchSchemaVersionsAction.request()); dispatch(actions.fetchSchemaVersionsAction.request());
try { try {
@ -47,11 +46,11 @@ export const fetchSchemaVersions = (
} catch (e) { } catch (e) {
dispatch(actions.fetchSchemaVersionsAction.failure()); dispatch(actions.fetchSchemaVersionsAction.failure());
} }
}; };
export const fetchGlobalSchemaCompatibilityLevel = ( export const fetchGlobalSchemaCompatibilityLevel =
clusterName: ClusterName (clusterName: ClusterName): PromiseThunkResult<void> =>
): PromiseThunkResult<void> => async (dispatch) => { async (dispatch) => {
dispatch(actions.fetchGlobalSchemaCompatibilityLevelAction.request()); dispatch(actions.fetchGlobalSchemaCompatibilityLevelAction.request());
try { try {
const result = await schemasApiClient.getGlobalSchemaCompatibilityLevel({ const result = await schemasApiClient.getGlobalSchemaCompatibilityLevel({
@ -65,12 +64,14 @@ export const fetchGlobalSchemaCompatibilityLevel = (
} catch (e) { } catch (e) {
dispatch(actions.fetchGlobalSchemaCompatibilityLevelAction.failure()); dispatch(actions.fetchGlobalSchemaCompatibilityLevelAction.failure());
} }
}; };
export const updateGlobalSchemaCompatibilityLevel = ( export const updateGlobalSchemaCompatibilityLevel =
(
clusterName: ClusterName, clusterName: ClusterName,
compatibilityLevel: CompatibilityLevelCompatibilityEnum compatibilityLevel: CompatibilityLevelCompatibilityEnum
): PromiseThunkResult<void> => async (dispatch) => { ): PromiseThunkResult<void> =>
async (dispatch) => {
dispatch(actions.updateGlobalSchemaCompatibilityLevelAction.request()); dispatch(actions.updateGlobalSchemaCompatibilityLevelAction.request());
try { try {
await schemasApiClient.updateGlobalSchemaCompatibilityLevel({ await schemasApiClient.updateGlobalSchemaCompatibilityLevel({
@ -85,12 +86,14 @@ export const updateGlobalSchemaCompatibilityLevel = (
} catch (e) { } catch (e) {
dispatch(actions.updateGlobalSchemaCompatibilityLevelAction.failure()); dispatch(actions.updateGlobalSchemaCompatibilityLevelAction.failure());
} }
}; };
export const createSchema = ( export const createSchema =
(
clusterName: ClusterName, clusterName: ClusterName,
newSchemaSubject: NewSchemaSubject newSchemaSubject: NewSchemaSubject
): PromiseThunkResult => async (dispatch) => { ): PromiseThunkResult =>
async (dispatch) => {
dispatch(actions.createSchemaAction.request()); dispatch(actions.createSchemaAction.request());
try { try {
const schema: SchemaSubject = await schemasApiClient.createNewSchema({ const schema: SchemaSubject = await schemasApiClient.createNewSchema({
@ -108,16 +111,18 @@ export const createSchema = (
dispatch(actions.createSchemaAction.failure({ alert })); dispatch(actions.createSchemaAction.failure({ alert }));
throw error; throw error;
} }
}; };
export const updateSchema = ( export const updateSchema =
(
latestSchema: SchemaSubject, latestSchema: SchemaSubject,
newSchema: string, newSchema: string,
newSchemaType: SchemaType, newSchemaType: SchemaType,
newCompatibilityLevel: CompatibilityLevelCompatibilityEnum, newCompatibilityLevel: CompatibilityLevelCompatibilityEnum,
clusterName: string, clusterName: string,
subject: string subject: string
): PromiseThunkResult => async (dispatch) => { ): PromiseThunkResult =>
async (dispatch) => {
dispatch(actions.updateSchemaAction.request()); dispatch(actions.updateSchemaAction.request());
try { try {
let schema: SchemaSubject = latestSchema; let schema: SchemaSubject = latestSchema;
@ -155,11 +160,10 @@ export const updateSchema = (
dispatch(actions.updateSchemaAction.failure({ alert })); dispatch(actions.updateSchemaAction.failure({ alert }));
throw e; throw e;
} }
}; };
export const deleteSchema = ( export const deleteSchema =
clusterName: ClusterName, (clusterName: ClusterName, subject: string): PromiseThunkResult =>
subject: string async (dispatch) => {
): PromiseThunkResult => async (dispatch) => {
dispatch(actions.deleteSchemaAction.request()); dispatch(actions.deleteSchemaAction.request());
try { try {
await schemasApiClient.deleteSchema({ await schemasApiClient.deleteSchema({
@ -176,4 +180,4 @@ export const deleteSchema = (
}; };
dispatch(actions.deleteSchemaAction.failure({ alert })); dispatch(actions.deleteSchemaAction.failure({ alert }));
} }
}; };

View file

@ -36,9 +36,9 @@ export interface FetchTopicsListParams {
orderBy?: TopicColumnsToSort; orderBy?: TopicColumnsToSort;
} }
export const fetchTopicsList = ( export const fetchTopicsList =
params: FetchTopicsListParams (params: FetchTopicsListParams): PromiseThunkResult =>
): PromiseThunkResult => async (dispatch, getState) => { async (dispatch, getState) => {
dispatch(actions.fetchTopicsListAction.request()); dispatch(actions.fetchTopicsListAction.request());
try { try {
const { topics, pageCount } = await topicsApiClient.getTopics(params); const { topics, pageCount } = await topicsApiClient.getTopics(params);
@ -65,13 +65,15 @@ export const fetchTopicsList = (
} catch (e) { } catch (e) {
dispatch(actions.fetchTopicsListAction.failure()); dispatch(actions.fetchTopicsListAction.failure());
} }
}; };
export const fetchTopicMessages = ( export const fetchTopicMessages =
(
clusterName: ClusterName, clusterName: ClusterName,
topicName: TopicName, topicName: TopicName,
queryParams: Partial<TopicMessageQueryParams> queryParams: Partial<TopicMessageQueryParams>
): PromiseThunkResult => async (dispatch) => { ): PromiseThunkResult =>
async (dispatch) => {
dispatch(actions.fetchTopicMessagesAction.request()); dispatch(actions.fetchTopicMessagesAction.request());
try { try {
const messages = await messagesApiClient.getTopicMessages({ const messages = await messagesApiClient.getTopicMessages({
@ -83,13 +85,15 @@ export const fetchTopicMessages = (
} catch (e) { } catch (e) {
dispatch(actions.fetchTopicMessagesAction.failure()); dispatch(actions.fetchTopicMessagesAction.failure());
} }
}; };
export const clearTopicMessages = ( export const clearTopicMessages =
(
clusterName: ClusterName, clusterName: ClusterName,
topicName: TopicName, topicName: TopicName,
partitions?: number[] partitions?: number[]
): PromiseThunkResult => async (dispatch) => { ): PromiseThunkResult =>
async (dispatch) => {
dispatch(actions.clearMessagesTopicAction.request()); dispatch(actions.clearMessagesTopicAction.request());
try { try {
await messagesApiClient.deleteTopicMessages({ await messagesApiClient.deleteTopicMessages({
@ -107,12 +111,11 @@ export const clearTopicMessages = (
}; };
dispatch(actions.clearMessagesTopicAction.failure({ alert })); dispatch(actions.clearMessagesTopicAction.failure({ alert }));
} }
}; };
export const fetchTopicDetails = ( export const fetchTopicDetails =
clusterName: ClusterName, (clusterName: ClusterName, topicName: TopicName): PromiseThunkResult =>
topicName: TopicName async (dispatch, getState) => {
): PromiseThunkResult => async (dispatch, getState) => {
dispatch(actions.fetchTopicDetailsAction.request()); dispatch(actions.fetchTopicDetailsAction.request());
try { try {
const topicDetails = await topicsApiClient.getTopicDetails({ const topicDetails = await topicsApiClient.getTopicDetails({
@ -134,12 +137,11 @@ export const fetchTopicDetails = (
} catch (e) { } catch (e) {
dispatch(actions.fetchTopicDetailsAction.failure()); dispatch(actions.fetchTopicDetailsAction.failure());
} }
}; };
export const fetchTopicConfig = ( export const fetchTopicConfig =
clusterName: ClusterName, (clusterName: ClusterName, topicName: TopicName): PromiseThunkResult =>
topicName: TopicName async (dispatch, getState) => {
): PromiseThunkResult => async (dispatch, getState) => {
dispatch(actions.fetchTopicConfigAction.request()); dispatch(actions.fetchTopicConfigAction.request());
try { try {
const config = await topicsApiClient.getTopicConfigs({ const config = await topicsApiClient.getTopicConfigs({
@ -165,7 +167,7 @@ export const fetchTopicConfig = (
} catch (e) { } catch (e) {
dispatch(actions.fetchTopicConfigAction.failure()); dispatch(actions.fetchTopicConfigAction.failure());
} }
}; };
const formatTopicCreation = (form: TopicFormDataRaw): TopicCreation => { const formatTopicCreation = (form: TopicFormDataRaw): TopicCreation => {
const { const {
@ -233,10 +235,9 @@ const formatTopicUpdate = (form: TopicFormDataRaw): TopicUpdate => {
}; };
}; };
export const createTopic = ( export const createTopic =
clusterName: ClusterName, (clusterName: ClusterName, form: TopicFormDataRaw): PromiseThunkResult =>
form: TopicFormDataRaw async (dispatch, getState) => {
): PromiseThunkResult => async (dispatch, getState) => {
dispatch(actions.createTopicAction.request()); dispatch(actions.createTopicAction.request());
try { try {
const topic: Topic = await topicsApiClient.createTopic({ const topic: Topic = await topicsApiClient.createTopic({
@ -266,13 +267,15 @@ export const createTopic = (
}; };
dispatch(actions.createTopicAction.failure({ alert })); dispatch(actions.createTopicAction.failure({ alert }));
} }
}; };
export const updateTopic = ( export const updateTopic =
(
clusterName: ClusterName, clusterName: ClusterName,
topicName: TopicName, topicName: TopicName,
form: TopicFormDataRaw form: TopicFormDataRaw
): PromiseThunkResult => async (dispatch, getState) => { ): PromiseThunkResult =>
async (dispatch, getState) => {
dispatch(actions.updateTopicAction.request()); dispatch(actions.updateTopicAction.request());
try { try {
const topic: Topic = await topicsApiClient.updateTopic({ const topic: Topic = await topicsApiClient.updateTopic({
@ -297,12 +300,11 @@ export const updateTopic = (
} catch (e) { } catch (e) {
dispatch(actions.updateTopicAction.failure()); dispatch(actions.updateTopicAction.failure());
} }
}; };
export const deleteTopic = ( export const deleteTopic =
clusterName: ClusterName, (clusterName: ClusterName, topicName: TopicName): PromiseThunkResult =>
topicName: TopicName async (dispatch) => {
): PromiseThunkResult => async (dispatch) => {
dispatch(actions.deleteTopicAction.request()); dispatch(actions.deleteTopicAction.request());
try { try {
await topicsApiClient.deleteTopic({ await topicsApiClient.deleteTopic({
@ -313,4 +315,4 @@ export const deleteTopic = (
} catch (e) { } catch (e) {
dispatch(actions.deleteTopicAction.failure()); dispatch(actions.deleteTopicAction.failure());
} }
}; };

View file

@ -18,12 +18,10 @@ export const getTopicListTotalPages = (state: RootState) =>
topicsState(state).totalPages; topicsState(state).totalPages;
const getTopicListFetchingStatus = createFetchingSelector('GET_TOPICS'); const getTopicListFetchingStatus = createFetchingSelector('GET_TOPICS');
const getTopicDetailsFetchingStatus = createFetchingSelector( const getTopicDetailsFetchingStatus =
'GET_TOPIC_DETAILS' createFetchingSelector('GET_TOPIC_DETAILS');
); const getTopicMessagesFetchingStatus =
const getTopicMessagesFetchingStatus = createFetchingSelector( createFetchingSelector('GET_TOPIC_MESSAGES');
'GET_TOPIC_MESSAGES'
);
const getTopicConfigFetchingStatus = createFetchingSelector('GET_TOPIC_CONFIG'); const getTopicConfigFetchingStatus = createFetchingSelector('GET_TOPIC_CONFIG');
const getTopicCreationStatus = createFetchingSelector('POST_TOPIC'); const getTopicCreationStatus = createFetchingSelector('POST_TOPIC');
const getTopicUpdateStatus = createFetchingSelector('PATCH_TOPIC'); const getTopicUpdateStatus = createFetchingSelector('PATCH_TOPIC');

View file

@ -6,9 +6,7 @@ import { RootState, Action } from 'redux/interfaces';
const middlewares: Array<Middleware> = [thunk]; const middlewares: Array<Middleware> = [thunk];
type DispatchExts = ThunkDispatch<RootState, undefined, Action>; type DispatchExts = ThunkDispatch<RootState, undefined, Action>;
const mockStoreCreator: MockStoreCreator< const mockStoreCreator: MockStoreCreator<RootState, DispatchExts> =
RootState, configureMockStore<RootState, DispatchExts>(middlewares);
DispatchExts
> = configureMockStore<RootState, DispatchExts>(middlewares);
export default mockStoreCreator(); export default mockStoreCreator();