mirror of https://github.com/actions/toolkit
Update with reviewer feedback
parent
cc474239c9
commit
c4a92b0b60
|
@ -120,13 +120,13 @@ export class DownloadProgress {
|
|||
}
|
||||
|
||||
/**
|
||||
* Callback used to update the progress.
|
||||
*
|
||||
* @param progress the progress event
|
||||
* Returns a function used to handle TransferProgressEvents.
|
||||
*/
|
||||
onProgressCallback(progress: TransferProgressEvent): void {
|
||||
onProgress(): (progress: TransferProgressEvent) => void {
|
||||
return (progress: TransferProgressEvent) => {
|
||||
this.setReceivedBytes(progress.loadedBytes)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the timer that displays the stats.
|
||||
|
@ -261,9 +261,7 @@ export async function downloadCacheStorageSDK(
|
|||
segmentSize,
|
||||
{
|
||||
concurrency: options.downloadConcurrency,
|
||||
onProgress: downloadProgress.onProgressCallback.bind(
|
||||
downloadProgress
|
||||
)
|
||||
onProgress: downloadProgress.onProgress()
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue