Add interfaces related to Settings part of the application

This commit is contained in:
qowevisa 2024-11-30 16:38:19 +02:00
parent 8ed1974683
commit d1b574ca19

View File

@ -148,6 +148,28 @@ export interface StatsTypeCurrencyChart {
elements: StatsType[]; elements: StatsType[];
} }
// {{{ Settings section
export interface SettingsTypeFilter {
type_id: number;
filter_this: boolean;
// For UI
color: string;
comment: string;
name: string;
}
export const SettingsTypes = {
type: "SettingsTypeFilter",
} as const;
export type SettingsName = keyof typeof SettingsTypes;
export type SettingsType<T extends SettingsName> =
T extends "type" ? SettingsTypeFilter :
never;
// }}}
export const EntityTypes = { export const EntityTypes = {
card: "Card", card: "Card",
type: "Type", type: "Type",