-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
neglected in #4911: - bytesTotal can be null (also handle that bug in runtime) - progress is not a property on the progress object - use `satisfies` instead of `as` - add todo about broken `throttle` implementation - in emitSocketProgress, progressData should not have the FileProgress type, as it is a completely different type (it comes from companion)
- Loading branch information
Showing
4 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import type { FileProgress } from './FileProgress' | ||
|
||
export default function getBytesRemaining(fileProgress: FileProgress): number { | ||
if (fileProgress.bytesTotal == null) return 0 | ||
return fileProgress.bytesTotal - (fileProgress.bytesUploaded as number) | ||
} |