Bug Report
The linter that looks for large (>2^53) literals is not taking the numeric separators into account, resulting in it firing for very large numbers that are still in range (because of the added characters in the literal as a string).
e.g. For 18! (factorial) which is <2^53 (https://www.wolframalpha.com/input/?i=2%5E53-1+%3E+18%21).
🔎 Search Terms
ts80008, numeric separator, numeric literals
🕗 Version & Regression Information
Started in 3.7.5.
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about Type System Behavior
⏯ Playground Link
Playground link with relevant code
💻 Code
const OK_FACT_18 = 6402373705728000;
const FLAGGED_FACT_18 = 6_402_373_705_728_000;
console.log(OK_FACT_18 === FLAGGED_FACT_18); // true
🙁 Actual behavior
Lint flagged the literal 6_402_373_705_728_000 with ts(80008).
🙂 Expected behavior
It shouldn't be flagged.
Bug Report
The linter that looks for large (>2^53) literals is not taking the numeric separators into account, resulting in it firing for very large numbers that are still in range (because of the added characters in the literal as a string).
e.g. For 18! (factorial) which is <2^53 (https://www.wolframalpha.com/input/?i=2%5E53-1+%3E+18%21).
🔎 Search Terms
ts80008, numeric separator, numeric literals
🕗 Version & Regression Information
Started in 3.7.5.
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Lint flagged the literal
6_402_373_705_728_000with ts(80008).🙂 Expected behavior
It shouldn't be flagged.