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

propOr-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
24
25
import {propOr} from 'rambda'
const obj = {foo: 'bar'}const property = 'foo'const fallback = 'fallback'
describe('R.propOr', () => { it('happy', () => { const result = propOr(fallback, property, obj) result // $ExpectType string }) it('curry 1', () => { const result = propOr(fallback)(property, obj) result // $ExpectType string }) it('curry 2', () => { const result = propOr(fallback, property)(obj) result // $ExpectType string }) it('curry 3', () => { const result = propOr(fallback)(property)(obj) result // $ExpectType string })})
rambda

Version Info

Tagged at
2 months ago