-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
60 lines (57 loc) · 1.11 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
// You can use this types if you are using typescript.
// Response has more keys but we simplified to make it easier.
export interface Response {
name: Name
independent?: boolean
status: string
unMember: boolean
currencies?: Record<string, {
name: string,
symbol: string
}>
capital?: string[]
altSpellings: string[]
region: string
subregion?: string
languages?: Record<string, string>
translations: Record<string, {
official: string
common: string
}>
latlng: [number, number]
landlocked: boolean
borders?: string[]
area: number
demonyms?: Record<string, {
f: string,
m: string
}>
flag: string
maps: Record<string,string>
population: number
fifa?: string
car: {
side: string,
sign
}
timezones: string[]
continents: string[]
flags: Record<string, string>
coatOfArms: Record<string, string>
startOfWeek: string
capitalInfo: {
latlng: [number, number]
}
postalCode?: {
format: string,
regex: string
}
}
export interface Name {
common: string
official: string
nativeName?: {
official: string
common: string
}
}