- Sound mode general, pre-alpha
- Design record 0007, Accepted
TSR0003
Unknown sound-mode rule '{0}' in '@ts-r-unsafe'. Rules are S-01 to S-14.
A '@ts-r-unsafe' directive names a rule that doesn't exist. Sound-mode rules are S-01 to S-14.
Rule general: Escape hatches, pragmas and configuration. Reported by ts-r-check and ts-r-lsp in files that opt in to sound mode. See Sound mode.
What it means
// @ts-r-unsafe S-02 S-03: <reason> limits a hatch to the listed rules. A rule id outside S-01 to S-14 is an error, and the hatch suppresses nothing.
Example
// Rule ids are S-01 to S-14.
// @ts-r-unsafe S-99: no such rule. // @expect TSR0003
const n: number = 1;
export { n };
How to fix
- Use the rule id from the diagnostic you want to suppress (each TSR code belongs to one rule: TSR02xx is S-02, TSR14xx is S-14).
- Or drop the rule list so the hatch covers every sound-mode rule on the next line.
Sound mode is defined in design record 0007 (accepted 2026-10-15).