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

mergeWith-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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import {concat, mergeWith} from 'rambda'
interface Output { a: boolean, b: boolean, values: number[],}const A = { a: true, values: [10, 20],}const B = { b: true, values: [15, 35],}
describe('R.mergeWith', () => { test('no curry | without explicit types', () => { const result = mergeWith(concat, A, B) result // $ExpectType Record<string, unknown> }) test('no curry | with explicit types', () => { const result = mergeWith<Output>(concat, A, B) result // $ExpectType Output }) test('curry 1 | without explicit types', () => { const result = mergeWith(concat, A)(B) result // $ExpectType Record<string, unknown> }) test('curry 1 | with explicit types', () => { const result = mergeWith<Output>(concat, A)(B) result // $ExpectType Output }) test('curry 2 | without explicit types', () => { const result = mergeWith(concat)(A, B) result // $ExpectType Record<string, unknown> }) test('curry 2 | with explicit types', () => { const result = mergeWith<Output>(concat)(A, B) result // $ExpectType Output })})
rambda

Version Info

Tagged at
2 months ago