-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
934754e
commit 8523326
Showing
2 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
interface ISimpleMaskMoneyArgs { | ||
afterFormat: (e: string) => {}; | ||
allowNegative: boolean = false; | ||
beforeFormat: (e: string) => {}; | ||
negativeSignAfter: boolean = false; | ||
decimalSeparator: string = ','; | ||
fixed: boolean = true; | ||
fractionDigits: number = 2; | ||
afterFormat: (e: string) => {}; | ||
allowNegative: boolean; | ||
beforeFormat: (e: string) => {}; | ||
negativeSignAfter: boolean; | ||
decimalSeparator: string; | ||
fixed: boolean; | ||
fractionDigits: number; | ||
prefix: string; | ||
suffix: string; | ||
thousandsSeparator: string = '.'; | ||
thousandsSeparator: string; | ||
cursor: 'start' | 'move' | 'end'; | ||
} | ||
|
||
interface ISimpleMaskMoney { | ||
public static args: ISimpleMaskMoneyArgs; | ||
public static formatToCurrency(value: number, args?: ISimpleMaskMoneyArgs): string; | ||
public static formatToMask(value: number, args?: ISimpleMaskMoneyArgs): string; | ||
public static formatToNumber(value: string, args?: ISimpleMaskMoneyArgs): number; | ||
public static setMask(element: string | HTMLInputElement, args?: ISimpleMaskMoneyArgs): HTMLInputElement; | ||
declare class SimpleMaskMoney { | ||
static args: ISimpleMaskMoneyArgs; | ||
static formatToCurrency(value: number | string, args?: ISimpleMaskMoneyArgs): string; | ||
static formatToMask(value: number | string, args?: ISimpleMaskMoneyArgs): string; | ||
static formatToNumber(value: string, args?: ISimpleMaskMoneyArgs): number; | ||
static setMask(element: string | HTMLInputElement, args?: ISimpleMaskMoneyArgs): HTMLInputElement; | ||
} | ||
|
||
declare module 'simple-mask-money' { | ||
export = ISimpleMaskMoney; | ||
export = SimpleMaskMoney; | ||
} | ||
|