Tuesday, July 21, 2026

Freerange

★578

Static number-range checks so layout math fails at compile time.

Freerange

Why it matters

TypeScript still treats layout math as plain numbers, so divide-by-zero and broken grid sizes only show up in the browser. Freerange from Cheng Lou tracks numeric ranges through ordinary TypeScript, turns console.assert into compile-time contracts, and flags impossible UI sizes without running the app. That is useful for agents writing layout code: they can prove spacing and grid math before a screenshot loop.

typescriptstatic-analysisui
Source ↗

Via github

X