From 7fc1297c3eaa2eabbb949ed6abe634225c79bff2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 09:27:21 +0200 Subject: [PATCH] [Glitch] Bump eslint-plugin-jsdoc from 44.2.5 to 45.0.0 Port 89d6341c80f5b6cb88ef7efd90622891200249f3 to glitch-soc Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Renaud Chaput Signed-off-by: Claire --- app/javascript/flavours/glitch/utils/numbers.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/glitch/utils/numbers.ts b/app/javascript/flavours/glitch/utils/numbers.ts index 2bd88406e0..7dd8edff54 100644 --- a/app/javascript/flavours/glitch/utils/numbers.ts +++ b/app/javascript/flavours/glitch/utils/numbers.ts @@ -14,14 +14,15 @@ export type DecimalUnits = ValueOf; const TEN_THOUSAND = DECIMAL_UNITS.THOUSAND * 10; const TEN_MILLIONS = DECIMAL_UNITS.MILLION * 10; +export type ShortNumber = [number, DecimalUnits, 0 | 1]; // Array of: shorten number, unit of shorten number and maximum fraction digits + /** - * @param {number} sourceNumber Number to convert to short number - * @returns {ShortNumber} Calculated short number + * @param sourceNumber Number to convert to short number + * @returns Calculated short number * @example * shortNumber(5936); * // => [5.936, 1000, 1] */ -export type ShortNumber = [number, DecimalUnits, 0 | 1]; // Array of: shorten number, unit of shorten number and maximum fraction digits export function toShortNumber(sourceNumber: number): ShortNumber { if (sourceNumber < DECIMAL_UNITS.THOUSAND) { return [sourceNumber, DECIMAL_UNITS.ONE, 0]; @@ -45,9 +46,9 @@ export function toShortNumber(sourceNumber: number): ShortNumber { } /** - * @param {number} sourceNumber Original number that is shortened - * @param {number} division The scale in which short number is displayed - * @returns {number} Number that can be used for plurals when short form used + * @param sourceNumber Original number that is shortened + * @param division The scale in which short number is displayed + * @returns Number that can be used for plurals when short form used * @example * pluralReady(1793, DECIMAL_UNITS.THOUSAND) * // => 1790