country-codes-list icon indicating copy to clipboard operation
country-codes-list copied to clipboard

fix: enum CountryProperties is not defined at runtime in TypeScript

Open alexdeleon opened this issue 1 year ago • 1 comments

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 avatar Nov 29 '23 16:11 alexdeleon

A better solution is: #41

alexdeleon avatar Nov 29 '23 20:11 alexdeleon