- Sound mode S-11, pre-alpha
- Design record 0007, Accepted
TSR1101
Augmenting module '{0}' in a sound file changes its trusted types without a check. Move the augmentation to a '.d.ts' file.
A 'declare module' augmentation in a sound file changes a package's trusted types. Move the augmentation to a .d.ts file.
Rule S-11: Dependency trust boundaries (level: sound). Reported by ts-r-check and ts-r-lsp in files that opt in to sound mode. See Sound mode.
What it means
Trust in dependencies is declared by package mode and by .d.ts files, never inline in a sound file. Augmenting a module from a sound .ts file claims extra exports or members exist without a check. It's reported at the module name.
Example
// Declaring an extra export of a package claims it exists, unchecked.
declare module "verify-pkg" { // @expect TSR1101
export function extra(): string;
}
export {};
How to fix
- Move the augmentation into a project
.d.tsfile (for exampletypes/ambient.d.ts);.d.tsfiles are trust declarations and are listed in the coverage report.
Sound mode is defined in design record 0007 (accepted 2026-10-15).