Convert formatCustomFormatScore to Typescript

pull/8894/head
Bogdan 1 year ago
parent 8fd8128641
commit 847d6244aa

@ -1,4 +1,7 @@
function formatCustomFormatScore(input, customFormatsLength = 0) {
function formatCustomFormatScore(
input?: number,
customFormatsLength = 0
): string {
const score = Number(input);
if (score > 0) {
@ -6,7 +9,7 @@ function formatCustomFormatScore(input, customFormatsLength = 0) {
}
if (score < 0) {
return score;
return `${score}`;
}
return customFormatsLength > 0 ? '+0' : '';
Loading…
Cancel
Save