import {sortBy} from 'rambda'
interface Input { a: number,}
describe('R.sortBy', () => { it('passing type to sort function', () => { function fn(x: any): number { return x.a } function fn2(x: Input): number { return x.a }
const input = [{a: 2}, {a: 1}, {a: 0}] const result = sortBy(fn, input) const curriedResult = sortBy(fn2)(input)
result curriedResult result[0].a }) it('passing type to sort function and list', () => { function fn(x: Input): number { return x.a }
const input: Input[] = [{a: 2}, {a: 1}, {a: 0}] const result = sortBy(fn, input) const curriedResult = sortBy(fn)(input)
result curriedResult result[0].a })})