UNPKG

epic-geo

Version:

A simple geo information provider library.

63 lines (62 loc) 1.66 kB
import { CountryNames } from "./countryNames"; export interface States { [key: string]: { cities: string[]; }; } export interface Country { alpha2Code: string; alpha3Code: string; altSpellings: string[]; area: number | null; borders: string[]; callingCodes: string[]; capital: string | null; currencies: Array<{ code: string | null; name: string | null; symbol: string | null; }>; demonym: string | null; flag: string | null; gini: number | null; languages: Array<{ iso639_1: string | null; iso639_2: string | null; name: string | null; nativeName: string | null; }>; latlng: [number, number] | null; name: string; nativeName: string | null; numericCode: string | null; population: number | null; region: string | null; regionalBlocs: Array<{ acronym: string; name: string; otherNames?: string[]; otherAcronyms?: string[]; }>; subregion: string | null; timezones: string[]; topLevelDomain: string[]; translations: { br: string | null; de: string | null; es: string | null; fa: string | null; fr: string | null; hr: string | null; it: string | null; ja: string | null; nl: string | null; pt: string | null; }; cioc: string | null; states: States; } export declare type Countries = { [key in ReturnType<CountryNames["get"]>[number]]: Country; }; export declare const CountriesData: Countries;