• Sound mode parse<T>, pre-alpha
  • Design record 0007, Accepted

TSR1504

The validator for '{0}' is {1} KB, over the {2} KB budget. Validate a smaller type or raise '[sound.guard] max-validator-kb'.

The generated validator for a type is larger than the size budget (8 KB by default). Validate a smaller type or raise max-validator-kb.

Rule parse<T>: parse<T> validators. Reported by ts-r-check and ts-r-lsp in files that opt in to sound mode. See Sound mode.

What it means

Each parse<T> call generates validator code that ends up in your bundle. A validator over the budget (8 KB by default, [sound.guard] max-validator-kb) is reported so large validators don't slip into bundles unnoticed.

How to fix

  • Validate a smaller type, for example the part of a response you actually use (Pick<T, ...>).
  • Or raise the budget: [sound.guard] max-validator-kb in ts-r.toml.

Sound mode is defined in design record 0007 (accepted 2026-10-15).