Skip to content

Commit da848f7

Browse files
committed
better types
1 parent 2a8af41 commit da848f7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

dist/currency.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class Currency {
9292
* @param {Object} [opts={}] - Masking options.
9393
* @param {number} [opts.digits=2] - The number of digits after the decimal point.
9494
* @param {boolean} [opts.empty=false] - Allow empty value.
95-
* @param {string} [opts.locales='pt-BR'] - The locales to use for formatting.
96-
* @param {Object} [opts.options] - Additional options for formatting.
95+
* @param {Intl.LocalesArgument} [opts.locales='pt-BR'] - The locales to use for formatting.
96+
* @param {Intl.NumberFormatOptions} [opts.options] - Additional options for formatting.
9797
* @param {boolean} [opts.viaInput=false] - Specify if the value is coming directly from an input.
9898
* @returns {string} The masked value.
9999
*/

src/currency.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class Currency {
9292
* @param {Object} [opts={}] - Masking options.
9393
* @param {number} [opts.digits=2] - The number of digits after the decimal point.
9494
* @param {boolean} [opts.empty=false] - Allow empty value.
95-
* @param {string} [opts.locales='pt-BR'] - The locales to use for formatting.
96-
* @param {Object} [opts.options] - Additional options for formatting.
95+
* @param {Intl.LocalesArgument} [opts.locales='pt-BR'] - The locales to use for formatting.
96+
* @param {Intl.NumberFormatOptions} [opts.options] - Additional options for formatting.
9797
* @param {boolean} [opts.viaInput=false] - Specify if the value is coming directly from an input.
9898
* @returns {string} The masked value.
9999
*/

types/currency.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ declare class Currency {
3535
* @param {Object} [opts={}] - Masking options.
3636
* @param {number} [opts.digits=2] - The number of digits after the decimal point.
3737
* @param {boolean} [opts.empty=false] - Allow empty value.
38-
* @param {string} [opts.locales='pt-BR'] - The locales to use for formatting.
39-
* @param {Object} [opts.options] - Additional options for formatting.
38+
* @param {Intl.LocalesArgument} [opts.locales='pt-BR'] - The locales to use for formatting.
39+
* @param {Intl.NumberFormatOptions} [opts.options] - Additional options for formatting.
4040
* @param {boolean} [opts.viaInput=false] - Specify if the value is coming directly from an input.
4141
* @returns {string} The masked value.
4242
*/
4343
static masking(v: string | number, opts?: {
4444
digits?: number;
4545
empty?: boolean;
46-
locales?: string;
47-
options?: any;
46+
locales?: Intl.LocalesArgument;
47+
options?: Intl.NumberFormatOptions;
4848
viaInput?: boolean;
4949
}): string;
5050
/**

0 commit comments

Comments
 (0)