-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.d.ts
86 lines (80 loc) · 1.5 KB
/
index.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
82
83
84
85
86
type AttentionInputType = 'attention';
type PrimaryInputTypes =
| 'archipelago'
| 'city'
| 'continent'
| 'country'
| 'countryCode'
| 'county'
| 'hamlet'
| 'house'
| 'houseNumber'
| 'island'
| 'municipality'
| 'neighbourhood'
| 'postalCity'
| 'postcode'
| 'region'
| 'road'
| 'state'
| 'stateDistrict'
| 'village';
type AliasInputTypes =
| 'allotments'
| 'borough'
| 'building'
| 'cityBlock'
| 'cityDistrict'
| 'commercial'
| 'countryName'
| 'countyCode'
| 'croft'
| 'department'
| 'district'
| 'farmland'
| 'footway'
| 'housenumber'
| 'houses'
| 'industrial'
| 'isolatedDwelling'
| 'localAdministrativeArea'
| 'locality'
| 'partialPostcode'
| 'path'
| 'pedestrian'
| 'place'
| 'postcode'
| 'province'
| 'publicBuilding'
| 'quarter'
| 'residential'
| 'roadReference'
| 'roadReferenceIntl'
| 'square'
| 'stateCode'
| 'street'
| 'streetName'
| 'streetNumber'
| 'subcounty'
| 'subdistrict'
| 'subdivision'
| 'suburb'
| 'town'
| 'township'
| 'ward';
type Input = Partial<Record<AttentionInputType | PrimaryInputTypes | AliasInputTypes, string>>;
interface CommonOptions {
abbreviate?: boolean;
appendCountry?: boolean;
cleanupPostcode?: boolean;
countryCode?: string;
fallbackCountryCode?: string;
}
export function format(
input: Input,
options?: CommonOptions & {output?: 'string'},
): string;
export function format(
input: Input,
options: CommonOptions & {output: 'array'},
): string[];