diff --git a/types/cleave.js/options/creditCard.d.ts b/types/cleave.js/options/creditCard.d.ts new file mode 100644 index 0000000000..b7f55ff5b0 --- /dev/null +++ b/types/cleave.js/options/creditCard.d.ts @@ -0,0 +1,19 @@ +import Cleave = require("../"); + +// Credit Card Options +export type CreditCardType = + | "amex" + | "dankort" + | "diners" + | "discover" + | "instapayment" + | "jcb" + | "maestro" + | "mastercard" + | "uatp" + | "unknown" + | "unionPay" + | "mir" + | "visa"; + +export type CreditCardTypeChangeHandler = (this: Cleave, type: CreditCardType) => void; diff --git a/types/cleave.js/options.d.ts b/types/cleave.js/options/index.d.ts similarity index 76% rename from types/cleave.js/options.d.ts rename to types/cleave.js/options/index.d.ts index 81757fe097..60e2e99e40 100644 --- a/types/cleave.js/options.d.ts +++ b/types/cleave.js/options/index.d.ts @@ -1,19 +1,4 @@ -// Credit Card Options -export type CreditCardType = - | "amex" - | "dankort" - | "diners" - | "discover" - | "instapayment" - | "jcb" - | "maestro" - | "mastercard" - | "uatp" - | "unknown" - | "unionPay" - | "mir" - | "visa"; -export type CreditCardTypeChangeHandler = (owner: HTMLInputElement, type: CreditCardType) => void; +import { CreditCardTypeChangeHandler } from "./creditCard"; export interface CleaveOptions { creditCard?: boolean; diff --git a/types/cleave.js/tsconfig.json b/types/cleave.js/tsconfig.json index c2d5447360..ec4da5d047 100644 --- a/types/cleave.js/tsconfig.json +++ b/types/cleave.js/tsconfig.json @@ -21,7 +21,8 @@ "files": [ "cleave.js-tests.tsx", "index.d.ts", - "options.d.ts", + "options/creditCard.d.ts", + "options/index.d.ts", "react/index.d.ts" ] } \ No newline at end of file