pqina / filepond-plugin-file-encode

πŸ—œ Send FilePond Files Along with Form Submit
https://pqina.nl/filepond/
MIT License
13 stars 12 forks source link

Add support for typescript #14

Closed kino90 closed 4 years ago

kino90 commented 4 years ago

Hello, thanks for this lib and all of its plugins, i like it so much!

I saw some other plugins have Typescript support, but this one doesn't, why? Is this coming sooner or later? Thanks

rikschennink commented 4 years ago

The definition files are added by other devs, happy to accept a PR πŸ‘

kino90 commented 4 years ago

I've already done a definition file locally! It works, but I don't know how to extend File type with the two methods from the plugin πŸ€” Any idea?

I'll submit a PR tomorrow morning!

rikschennink commented 4 years ago

Awesome!

I’m not sure, maybe take a look at how it’s done for the other plugins?

kino90 commented 4 years ago

I saw the size validation plugin (if I remember correctly), but id doesn't add any method to the File istance.. I think this plugin is the only one which does that..

rikschennink commented 4 years ago

The crop plugin also does it πŸ‘

kino90 commented 4 years ago

Just checked that, but sadly also filepond-plugin-image-crop types does not extend File. I'll submit a PR soon πŸ˜‰