How to create a typescript enum from an array?

I have a list of currencies supported

export const CURRENCIES = ['EUR', 'CHF', 'GBP', 'USD', 'DKK'];

This is defined in a npm library.

I have a TS project where I am using currency code for a currency related component. This is the current implementation.

export Interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>{
currency?: 'USD' | 'EUR' | 'GBP'; // current implementation
}

const CurrencyInput = ({ currency = 'EUR'}:InputProps) => {
....
}

However, with the current implementation, the currency prop is restricted only to ‘USD’, ‘EUR’, and ‘GBP’. I want to make the currency prop dynamic, so it can accept any currency code from the CURRENCIES array. I prefer to keep the supported currencies in the npm library, so that if I have to update the supported currency in future, i only need to update in one place because this currency constant is being used in multiple places.