# TSR1101: Augmenting module '…' 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.

## 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

```ts
// 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.ts` file (for example `types/ambient.d.ts`); `.d.ts` files are trust declarations and are listed in the coverage report.

Sound mode is defined in [design record 0007](https://github.com/Webb-Ventures/typescript-rust/blob/main/docs/design/0007-sound-mode.md) (accepted 2026-10-15).

Source: https://ts-r.dev/errors/TSR1101/
