Files
trainhour/src/state/state.ts
Loic Coenen 77113c83e2
Some checks failed
Playwright Tests / test (push) Has been cancelled
feat: RSS feed and config
2025-11-02 20:36:07 +01:00

45 lines
1014 B
TypeScript

import type {Station} from "../types";
import type { Article } from "../types/article";
import type {IssuesResponse} from "../types/issues";
import type { DepartureType } from "../types/liveboard";
import type { WeatherData } from "../types/weather";
export type RSS = {
title: string,
link: string
}
export type Config = {
trainScheduleShow: number,
trainDelayCompute: number,
trainCancelCompute: number,
rssFollow: string,
}
export type State = {
trainScheduleLoading: boolean,
departures: DepartureType[] | undefined,
trainScheduleError: Error | undefined,
weather: WeatherData | undefined,
weatherLoading: boolean,
weatherError: Error | undefined,
news: Article[] | undefined,
newsLoading: boolean,
newsError: Error | undefined,
issues: IssuesResponse | undefined,
issuesLoading: boolean,
issuesError: Error | undefined,
stations: undefined | Station[],
selectedLocation: string,
config: Config,
rss: RSS[] | undefined,
rssLoading: boolean,
rssError: Error | undefined,
}