require-explicit-contract-implementation
Require nominal inheritance when an injected abstract class is rejected by an instanceof guard.
Why
A structurally assignable fake can still fail a constructor's nominal runtime guard. Pure structural interfaces do not require an implements clause.
Fix
Use an implementation inheriting the existing abstract class, or remove the nominal guard if the boundary is intentionally structural.
Examples
abstract class Publisher { abstract publish(): void;}class Consumer { constructor(readonly publisher: Publisher) { if (!(publisher instanceof Publisher)) throw new TypeError("Nominal publisher required"); }}class FakePublisher { publish() {}}new Consumer(new FakePublisher());abstract class Publisher { abstract publish(): void;}class Consumer { constructor(readonly publisher: Publisher) { if (!(publisher instanceof Publisher)) throw new TypeError("Nominal publisher required"); }}class FakePublisher extends Publisher { publish() {}}new Consumer(new FakePublisher());