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

debounce-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import {debounce} from 'rambda'
describe('R.debounce', () => { it('happy', async() => { const fn = debounce((x: number) => x + 1, 1000) const result = fn(1) result // $ExpectType void }) it('with immediate flag', async() => { const fn = debounce((x: number) => x + 1, 1000, true) const result = fn(1) result // $ExpectType void }) it('with explicit types', async() => { debounce<number, boolean>(x => x > 1, 1000)
// @ts-expect-error debounce<number, boolean>(x => { return x + 1 }, 1000) })})
rambda

Version Info

Tagged at
2 months ago