Description
Is there an existing issue for this?
- I have searched the existing issues
Have you updated FilePond and its plugins?
- I have updated FilePond and its plugins
Describe the bug
I found this error on typescript
"version": "4.30.4",
my code
const pond = FilePond.create(element, {
required: false,
maxFiles: 1,
name: 'filepond',
allowFileTypeValidation: true,
acceptedFileTypes: ['video/mp4'],
labelFileTypeNotAllowed: 'Tipo de archivo no válido',
minFileSize: "1KB",
maxFileSize: "50MB",
labelMaxFileSizeExceeded: "Video demasiado grande",
credits: false,
chunkUploads: true,
server: {
headers: {
"X-CSRFToken": csr_token_input ? csr_token_input.value : ""
},
url: window.location.origin + '/fp',
process: {
url: '/process/',
method: 'POST',
withCredentials: false,
},
revert: '/revert/',
patch: '/patch/'
}
}
Type '{ headers: { "X-CSRFToken": string; }; url: string; process: { url: string; method: "POST"; withCredentials: false; }; revert: string; patch: string; }' is not assignable to type 'string | { url?: string | undefined; timeout?: number | undefined; headers?: { [key: string]: string | number | boolean; } | undefined; process?: string | ServerUrl | ProcessServerConfigFunction | null | undefined; ... 4 more ...; remove?: RemoveServerConfigFunction | ... 1 more ... | undefined; } | null | undefined'.
Object literal may only specify known properties, and 'patch' does not exist in type '{ url?: string | undefined; timeout?: number | undefined; headers?: { [key: string]: string | number | boolean; } | undefined; process?: string | ServerUrl | ProcessServerConfigFunction | null | undefined; ... 4 more ...; remove?: RemoveServerConfigFunction | ... 1 more ... | undefined; }'.ts(2322)
It work but patch is red :(
Reproduction
just add patch in server configuration and work with typescript
const pond = FilePond.create(element, {
required: false,
maxFiles: 1,
name: 'filepond',
allowFileTypeValidation: true,
acceptedFileTypes: ['video/mp4'],
labelFileTypeNotAllowed: 'Tipo de archivo no válido',
minFileSize: "1KB",
maxFileSize: "50MB",
labelMaxFileSizeExceeded: "Video demasiado grande",
credits: false,
chunkUploads: true,
server: {
headers: {
"X-CSRFToken": csr_token_input ? csr_token_input.value : ""
},
url: window.location.origin + '/fp',
process: {
url: '/process/',
method: 'POST',
withCredentials: false,
},
revert: '/revert/',
patch: '/patch/'
}
}
Environment
- Device: PC
- OS: Linux
- Browser: Brave