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

findAsync-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import {findAsync, delay} from 'rambda'
const list = [1, 2, 3]
const predicate = async(x: number) => { await delay(100) return x > 1}
describe('R.findAsync', () => { it('happy', async() => { const result = await findAsync(predicate, list) result // $ExpectType number | undefined }) it('curried', async() => { const result = await findAsync(predicate)(list) result // $ExpectType number | undefined })})
rambda

Version Info

Tagged at
2 months ago