Skip to content

TypeScript retirement: measured — 308 of 613 .ts files were never exempt, and the largest exempt class is upstream forks #663

Description

@hyperpolymath

Owner ruling, 2026-08-27: "no typescript … that should not exist at all", and — asked directly about the carve-outs — "Literally none — retire every exemption."

I measured the estate before acting. The ruling is achievable, but the exemptions are not where the TypeScript is.

Census — 613 .ts/.tsx files (excluding node_modules)

class files can it be retired?
NOT EXEMPT — estate-authored, already policy-violating 308 this is the real target
upstream forks (rescript/, servers/, repos-monorepo/, linguist/) 174 not our code
consumer-facing bindings (bindings/{deno,typescript,ts}/) 71 ⚠️ retiring = dropping TS interop as a product
declaration files (*.d.ts) 39 ⚠️ these are the FFI boundary, not implementation
bootstrap shims (affinescript-deno-test/, affinescript-cli/) 18 ⚠️ they bootstrap the compiler that would replace them
build tooling configs (vite/vitest/tsup.config.ts) 2 ✅ trivial
VS Code extension host 1 ⚠️ @vscode/test-electron has no non-TS equivalent
telegram bot · archived repos · vendored deps/ 0 — (nothing present)

The finding that matters

Half the estate's TypeScript was never exempt at all. 308 files — the largest class by far — are estate-authored .ts sitting outside every carve-out, grandfathered under "existing pre-2026-04-30 .ts/.tsx … while in-flight migration proceeds".

Concentration: developer-ecosystem 92, rescript-ecosystem 87, bulk_update_oikos 51, metadatastician 10, proven 7.

So retiring every exemption would remove at most 305 files and would not touch the 308 that are actually the debt. If the goal is "no TypeScript exists", the exemption table is the wrong lever — porting the 308 is the lever.

Three classes cannot be retired, structurally

  1. Upstream forks — 174 files, the single largest exempt class. This is third-party code we vendor, not author: the ReScript compiler, third-party MCP servers, and GitHub linguist (whose samples/TypeScript/*.ts are machine-learning fixtures — deleting them breaks language detection). Removing TypeScript here means editing someone else's project inside our fork.
  2. Declaration files — 39. *.d.ts files are type headers for FFI boundaries, not implementation. There is no runtime TypeScript in them.
  3. Bootstrap shims — 18. They exist to bootstrap the AffineScript toolchain. Retiring them before AffineScript self-hosts removes the thing that builds the replacement.

I have implemented nothing here. These are reported, not resolved.

Recommended sequencing

  1. Trivial now: the 2 build-tooling configs.
  2. The actual work: port the 308 non-exempt estate-authored files, worst-first (developer-ecosystem, rescript-ecosystem). ⚠ Note hyperpolymath/affinescript's own doctrine — "The Cardinal Rule: Re-decompose. Do not transliterate." — this is per-file human rewriting, and tools/res-to-affine output is explicitly "not compilable … a starting point for the human."
  3. Needs a product decision, not a migration: the 71 consumer bindings. Retiring them removes the estate's ability to expose work to TypeScript consumers.
  4. Blocked on the toolchain: the 18 bootstrap shims and the 1 VS Code host — retire when AffineScript self-hosts (affinescript#446).
  5. Recommend keeping exempt: the 174 upstream-fork files and the 39 .d.ts, on the grounds above.

Related: #655 (the ruling), #658, #661 (drift gate, which already fails any policy file advertising TypeScript).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions