export type ProgressCallback = ( progress : number ) => void ; export const handleProgressEvent = ( progressCallback ? ) => { return ( progressCallback && ( ( progressEvent ) => { progressCallback ( progressEvent . loaded / progressEvent . total ) ; } ) ) ; } ;