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

updateObject-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
26
27
import {updateObject} from 'rambda'
const obj = { a: {b: 1},}const rules: [string, number][] = [ ['a.b', 2], ['foo.bar', 20],]interface Output { a: {b: number}, foo: {bar: number},}
describe('R.updateObject', () => { it('happy', () => { const result = updateObject<Output>(rules, obj)
result // $ExpectType Output }) it('curried', () => { const result = updateObject<Output>(rules)(obj)
result // $ExpectType Output })})
rambda

Version Info

Tagged at
2 months ago