Skip to content

Realm source

realm.ts is the preferred realm definition format; the host reads it directly. The file can import as many local definition files as needed. See TypeScript realms for the normative source, import and precedence rules, and Composing a realm for complete examples. No tool converts it to YAML or manifests, and no generated declaration files are committed.

YAML realms are legacy and remain supported, including their committed dist/ and dependencies/manifest.json, subject to capability-specific migrations. In particular, producers using kind: source must follow the source-tree migration. YAML receives no new features. When realm.ts is present, its evaluated value supplies the whole declaration; adjacent legacy declarations are reported and ignored, even if they differ. Invalid TypeScript never falls back to YAML.

The directory and YAML examples below document legacy loading and the meaning of existing capabilities. Their presence is not an instruction to create a second declaration for a TypeScript realm. New declaration features belong in realm.ts.