-
Notifications
You must be signed in to change notification settings - Fork 48
Typescript support #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I currently don't have enough bandwidth on doing same. PRs are welcome. You can put a reference of any other third party component which provides support. Will help someone to add support. |
The correct Svelte way is to use SvelteKit Packaging for the whole library. If you use also Can do it by myself and push this PR, just want your approval before because it changes the repository structure completely. |
@Tal500 feel free to look into that. |
So typescript support is something that's already there. If your host TypeScript project uses TypeScript, it was already infering the attributes and types for almost all of the props in the dropzone component. That said, I've enabled ts in there, and added a typing for the one prop that wasn't inferrable (as far as I can tell) which is accept. 2.0.5 should have this, and I confirmed that accept now shows up as string | string[] | undefined as opposed to any? like it was before. |
I can't find how to type the function:
in |
Thanks for the great library port! Would be really helpful to add types for typescript users as well, I imagine they could be ported pretty much straight from the
react-dropzone
typings here: https://github.com/react-dropzone/react-dropzone/blob/master/typings/react-dropzone.d.tsThe text was updated successfully, but these errors were encountered: