From 7273dc73a4088ecce77dd209635b0b4c84a7c041 Mon Sep 17 00:00:00 2001 From: Alexander Shabunevich Date: Thu, 11 Apr 2024 21:22:42 +0300 Subject: [PATCH] feat: console warning on non-supported input type --- src/mask-input.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mask-input.ts b/src/mask-input.ts index f5c6e6b..21c25ad 100644 --- a/src/mask-input.ts +++ b/src/mask-input.ts @@ -53,10 +53,15 @@ export class MaskInput { }) } - this.items.set(input, new Mask(parseInput(input, defaults))) + const mask = new Mask(parseInput(input, defaults)) + this.items.set(input, mask) if (update) { this.updateValue(input) + + if (input.selectionStart === null && mask.isEager()) { + console.warn('Maska: input of `%s` type is not supported', input.type) + } } } }