-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.d.ts
81 lines (79 loc) Β· 1.59 KB
/
types.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
81
declare module "*.svg" {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>
export default content
}
/** https://openweathermap.org/current#current_JSON */
type CurrentWeatherData = {
coord: {
/** lon: -122.08 */
lon: number
/** lat: 37.39 */
lat: number
}
weather: [
{
/** id: 800 */
id: number
/** main: "Clear" */
main: string
/** description: "clear sky" */
description: string
/** icon: "01d" */
icon: string
}
]
/** base: "stations" */
base: string
main: {
/** temp: 282.55 */
temp: number
/** feels_like: 281.86 */
feels_like: number
/** temp_min: 280.37 */
temp_min: number
/** temp_max: 284.26 */
temp_max: number
/** pressure: 1023 */
pressure: number
/** humidity: 100 */
humidity: number
}
/** visibility: 16093 */
visibility: number
wind: {
/** speed: 1.5 */
speed: number
/** deg: 350 */
deg: number
}
clouds: {
/** all: 1 */
all: number
}
/** dt: 1560350645 */
dt: number
sys: {
/** type: 1 */
type: number
/** id: 5122 */
id: number
/** message: 0.0139 */
message: number
/** country: "US" */
country: string
/** sunrise: 1560343627 */
sunrise: number
/** sunset: 1560396563 */
sunset: number
}
/** timezone: -25200 */
timezone: number
/** id: 420006353 */
id: number
/** name: "Mountain View" */
name: string
/** cod: 200 */
cod: number
/** message is used for errors, i.e. {cod: 404, message: "city not found"} */
message?: string
}