@mixxtor/currencyx-adonisjs
Version:
AdonisJS integration for CurrencyX.js with database exchange provider and cache support
20 lines (19 loc) • 685 B
TypeScript
import CurrencyService from '@mixxtor/currencyx-js';
import type { CurrencyExchanges } from '../src/types.js';
/**
* Currency service with full type inference
*
* Usage:
* ```ts
* import currency from '@mixxtor/currencyx-adonisjs/services/currency'
*
* // Direct usage - no type casting needed
* const rates = await currency.latestRates()
*
* // Provider switching with type inference
* const googleProvider = currency.use('google') // Only configured providers
* const rates = await googleProvider.latestRates()
* ```
*/
declare let currency: CurrencyService<Record<keyof CurrencyExchanges, CurrencyExchanges[keyof CurrencyExchanges]>>;
export { currency as default };