forked from Grow-with-Talha/weather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
60 lines (59 loc) · 1.12 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
export interface WeatherData {
location: {
name: string;
region: string;
country: string;
localtime: string;
};
current: {
temp_c: number;
temp_f: number;
is_day: number;
condition: {
text: string;
icon: string;
code: number;
};
wind_kph: number;
humidity: number;
cloud: number;
};
forecast: {
forecastday: ForecastDay[];
};
}
export interface ForecastDay {
date: string;
date_epoch: number;
day: {
mintemp_c: number;
maxtemp_c: number;
mintemp_f: number;
maxtemp_f: number;
avgtemp_c: number;
maxwind_kph: number;
totalprecip_mm: number;
avgvis_km: number;
avghumidity: number;
daily_will_it_rain: boolean;
daily_chance_of_rain: number;
daily_will_it_snow: boolean;
daily_chance_of_snow: number;
condition: {
text: string;
icon: string;
code: number;
};
uv: number;
};
astro: {
sunrise: string;
sunset: string;
moonrise: string;
moonset: string;
moon_phase: string;
moon_illumination: string;
is_moon_up: boolean;
is_sun_up: boolean;
};
}