mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 19:14:32 +02:00
update @types/numeral and fix type errors
This commit is contained in:
@@ -223,19 +223,21 @@ class NumeralFormatter {
|
||||
const parsed = parseFloat(s);
|
||||
const selfParsed = this.parseCustomLargeNumber(s);
|
||||
// Check for one or more NaN values
|
||||
if (isNaN(parsed) && numeralValue === null && isNaN(selfParsed)) {
|
||||
// 3x NaN
|
||||
return NaN;
|
||||
} else if (isNaN(parsed) && isNaN(selfParsed)) {
|
||||
if (isNaN(parsed) && isNaN(selfParsed)) {
|
||||
if (numeralValue === null) {
|
||||
// 3x NaN
|
||||
return NaN;
|
||||
}
|
||||
// 2x NaN
|
||||
return numeralValue;
|
||||
} else if (numeralValue === null && isNaN(selfParsed)) {
|
||||
// 2x NaN
|
||||
return parsed;
|
||||
} else if (isNaN(parsed) && numeralValue === null) {
|
||||
// 2x NaN
|
||||
return selfParsed;
|
||||
} else if (isNaN(parsed)) {
|
||||
if (numeralValue === null) {
|
||||
// 2x NaN
|
||||
return selfParsed;
|
||||
}
|
||||
// 1x NaN
|
||||
return this.largestAbsoluteNumber(numeralValue, selfParsed);
|
||||
} else if (numeralValue === null) {
|
||||
|
||||
Reference in New Issue
Block a user