Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export type LocaleData = {
};

export function registerLocale(localeData: LocaleData): void;
export function alpha2ToAlpha3(alpha2: string): string;
export function alpha2ToNumeric(alpha2: string): number;
export function alpha3ToAlpha2(alpha3: string): string;
export function alpha3ToNumeric(alpha3: string): number;
export function numericToAlpha2(numeric: number | string): string;
export function numericToAlpha3(numeric: number | string): string;
export function alpha2ToAlpha3(alpha2: string): string | undefined;
export function alpha2ToNumeric(alpha2: string): number | undefined;
export function alpha3ToAlpha2(alpha3: string): string | undefined;
export function alpha3ToNumeric(alpha3: string): number | undefined;
export function numericToAlpha2(numeric: number | string): string | undefined;
export function numericToAlpha3(numeric: number | string): string | undefined;
/**
* Returns object map where key is alpha 2 code and value is alpha 3 code
*/
Expand All @@ -26,13 +26,13 @@ export function getAlpha3Codes(): { [alpha3Key: string]: string };
* Returns object map where key is numeric code and value is alpha 2 code
*/
export function getNumericCodes(): { [numericKey: number]: string };
export function getName(alpha2orAlpha3orNumeric: string | number, lang: string): string;
export function getName(alpha2orAlpha3orNumeric: string | number, lang: string): string | undefined;
export function getNames(lang: string): LocalizedNationalityNames;
export function toAlpha3(alpha2orNumeric: number | string): string;
export function toAlpha2(alpha3orNumeric: number | string): string;
export function getAlpha2Code(name: string, lang: string): string;
export function getSimpleAlpha2Code(name: string, lang: string): string;
export function getAlpha3Code(name: string, lang: string): string;
export function getSimpleAlpha3Code(name: string, lang: string): string;
export function toAlpha3(alpha2orNumeric: number | string): string | undefined;
export function toAlpha2(alpha3orNumeric: number | string): string | undefined;
export function getAlpha2Code(name: string, lang: string): string | undefined;
export function getSimpleAlpha2Code(name: string, lang: string): string | undefined;
export function getAlpha3Code(name: string, lang: string): string | undefined;
export function getSimpleAlpha3Code(name: string, lang: string): string | undefined;
export function langs(): string[];
export function isValid(alpha2orAlpha3orNumeric: string | number): boolean;