import { mapUnmatched } from '../match-execution' ; import { TrackedEither , isUnmatched } from '../match-tracking' ; import { isFn , MapFnOrValue } from '../common' ; import { MatchTester } from './types' ; description param tracker param ctor param transformer internal export const matchCtorTester = < TIn , TOut > ( tracker , ctor , transformer ) => { if ( isUnmatched ( tracker ) && isFn ( ctor ) && ! ! ctor . prototype && tracker . val instanceof ctor ) { return mapUnmatched ( tracker , transformer ) ; } return tracker ; } ;