fix further type problems

This commit is contained in:
2025-06-10 14:33:40 +02:00
parent e4d74e4331
commit 07247486ab
10 changed files with 15 additions and 63 deletions

View File

@@ -2,12 +2,7 @@ const KILO = 1024;
const MEGA = KILO * KILO;
const GIGA = MEGA * KILO;
/**
* Shortens the size in bytes
* @param {number} size
* @returns{string}
*/
export default function shortenFileSize(size: number) {
export default function shortenFileSize(size: number): string {
const giga = Math.floor(size / GIGA);
let remainder = size % GIGA;
const mega = Math.floor(remainder / MEGA);