Course contentsShow
← TypeScript
Lesson 1764 of 1,79640. The Future of TypeScriptFree lesson

Numeric Separators and BigInt Evolution

Already-adopted proposals like numeric separators and ongoing BigInt improvements in both languages.

Numeric Separators and BigInt Evolution

What you'll learn: How already-adopted JavaScript proposals like numeric separators improve readability and how BigInt continues to evolve in both JavaScript and TypeScript.

Numeric Separators: Making Numbers Readable

JavaScript and TypeScript now support numeric separators — underscores within numeric literals that help you visually group digits without changing the value. This is pure syntax sugar for readability.

// Without separators - hard to parse at a glance
const budget = 1000000000;
const bytes = 0b11010101;
const hex = 0xDEADBEEF;

// With separators - immediately clear
const readableBudget = 1_000_000_000; // One billion
const readableBytes = 0b1101_0101;    // Grouped by nibble
const readableHex = 0xDEAD_BEEF;      // Visually chunked

// Works with BigInt too
const largeValue = 9_007_199_254_740_992n;

// Separators are purely cosmetic
console.log(1_000 === 1000); // true

The separators are stripped during compilation — they exist only to help humans read code. You can place them anywhere that makes sense for your context (thousands, bit groups, etc.).

BigInt Evolution: Growing Capabilities

BigInt was introduced to handle integers beyond JavaScript's Number.MAX_SAFE_INTEGER. While the core type is stable, both languages continue refining its capabilities:

  • Better library support: More built-in methods accepting BigInts
  • Improved type inference: TypeScript gets better at tracking bigint vs number distinctions
  • Performance optimizations: Engine-level improvements for BigInt operations
  • Future proposals: BigInt.asIntN(), BigDecimal discussions at TC39

TypeScript tracks these improvements, ensuring BigInt operations remain type-safe as the ecosystem matures.

Key Takeaway: Numeric separators are a simple but powerful readability win already in TypeScript, while BigInt continues to mature with better tooling, performance, and potential future extensions at the TC39 level.