UNPKG

curated-node

Version:

Not a framework. Not a module. Just a bunch of Node.js packages you most likely familiar with and probably already use, bundled together in a modular fashion.

49 lines (48 loc) 1.9 kB
import { Currency } from "./Currency"; import { _BaseProvider } from "../_BaseProvider"; export declare class Continent { readonly id: number; readonly alpha2: string; readonly name: string; constructor(id: number, alpha2: string, name: string); } export declare class Country { readonly id: number; readonly alpha2: string; readonly alpha3: string; readonly name: string; readonly nativeName: string; readonly capital: string; readonly dialCode: string | null; readonly emoji: string; readonly emojiUnicode: string; readonly continentId: number | null; readonly primaryCurrencyAlpha3: string; readonly primaryCurrency: Currency | null; constructor(id: number, alpha2: string, alpha3: string, name: string, nativeName: string, capital: string, dialCode: string | null, emoji: string, emojiUnicode: string, continentId: number | null, primaryCurrencyAlpha3: string); } export declare class State { readonly id: number; readonly alpha2: string; readonly name: string; readonly countryId: number | null; constructor(id: number, alpha2: string, name: string, countryId: number | null); } export declare class GeolocationProvider extends _BaseProvider<GeolocationProvider, {}> { protected _continents: Array<Continent>; protected _countries: Array<Country>; protected _states: Array<State>; protected _countryAlpha2IdMap: { [alpha2: string]: number; }; constructor(); get continents(): Continent[]; get countries(): Country[]; get states(): State[]; getContinentByAlpha2(alpha2: string): Continent | undefined; getCountryByAlpha2(alpha2: string): Country | undefined; getCountryById(id: number): Country | null; getStatesByCountryAlpha2(alpha2: string): State[]; getStatesByCountryId(id: number): State[]; getStateById(id: number): State | null; }