From 316a78888c387c61a291cc587d52f6c44fb328d4 Mon Sep 17 00:00:00 2001 From: Julian Kobrynski Date: Wed, 23 Aug 2023 11:45:11 +0200 Subject: [PATCH] convert roundToNearestMultipleOfFour to TypeScript --- ...restMultipleOfFour.js => roundToNearestMultipleOfFour.ts} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename src/styles/{roundToNearestMultipleOfFour.js => roundToNearestMultipleOfFour.ts} (79%) diff --git a/src/styles/roundToNearestMultipleOfFour.js b/src/styles/roundToNearestMultipleOfFour.ts similarity index 79% rename from src/styles/roundToNearestMultipleOfFour.js rename to src/styles/roundToNearestMultipleOfFour.ts index a00f799e9d35..e2825feb6e1e 100644 --- a/src/styles/roundToNearestMultipleOfFour.js +++ b/src/styles/roundToNearestMultipleOfFour.ts @@ -3,10 +3,9 @@ * In an effort to maintain that consistency, we'll make sure that any distance we're shifting the components * are a multiple of 4. * - * @param {Number} n - * @returns {Number} + * Round number to the nearest multiple of 4 */ -function roundToNearestMultipleOfFour(n) { +function roundToNearestMultipleOfFour(n: number): number { if (n > 0) { return Math.ceil(n / 4.0) * 4; }