-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathindex.d.ts
51 lines (50 loc) · 2.04 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
interface Country {
name: string;
alpha2: string;
alpha3: string;
numeric: string;
locales: string[];
default_locale: string;
currency: string;
currency_name: string;
languages: string[];
capital: string;
emoji: string;
emojiU: string;
fips: string;
internet: string;
continent: string;
region: string;
alternate_names?: string[];
latitude?: number;
longitude?: number;
}
interface CLM {
getAllCountries: () => Country[];
getAlpha3ByAlpha2: (alpha2: string) => string | undefined;
getLocaleByAlpha2: (alpha2: string) => string | undefined;
getCountryNameByAlpha2: (alpha2: string) => string | undefined;
getNumericByAlpha2: (alpha2: string) => string | undefined;
getCurrencyByAlpha2: (alpha2: string) => string | undefined;
getCountryByAlpha2: (alpha2: string) => Country | undefined;
getAlpha2ByAlpha3: (alpha3: string) => string | undefined;
getLocaleByAlpha3: (alpha3: string) => string | undefined;
getCountryNameByAlpha3: (alpha3: string) => string| undefined;
getNumericByAlpha3: (alpha3: string) => string | undefined;
getCurrencyByAlpha3: (alpha3: string) => string | undefined;
getCountryByAlpha3: (alpha3: string) => Country | undefined;
getAlpha2ByNumeric: (numeric: string) => string | undefined;
getAlpha3ByNumeric: (numeric: string) => string | undefined;
getLocaleByNumeric: (numeric: string) => string | undefined;
getCountryNameByNumeric: (numeric: string) => string | undefined;
getCurrencyByNumeric: (numeric: string) => string | undefined;
getCountryByNumeric: (numeric: string) => Country | undefined;
getAlpha2ByName: (name: string, fuzzy?: boolean) => string | undefined;
getAlpha3ByName: (name: string, fuzzy?: boolean) => string | undefined;
getLocaleByName: (name: string, fuzzy?: boolean) => string | undefined;
getNumericByName: (name: string, fuzzy?: boolean) => string | undefined;
getCurrencyByName: (name: string, fuzzy?: boolean) => string | undefined;
getCountryByName: (name: string, fuzzy?: boolean) => Country | undefined;
}
declare const clm: CLM;
export = clm;