LucianoGanga / country-codes-list

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

Export enum as const #36

Open aleksander-lurie-codete opened 1 year ago

aleksander-lurie-codete commented 1 year ago

There is a interface for customList to provide key, and this key is defined as CustomProperty enum. This enum is defined without const what means is not accessible in runtime. if i want to us customList function and define key as you did in documentation i we got ts error

Zrzut ekranu 2023-07-13 o 16 41 51

I could use correct value like this:

Zrzut ekranu 2023-07-13 o 16 42 04

but const in declaration is required to be able to use it in runtime

dzikoysk commented 1 year ago

For now, the // @ts-ignore above the affected line looks like the only solution to this issue 😢