fix: type errors (#3)

Co-authored-by: terraputix <terraputix@mailbox.org>
Reviewed-on: useweb/open-meteo-blue#3
This commit was merged in pull request #3.
This commit is contained in:
2026-02-15 15:53:54 +01:00
co-authored by terraputix
parent be0f7f822d
commit 6872cac00e
11 changed files with 569 additions and 578 deletions
+10 -3
View File
@@ -16,9 +16,16 @@
let { children }: Props = $props();
interface CurrentWeather {
current: {
temperature_2m: number;
weather_code: number;
};
}
let location = $state(get(storedLocation));
let mounted = $state(false);
let currentWeather = $state(null);
let currentWeather = $state<CurrentWeather | null>(null);
// Subscribe to location changes
storedLocation.subscribe((value) => {
@@ -47,8 +54,8 @@
}
};
const getWeatherIcon = (code) => {
const iconMap = {
const getWeatherIcon = (code: number): string => {
const iconMap: Record<number, string> = {
0: '☀️',
1: '🌤️',
2: '⛅',