Type Safety
Type safety in Intor is enforced at compile time. It applies to the entire message structure and translation flow.
Typed Aspects
| Aspect | Meaning | Usage |
|---|---|---|
Locale | supported locales | defined in supportedLocales |
Key | translation keys | first argument of t and tRich |
Replacement | interpolation values | second argument of t, third of tRich |
Rich | rich text tag handlers | second argument of tRich |
preKey is also type-safe and narrows keys at the type level.

Per-config Type Switching
Each configuration maintains its own isolated type context.
Switching the target Config switches the entire type surface accordingly.

Integration Steps
♯1 Generate Types
Use the interactive CLI to guide the type generation process.
The CLI automatically generates type definitions and corresponding schema files,
and outputs them to the .intor/ directory.
npx intor-cli

For more CLI features and usage, see: CLI .
♯2 Configure tsconfig.json
Add the following to your tsconfig.json:
{ "include": [ ".intor/**/*.d.ts" ] }