deno.land / x / rambda@v9.1.1 / source / propOr-spec.ts
12345678910111213141516171819202122232425import {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 })})
Version Info