Convert some selectors to Typescript

This commit is contained in:
Bogdan
2023-07-29 03:13:40 +03:00
parent eee1be784b
commit cab50b35aa
13 changed files with 86 additions and 22 deletions

View File

@@ -1,4 +1,8 @@
import IndexerAppState, { IndexerIndexAppState } from './IndexerAppState';
import CommandAppState from './CommandAppState';
import IndexerAppState, {
IndexerIndexAppState,
IndexerStatusAppState,
} from './IndexerAppState';
import IndexerStatsAppState from './IndexerStatsAppState';
import SettingsAppState from './SettingsAppState';
import TagsAppState from './TagsAppState';
@@ -36,8 +40,10 @@ export interface CustomFilter {
}
interface AppState {
commands: CommandAppState;
indexerIndex: IndexerIndexAppState;
indexerStats: IndexerStatsAppState;
indexerStatus: IndexerStatusAppState;
indexers: IndexerAppState;
settings: SettingsAppState;
tags: TagsAppState;

View File

@@ -0,0 +1,6 @@
import AppSectionState from 'App/State/AppSectionState';
import Command from 'Commands/Command';
export type CommandAppState = AppSectionState<Command>;
export default CommandAppState;

View File

@@ -1,6 +1,6 @@
import Column from 'Components/Table/Column';
import SortDirection from 'Helpers/Props/SortDirection';
import Indexer from 'Indexer/Indexer';
import Indexer, { IndexerStatus } from 'Indexer/Indexer';
import AppSectionState, {
AppSectionDeleteState,
AppSectionSaveState,
@@ -30,4 +30,6 @@ interface IndexerAppState
AppSectionDeleteState,
AppSectionSaveState {}
export type IndexerStatusAppState = AppSectionState<IndexerStatus>;
export default IndexerAppState;

View File

@@ -7,6 +7,11 @@ import DownloadClient from 'typings/DownloadClient';
import Notification from 'typings/Notification';
import { UiSettings } from 'typings/UiSettings';
export interface AppProfileAppState
extends AppSectionState<Application>,
AppSectionDeleteState,
AppSectionSaveState {}
export interface ApplicationAppState
extends AppSectionState<Application>,
AppSectionDeleteState,
@@ -24,6 +29,7 @@ export interface NotificationAppState
export type UiSettingsAppState = AppSectionState<UiSettings>;
interface SettingsAppState {
appProfiles: AppProfileAppState;
applications: ApplicationAppState;
downloadClients: DownloadClientAppState;
notifications: NotificationAppState;