deno.land / x / rambda@v9.1.1 / source / sort-spec.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import {sort} from 'rambda'
const list = [3, 0, 5, 2, 1]
function sortFn(a: number, b: number): number { return a > b ? 1 : -1}
describe('R.sort', () => { it('happy', () => { const result = sort(sortFn, list) result // $ExpectType number[] }) it('curried', () => { const result = sort(sortFn)(list) result // $ExpectType number[] })})
rambda

Version Info

Tagged at
2 months ago