LucianoGanga / country-codes-list

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

feat: exports CountryProperty enum & update customArray signature #31

Closed Frank-vdm closed 1 year ago

Frank-vdm commented 1 year ago

the export of the CountryProperty enum is a quality of life improvements that allows developers to use that to denote types and improve type-safety when using this library

also included as a more flexible suggestion for the signature for `customArray' this has been tested against the current released package and works as expected

dzikoysk commented 1 year ago

@Frank-vdm I wonder, did you not export this enum as const intentionally? I'm asking, because I'm not sure what's the valid usage of this api in TypeScript:

Frank-vdm commented 1 year ago

@dzikoysk honestly it was not something i took into account, in my particular use-case i did not need it, i was infact happier using the enum as is, but i do see value in exporting it as a const, so if its something you feel strongly about make a PR