Comments (8)
I have the same problem in Ver1.0.9.
I solved it by defining Type in index.d.ts
.
See below.
declare module "use-file-upload" {
type FileUpload = {
source: URL;
name: string;
size: number;
file: File;
}
type Callback = (file: FileUpload | [FileUpload]) => void;
const useFileUpload: () => [
file<FileUpload | [FileUpload]>,
selectFiles<({ accept: string, multiple: boolean }, callback: Callback) => void>,
]
}
Type definition issues in newer versions of React...?
Thnaks.
from use-file-upload.
Any update on this?
from use-file-upload.
create a PR to fix this: #4
from use-file-upload.
@nvrsantos Can you please provide more context, I couldn't reproduce your error.
from use-file-upload.
I dont undestand why that happen, but I install the version 1.0.8 and created an custom declare file, and it has been temporarily fixed.
from use-file-upload.
@nvrsantos I will look into this and try to make a fix but I would need more info about your code setup to be able to reproduce the error. Thanks.
from use-file-upload.
What kind of information do u need?
from use-file-upload.
Great job!
from use-file-upload.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from use-file-upload.