prefer-dependency-interface
Annotate retained collaborators with their existing interface when the consumer uses only that contract.
Why
A concrete annotation can require private implementation identity even when a declared interface covers every consumed operation.
Fix
Use the existing interface on the injected parameter. Keep concrete annotations for implementation-specific capabilities.
Examples
interface Store { read(): string;}class SqlStore implements Store { private value = "ok"; read() { return this.value; }}class Service { constructor(private readonly store: SqlStore) {} run() { return this.store.read(); }}interface Store { read(): string;}class Service { constructor(private readonly store: Store) {} run() { return this.store.read(); }}