Skip to content
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

Fix typescript types #138

Open
HironTez opened this issue Apr 24, 2024 · 2 comments
Open

Fix typescript types #138

HironTez opened this issue Apr 24, 2024 · 2 comments

Comments

@HironTez
Copy link

The only thing that stops me from using this library is the bad typescript types

@KarimMokhtar
Copy link
Owner

Thanks for your feedback.
You are welcome by opening a PR to fix it.

@iGoodie
Copy link

iGoodie commented May 3, 2024

Hey! 👋🏼
A totally temporary solution, until it is fixed:

import { FileUploader } from "react-drag-drop-files";
import type FileUploaderSrc from "react-drag-drop-files/dist/src/FileUploader";

const FileUploaderTyped: typeof FileUploaderSrc = FileUploader;

// Props are now properly typed
<FileUploaderTyped />

Seems like the .d.ts file is being built with wrong contents. Hope it gets fixed soon 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants