import { PatternMatcher } from './PatternMatcher.js'; import { MatchesIdentical } from './rules/index.js'; /** * @access private */ export class IdentityMatcher extends PatternMatcher { when(pattern: Input_Type, transformation: (v: Input_Type) => Output_Type): PatternMatcher { return new IdentityMatcher( this.value, this.rules.concat(new MatchesIdentical(pattern, transformation)), ); } }