mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-01 20:29:00 +00:00
fix: типизировать настройку граней окна (#577)
Issue: #577 User-Visible: no
This commit is contained in:
+3
-1
@@ -690,7 +690,9 @@ export const SUN_RAY_ORIGINS = ['inner', 'outer'] as const; // #577 parity
|
||||
export type SunRayOrigin = (typeof SUN_RAY_ORIGINS)[number];
|
||||
|
||||
/** Global window-light source; unknown/legacy values preserve the old geometry. */
|
||||
export function sunRayOriginOf(settings: any): SunRayOrigin {
|
||||
export function sunRayOriginOf(
|
||||
settings: { sun_ray_origin?: unknown } | null | undefined,
|
||||
): SunRayOrigin {
|
||||
return settings?.sun_ray_origin === 'outer' ? 'outer' : 'inner';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user