shopperman
Version:
shopping cart ui for shopify stores
24 lines (23 loc) • 832 B
TypeScript
import { CurrencyControlOptions } from "./stores-interfaces";
/**
* Facility for exchanging and displaying monetary values
* - observable user display currency can be changed
*/
export declare class CurrencyControl {
/** Currency in which to display monetary values */
userDisplayCurrency: string;
private readonly locale;
private readonly precision;
private readonly storeBaseCurrency;
private readonly exchangeRates;
constructor(options: CurrencyControlOptions);
/**
* Switch the current currency being displayed to the user
*/
setUserDisplayCurrency(currency: string): void;
/**
* Perform currency conversion and format into a nice price tag
* - optionally provide a precision override
*/
convertAndFormat(value: any, precisionOverride?: number): string;
}