• Sound mode S-11, pre-alpha
  • Design record 0007, Accepted

TSR1102

Shorthand ambient module '{0}' makes every import 'any'. Declare its types in a '.d.ts' file.

A shorthand 'declare module "x";' in a sound file makes every import from it 'any'. Declare the module's types in 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

declare module "x"; without a body types every import from x as any. In a sound file that is reported at the module name.

Example

Spec case from design record 0007 (checked by the record's case harness, not by this site's build)
// A script file (no imports or exports, on purpose) declaring a wildcard shorthand module.
declare module "tsr-fixture-assets-*"; // @expect TSR1102

How to fix

  • Declare the module's real types in a .d.ts file.
  • Move the shorthand declaration to a .d.ts file if you accept the untyped boundary; the package is then treated as loose and listed in the report.

Sound mode is defined in design record 0007 (accepted 2026-10-15).