Home Manual Reference Source

src/easycurrency/resolver.js

/**
 * Provides information about available currencies.
 */
class CurrencyResolver {
    async listCurrencyCodes() {
        throw Error('CurrencyResolver should implement listCurrencyCodes');
    }

    async getConversionRate(from, to) {
        throw Error('CurrencyResolver should implement getConversionRate');
    }

    async format(value, currency) {
        throw Error('CurrencyResolver should implement format');
    }
}

/** @ignore */
export default new CurrencyResolver;