-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.d.ts
37 lines (34 loc) · 1.01 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
declare module 'country-emoji' {
/**
* Returns the flag emoji of a country.
*
* @param {string} input - Country code or name.
* @returns {?string} The flag emoji of the country if the provided input is valid.
*
*/
export function flag(input: string): string | undefined;
/**
* Returns the code of a country.
*
* @param {string} input - Flag emoji or name.
* @returns {?string} The code of the country if the input is valid.
*
*/
export function code(input: string): string | undefined;
/**
* Returns the name of a country.
*
* @param {string} input - Flag emoji or county code.
* @returns {?string} The name of the country if the input is valid.
*
*/
export function name(input: string): string | undefined;
/**
* Object that contains every single country's name and language name.
* The value is an array of at least one string.
*
* @example {"BG": ["Bulgaria", "Bulgarian"]}; countries["BG"] would be ["Bulgaria", "Bulgarian"]
*
*/
export const countries: Record<string, [string, ...string[]]>;
}