x/rambda/source/maxBy-spec.ts
12345678910111213import {maxBy} from 'rambda'const compareFn = (x: number) => x % 2 === 0 ? 1 : -1const first = 1const second = 2describe('R.maxBy', () => { it('happy', () => { const result = maxBy(compareFn, first, second) result // $ExpectType 1 | 2 })})