24. Definitions and hashing

24.1 What a definition is

Definitions are top-level functions (overloads included), consts, classes, types and interfaces.

24.2 How a definition is hashed

packages/core/src/canonicalize.ts lowers every definition to an S-expression IR built from syntax-kind names, not numbers, with every child labelled by its slot (name, body, …). Unknown syntax is an error, never skipped, so two different programs can't collide.

24.3 Identity

24.4 A frozen format

built from 5890e54f