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

modify-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import {modify, add} from 'rambda'const person = {name: 'James', age: 20}
describe('R.modify', () => { it('happy', () => { const {age} = modify('age', add(1), person) const {age: ageAsString} = modify('age', String, person)
age // $ExpectType number ageAsString // $ExpectType string }) it('curried', () => { const {age} = modify('age', add(1))(person)
age // $ExpectType number })})
rambda

Version Info

Tagged at
2 months ago