From 266fa8a2650625132863344be6a9c5bb92313b8f Mon Sep 17 00:00:00 2001 From: Jason Giancono Date: Wed, 8 Nov 2017 11:28:25 +1100 Subject: [PATCH 1/2] updated types for cleave.js 1.0.3 * Added new credit card types unionPay and mir * added "none" NumeralThousandsGroupStyleType * added noImmediatePrefix option --- types/cleave.js/index.d.ts | 4 ++-- types/cleave.js/options.d.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/types/cleave.js/index.d.ts b/types/cleave.js/index.d.ts index 1ec788cd8f..6e9ee3979a 100644 --- a/types/cleave.js/index.d.ts +++ b/types/cleave.js/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for cleave.js 1.0 +// Type definitions for cleave.js 1.0.3 // Project: https://github.com/nosir/cleave.js -// Definitions by: C Lentfort +// Definitions by: C Lentfort , J Giancono // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/cleave.js/options.d.ts b/types/cleave.js/options.d.ts index 4320881649..81757fe097 100644 --- a/types/cleave.js/options.d.ts +++ b/types/cleave.js/options.d.ts @@ -10,6 +10,8 @@ export type CreditCardType = | "mastercard" | "uatp" | "unknown" + | "unionPay" + | "mir" | "visa"; export type CreditCardTypeChangeHandler = (owner: HTMLInputElement, type: CreditCardType) => void; @@ -33,7 +35,7 @@ export interface CleaveOptions { } // Numeral Options -export type NumeralThousandsGroupStyleType = "lakh" | "thousand" | "wan"; +export type NumeralThousandsGroupStyleType = "lakh" | "thousand" | "wan" | "none"; export interface CleaveOptions { numeral?: boolean; @@ -55,6 +57,7 @@ export interface CleaveOptions { lowercase?: boolean; numericOnly?: boolean; prefix?: string; + noImmediatePrefix?: boolean; rawValueTrimPrefix?: boolean; uppercase?: boolean; } From a29d1f5a2a3f05140755914a029070a36d7eb456 Mon Sep 17 00:00:00 2001 From: Jason Giancono Date: Wed, 8 Nov 2017 11:44:43 +1100 Subject: [PATCH 2/2] changed version for cleave.js to MAJOR.MINOR --- types/cleave.js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/cleave.js/index.d.ts b/types/cleave.js/index.d.ts index 6e9ee3979a..17e8c1c512 100644 --- a/types/cleave.js/index.d.ts +++ b/types/cleave.js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for cleave.js 1.0.3 +// Type definitions for cleave.js 1.0 // Project: https://github.com/nosir/cleave.js // Definitions by: C Lentfort , J Giancono // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped