DeutschGitHub

TypeScript systems · taken apart

Understand the system. Build your own.

35 TypeScript experiments explained through their problems, contracts, control flow, and limits. Start small, test your assumptions, and follow the source.

01: Problem

02: Mental model

03: Control flow

04: Building blocks

05: Build it yourself

35experiments
5technical domains
2complete language editions
0site runtime dependencies

Starting points

Six systems worth taking apart

Choose a familiar problem. Read the idea, inspect the experiment, then build an independent core.

01partial

Assert

Enforces runtime conditions with matching TypeScript narrowing.

Foundations & Data
Read the blueprint
02prototype

Parser Combinator

Composes byte-oriented parsers with slice-aware inputs and progress-checked repetition.

Parsing & Observability
Read the blueprint
03partial

Priority Queue

Drains array and injected MongoDB-backed heaps in comparator order.

State & Orchestration
Read the blueprint
04prototype

Random

Provides reproducible seeded generators and normalized weighted selection.

Simulation & Generation
Read the blueprint
05prototype

State Machine

Serializes transitions, awaits guards and enters the correct target state.

State & Orchestration
Read the blueprint
06prototype

Worker Pool

Executes trusted self-contained functions on bounded persistent workers with timeout recovery.

State & Orchestration
Read the blueprint

Learning paths

Follow concepts that build on each other

What does “finished” mean?

A concept explains an idea. A working experiment demonstrates a tested, documented core. A production package additionally needs compatibility guarantees, operational limits, integration evidence, and maintenance. No badge alone promises production readiness.