TypeScript
Default for this catalog: TypeScript strict, not JavaScript. Prefer typed APIs over any. tsconfig location and paths come from recon, not assumed repo root.
Rules
- Enable
strictintsconfig.json. Do not weaken it for convenience. - Do not use
anyunless the user accepts an escape hatch at a typed boundary (third-party untyped module). Preferunknownand narrow. - Type public APIs: function params/returns, React props, Express/Nest handlers, IPC commands, DB row types.
- Prefer
typeorinterfaceconsistently with the file you are editing. - Do not use
asto silence errors. Narrow or fix the source type. - Generated examples in
.ts/.tsxonly.
Boundaries
Serialize at process edges (HTTP, IPC, env). Validate input (schema or Nest pipes) then keep a typed value inward. Never print secrets from process.env into chat.