[numeral] Add type to locales property (#37131)

* Add locales property

* Add member in definitions by
This commit is contained in:
Carlos Quiroga 2019-08-05 19:13:58 +02:00 committed by Nathan Shively-Sanders
parent ba71654205
commit f4343f992b

View File

@ -3,6 +3,7 @@
// Definitions by: Vincent Bortone <https://github.com/vbortone>
// Behind The Math <https://github.com/BehindTheMath>
// Kenneth Luján <https://github.com/klujanrosas>
// Carlos Quiroga <https://github.com/KarlosQ>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@ -24,6 +25,10 @@ interface NumeralJSLocale {
};
}
interface NumeralJSLocales {
[id: string]: NumeralJSLocale
}
interface NumeralJSOptions {
currentLocale: string;
zeroFormat: string;
@ -59,6 +64,11 @@ interface Numeral {
*/
locale(key?: string): string;
/**
* Object with all loaded locales
*/
locales: NumeralJSLocales;
/**
* This function provides access to the loaded locale data. If
* no arguments are passed in, it will simply return the current
@ -85,7 +95,7 @@ interface Numeral {
unformat(inputString: string): number;
value(): number;
valueOf(): number;
set (value: any): Numeral;
set(value: any): Numeral;
add(value: any): Numeral;
subtract(value: any): Numeral;
multiply(value: any): Numeral;