-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.d.ts
80 lines (75 loc) · 1.73 KB
/
typings.d.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
export type WeatherInfo = {
latitude: number;
longitude: number;
generationtime_ms: number;
utc_offset_seconds: number;
timezone: string;
timezone_abbreviation: string;
elevation: number;
current_weather: CurrentWeather;
hourly_units: HourlyUnits;
hourly: HourlyData;
daily_units: DailyUnits;
daily: DailyData;
};
type CurrentWeather = {
temperature: number;
windspeed: number;
winddirection: number;
weathercode: number;
is_day: number;
time: string;
};
type HourlyUnits = {
time: string;
temperature_2m: string;
relativehumidity_2m: string;
apparent_temperature: string;
precipitation: string;
rain: string;
showers: string;
snowfall: string;
snow_depth: string;
windgusts_10m: string;
uv_index: string;
uv_index_clear_sky: string;
};
type HourlyData = {
time: string[];
temperature_2m: number[];
relativehumidity_2m: number[];
apparent_temperature: number[];
precipitation_probability: number[];
precipitation: number[];
rain: number[];
showers: number[];
snowfall: number[];
snow_depth: number[];
windgusts_10m: number[];
uv_index: number[];
uv_index_clear_sky: number[];
};
type DailyUnits = {
time: string;
weathercode: string;
temperature_2m_max: string;
temperature_2m_min: string;
apparent_temperature_max: string;
apparent_temperature_min: string;
sunrise: string;
sunset: string;
uv_index_max: string;
uv_index_clear_sky_max: string;
};
type DailyData = {
time: string[];
weathercode: number[];
temperature_2m_max: number[];
temperature_2m_min: number[];
apparent_temperature_max: number[];
apparent_temperature_min: number[];
sunrise: string[];
sunset: string[];
uv_index_max: number[];
uv_index_clear_sky_max: number[];
};