# TSR0004: Unknown level '…' in '@ts-r' pragma. Use 'off', 'strict', 'sound' or 'contracts'.

> A '// @ts-r' pragma names an unknown level. Use 'off', 'strict', 'sound' or 'contracts'.

## What it means

A file can set its own sound-mode level with a pragma in its leading comments: `// @ts-r off`, `strict`, `sound` or `contracts`. Any other word is reported, and the file keeps the level its configuration gives it.

## Example

```ts
// @ts-r loud // @expect TSR0004
// Unknown levels are reported; the file falls back to its configured level (sound).
export const n: number = 1;
```

## How to fix

- Use one of the four levels: `// @ts-r off`, `// @ts-r strict`, `// @ts-r sound`, `// @ts-r contracts`.
- Or remove the pragma and let `include`/`exclude` in the `[sound]` configuration decide.

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/TSR0004/
