1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix type error

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-06-08 11:56:58 -04:00
parent 50ce74a9d0
commit c27005a18b

View File

@ -22,7 +22,7 @@ const unitRegex = /(?<value>[0-9]+(\.[0-9]*)?)(?<suffix>(B|[KMGTP]iB?))?/;
type BinaryUnit = typeof magnitudes extends Map<infer Key, any> ? Key : never;
export function unitsToBytes(value: string): number | bigint {
export function unitsToBytes(value: string): number {
const unitsMatch = value.match(unitRegex);
if (!unitsMatch?.groups) {