import { ConstructorOrAbstract } from '../../types/index.js'; import { MatcherRule } from './MatcherRule.js'; /** * @access private */ export class MatchesObjectsWithCommonPrototype extends MatcherRule { constructor( private readonly pattern: ConstructorOrAbstract, transformation: (v: Input_Type) => Output_Type, ) { super(transformation); } matches(value: Input_Type): boolean { return value instanceof this.pattern; } }