0.6.3 • Published 7 months ago

@types/country-telephone-data v0.6.3

Weekly downloads
595
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/country-telephone-data

Summary

This package contains type definitions for country-telephone-data (https://github.com/mukeshsoni/country-telephone-data#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/country-telephone-data.

index.d.ts

// Type definitions for country-telephone-data 0.6
// Project: https://github.com/mukeshsoni/country-telephone-data#readme
// Definitions by: Kyle Hensel <https://github.com/k-yle>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export interface Country {
    name: string;
    /** The {@link https://w.wiki/4kP |ISO 3166-1 alpha-2} country code (in **lowercase**) */
    iso2: string;
    dialCode: string;
    /** A format string for phone numbers. **This could be an empty string.** */
    format: string;
    hasAreaCodes?: true | undefined;
    priority: number;
}

/** An array with data on every country */
export const allCountries: Country[];

/**
 * The same data as `allCountries`, but as an object, indexed by the
 * {@link https://w.wiki/4kP |ISO 3166-1 alpha-2}
 * name of the country (in **lowercase**)
 */
export const iso2Lookup: Record<string, Country>;

Additional Details

  • Last updated: Thu, 08 Jul 2021 09:08:17 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Kyle Hensel.