I have a JavaScript function like this:
const FETCH_DATA = {
readAsArrayBuffer(axios, url, signal, { onDownloadProgress } = {}) {
console.log('ReaderFactory - FETCH_DATA - readAsArrayBuffer: Running');
return axios
.get(url, {
responseType: 'arraybuffer',
signal,
onDownloadProgress,
})
.then(({ data }) => data);
},
};
When I convert the file to TS I get the error:
TS2525: Initializer provides no value for this binding element and the binding element has no default value.
This is being thrown by onDownloadProgress but I am unsure how to resolve this. Can anyone assist? TIA!