jessealama

jessealama / thales

Public

TypeScript compiler and JavaScript engine in Lean

16
0
100% credibility
Found Apr 30, 2026 at 16 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Lean
AI Summary

Thales is a tool that strictly type-checks a safe subset of TypeScript code and generates equivalent Lean 4 code for formal verification and reasoning.

How It Works

1
🔍 Discover Thales

You learn about Thales, a helpful tool that takes your everyday TypeScript code and creates a matching version ready for mathematical proofs to ensure it's super safe.

2
📥 Get Thales ready

You download Thales and set it up on your computer so it's all prepared to work with your code.

3
✏️ Prepare your code

You write or open a simple TypeScript file with functions, types, and maybe notes about what might go wrong or what's guaranteed.

4
🚀 Run Thales on your file

You give your code to Thales, and it carefully checks everything while creating a proof companion file right next to it—your editor and checks still work perfectly.

5
📖 Explore the proof file

You open the new companion file Thales made, which mirrors your code but in a form perfect for proving things like 'this always works' or 'no surprises here'.

6
Verify and trust your code

You use proof tools on the companion to confirm your code behaves exactly as expected, giving you total confidence.

🎉 Code with proofs!

Now your TypeScript is not just typed—it's mathematically proven safe, and you can build with peace of mind.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 16 to 16 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is thales?

Thales is a TypeScript compiler built in Lean that type-checks a strict, safe subset of TypeScript and emits equivalent Lean 4 code as a sidecar file. Drop it on your `foo.ts` via CLI (`thales foo.ts`), and you get `Foo.lean` for formal proofs while keeping full TypeScript tooling like editors and CI intact. It solves the gap between TypeScript's dynamic safety and Lean's theorem-proving rigor by restricting mutations, classes, and async, but enriching nullables as `Option` and exceptions via `@throws`.

Why is it gaining traction?

Unlike TypeScript compiler go or golang ports on GitHub, Thales leverages Lean's verifier for termination (`@total`) and typed errors without rewriting code. Developers hook into typescript compiler api flows seamlessly, matching `tsc --strict` diagnostics while adding unverifiable guarantees like no-escape throws. It's a lightweight bridge for JS devs eyeing formal methods, standing out from thales hsm github or thales cert github tools by targeting typescript compiler language verification.

Who should use this?

TypeScript backend engineers verifying crypto, finance logic, or APIs where bugs cost real money. Lean theorem provers porting JS prototypes to proofs. Researchers benchmarking typescript compiler online against tsc, skipping thales deutschland jobs or thales group distractions for pure thales von milet-inspired math.

Verdict

Grab it if you're prototyping verified TS—install via lake, solid docs and conformance tests cover basics. At 16 stars and 1.0% credibility, it's early alpha: great for experiments, skip for prod until v1 adds classes and mutation.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.