Skip to content

Commit cd0b2cb

Browse files
committed
Minor: replace a ts-ignore with a cast
1 parent e3c06c9 commit cd0b2cb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

humanize-duration.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,8 +1682,12 @@
16821682
if (character === ".") {
16831683
formattedCount += decimal;
16841684
} else {
1685-
// @ts-ignore because `character` should always be 0-9 at this point.
1686-
formattedCount += digitReplacements[character];
1685+
formattedCount +=
1686+
digitReplacements[
1687+
/** @type {"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"} */ (
1688+
character
1689+
)
1690+
];
16871691
}
16881692
}
16891693
} else {

0 commit comments

Comments
 (0)