LucianoGanga / country-codes-list

List of codes per country (languages, calling codes, currency codes, etc)
MIT License
94 stars 48 forks source link

fix: enum CountryProperties is not defined at runtime in TypeScript #40

Open alexdeleon opened 9 months ago

alexdeleon commented 9 months ago

Fixes #36 . Now you can write the following TypeScript code without runtime error:

import countries, { CountryProperty } from "country-codes-list";

function findCountry(code: string) {
 return countries.findOne(CountryProperty.countryCode, code);
}
alexdeleon commented 9 months ago

A better solution is: #41