diff --git a/framework/core/js/src/common/utils/formatNumber.js b/framework/core/js/src/common/utils/formatNumber.ts similarity index 70% rename from framework/core/js/src/common/utils/formatNumber.js rename to framework/core/js/src/common/utils/formatNumber.ts index 939391029..436a8131c 100644 --- a/framework/core/js/src/common/utils/formatNumber.js +++ b/framework/core/js/src/common/utils/formatNumber.ts @@ -5,10 +5,7 @@ * @example * formatNumber(1234); * // 1,234 - * - * @param {Number} number - * @return {String} */ -export default function formatNumber(number) { +export default function formatNumber(number: number): string { return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); }