You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its not super detrimental and is easy to get around, but just thought I'd point it out. The fileRenameFunction is incorrectly typed as per the latest release of FilePond and FilePond Rename plugin.
What it probably should be fileRenameFunction?: | undefined | null | ((options: { basename: string; extension: string; name: string; }) => string | Promise<string>);
Reproduction
I don't think its worth creating a sandbox. Steps to reproduce are:
Download latest filepond-plugin-file-rename and filepond
Make sure you're using typescript in your project
Try to set the fileRenameFunction on the filepond options (this is the example in the docs): FilePond.setOptions({ fileRenameFunction: (file) => new Promise((resolve) => { resolve(window.prompt('Enter new filename', file.name)); }), });
Voila it doesn't work with typescript
Environment
Typescript
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Have you updated FilePond and its plugins?
Describe the bug
Its not super detrimental and is easy to get around, but just thought I'd point it out. The fileRenameFunction is incorrectly typed as per the latest release of FilePond and FilePond Rename plugin.
Current
fileRenameFunction?: | undefined | null | ((options: { basename: string; extension: string; name: string; }) => string) | Promise<string>
What it probably should be
fileRenameFunction?: | undefined | null | ((options: { basename: string; extension: string; name: string; }) => string | Promise<string>);
Reproduction
I don't think its worth creating a sandbox. Steps to reproduce are:
FilePond.setOptions({ fileRenameFunction: (file) => new Promise((resolve) => { resolve(window.prompt('Enter new filename', file.name)); }), });
Environment
The text was updated successfully, but these errors were encountered: