- Sound mode general, pre-alpha
- Design record 0007, Accepted
TSR0020
Invalid sound-mode configuration: {0}.
The sound-mode configuration is invalid, for example more than one of ts-r.toml, tsrconfig.json and the tsconfig key set it. Keep one valid configuration.
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
Sound mode is configured in one of three places: the [sound] table of ts-r.toml, a tsrconfig.json ({ "sound": { ... } }, comments allowed), or a top-level "ts-r": { "sound": { ... } } key in tsconfig.json. A problem with that configuration (an unknown key, a value of the wrong type, a malformed refinements entry) is reported on the file, with the details in {0}.
Configuring sound mode in more than one of those places is one such problem. The message names every file involved, for example sound mode is configured in more than one place: the "ts-r" key of 'tsconfig.json' and 'ts-r.toml'; keep one.
How to fix
- Keep the configuration in one place:
ts-r.toml,tsrconfig.jsonor the"ts-r"key of tsconfig.json. - Check the values against the configuration section of design record 0007.
Sound mode is defined in design record 0007 (accepted 2026-10-15).