[@types/country-data] Add missing keys to countries export (#36601)

This commit is contained in:
Sergey 2019-07-03 18:45:59 +03:00 committed by Ryan Cavanaugh
parent e64d87db66
commit ba8c999252
2 changed files with 7 additions and 3 deletions

View File

@ -5,10 +5,11 @@ lib.callingCountries.all; // $ExpectType ReadonlyArray<Country>
lib.continents.africa; // $ExpectType Continent
lib.continents.africa.countries; // $ExpectType ReadonlyArray<Country>
lib.countries.all; // $ExpectType ReadonlyArray<Country>
lib.countries.BY; // $ExpectType Country
lib.currencies.all; // $ExpectType ReadonlyArray<Currency>
lib.languages.all; // $ExpectType ReadonlyArray<Language>
lib.regions.antarctica; // $ExpectType Region
lib.regions.antarctica.countries; // $ExpectType ReadonlyArray<string>
lib.lookup.countries(""); // $ExpectType ReadonlyArray<Country>
lib.lookup.currencies(""); // $ExpectType ReadonlyArray<Currency>
lib.lookup.languages(""); // $ExpectType ReadonlyArray<Language>
lib.lookup.countries(''); // $ExpectType ReadonlyArray<Country>
lib.lookup.currencies(''); // $ExpectType ReadonlyArray<Currency>
lib.lookup.languages(''); // $ExpectType ReadonlyArray<Language>

View File

@ -2,6 +2,7 @@
// Project: https://github.com/OpenBookPrices/country-data
// Definitions by: Logan Dam <https://github.com/biltongza>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
export interface Country {
readonly alpha2: string;
@ -41,6 +42,8 @@ export interface Region {
}
export const countries: {
readonly [key: string]: Country;
} & {
readonly all: ReadonlyArray<Country>;
};