##// END OF EJS Templates
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods

File last commit:

r2:8ec37bf1b4d1 default
r30:a46488b209e8 v1.0.0-rc14 default
Show More
currency.d.ts
76 lines | 2.5 KiB | video/mp2t | TypeScriptLexer
import { NumberFormatOptions, NumberParseOptions, NumberRegexpOptions } from "./number";
export interface CurrencyFormatOptions extends NumberFormatOptions {
/**
* Should not be set. Value is assumed to be "currency".
*/
type?: string;
/**
* localized currency symbol. The default will be looked up in table of supported currencies in `dojo.cldr`
* A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found.
*/
symbol?: string;
/**
* an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD".
* For use with dojo.currency only.
*/
currency?: string;
/**
* number of decimal places to show. Default is defined based on which currency is used.
*/
places?: number;
}
export interface CurrencyParseOptions extends NumberParseOptions {
/**
* Should not be set. Value is assumed to be "currency".
*/
type?: string;
/**
* localized currency symbol. The default will be looked up in table of supported currencies in `dojo.cldr`
* A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found.
*/
symbol?: string;
/**
* an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD".
* For use with dojo.currency only.
*/
currency?: string;
/**
* number of decimal places to show. Default is defined based on which currency is used.
*/
places?: number;
/**
* Whether to include the fractional portion, where the number of decimal places are implied by the currency
* or explicit 'places' parameter. The value [true,false] makes the fractional portion optional.
* By default for currencies, it the fractional portion is optional.
*/
factional?: boolean | [boolean, boolean];
}
export declare function _mixInDefaults(options: NumberFormatOptions): CurrencyFormatOptions;
/**
* Format a Number as a currency, using locale-specific settings
*/
export declare function format(value: number, options?: CurrencyFormatOptions): string;
/**
* Builds the regular needed to parse a currency value
*/
export declare function regexp(options?: NumberRegexpOptions): string;
/**
* Convert a properly formatted currency string to a primitive Number,
* using locale-specific settings.
*/
export declare function parse(expression: string, options?: CurrencyParseOptions): number;