From c199c427d4ae586339822320f20f512a7a19dc3f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Oct 2018 14:35:31 +0200 Subject: Better typings --- client/src/assets/player/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/src/assets/player/utils.ts') diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 46081c0d2..c87287482 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts @@ -12,7 +12,7 @@ const dictionaryBytes: Array<{max: number, type: string}> = [ { max: 1073741824, type: 'MB' }, { max: 1.0995116e12, type: 'GB' } ] -function bytes (value: any) { +function bytes (value: number) { const format = dictionaryBytes.find(d => value < d.max) || dictionaryBytes[dictionaryBytes.length - 1] const calc = Math.floor(value / (format.max / 1024)).toString() -- cgit v1.2.3