Open silvioprog opened 3 years ago
In global.d.ts
add
declare namespace svelte.JSX {
interface SvelteInputProps<T> {
oncomplete: ({ detail: any }) => void;
onaccept: ({ detail: any }) => void;
}
}
@silvioprog Hi! Thanks for your comment. Yea, now you can use TS in your projects on Svelte/Sapper/SvelteKit, but as you already know, not all packages define their typings. And, unfortunately, this package doesn't provide support for TS.
I believe you need to try an official package for iMask
from its author. It works almost the same way as this one and is mainly based on it, but maintained by iMask
contributors.
Please, check it out: https://github.com/uNmAnNeR/imaskjs/tree/master/packages/svelte-imask
Hi.
After installing
svelte-imask
, I have been trying to use it as following (plus official TypeScript support):it works, but it emits the following warning at run time:
To temporary solve the problem, I just changed the line 21 from
export let value;
toexport let value = '';
, but a official TypeScript could be very welcome. 🙂Thank you!