component names as const

This commit is contained in:
Darius
2026-02-09 19:44:08 +01:00
parent d416e8db07
commit 4c46c5ae6d
4 changed files with 37 additions and 11 deletions

15
dist/homepage.d.ts vendored
View File

@@ -1,18 +1,25 @@
import type { GristRecord_PersonalGoals } from "./grist";
import type { API_HA_DeskPosition } from "./homeassistant";
import type { TidalGetCurrent } from "./tidal";
export type FullInformation = {
export declare const HomepageComponent: {
readonly HA_DESK_POSITION: "ha_desk_position";
readonly HA_TEMP: "ha_temp";
readonly TIDAL_CURRENT: "tidal_current";
readonly GRIST_PERSONAL_GOALS: "grist_personal_goals";
};
export type HomepageComponentName = (typeof HomepageComponent)[keyof typeof HomepageComponent];
export type FullInformation = Record<HomepageComponentName, unknown> & {
ha_desk_position: API_HA_DeskPosition | null;
ha_temp: string | null;
tidal_current: TidalGetCurrent | null;
grist_personal_goals: GristRecord_PersonalGoals | null;
};
export type ComponentUpdate = {
component: string;
component: HomepageComponentName;
data: unknown;
};
export declare function createComponentUpdate(component: string, data: unknown): {
component: string;
export declare function createComponentUpdate(component: HomepageComponentName, data: unknown): {
component: HomepageComponentName;
data: unknown;
};
//# sourceMappingURL=homepage.d.ts.map