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

identical-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 {identical} from 'rambda'
describe('R.identical', () => { it('happy', () => { const result = identical(4, 1) const curriedResult = identical(4)(1) result // $ExpectType boolean curriedResult // $ExpectType boolean }) it('with object', () => { const result = identical({a: 1}, {b: 2}) result // $ExpectType boolean identical({a: 1}, {b: 2})
// @ts-expect-error identical({a: 1})({b: 2}) }) it('with object - explicit type', () => { interface Foo { a: number, } identical<Foo>({a: 1}, {a: 2}) // @ts-expect-error identical<Foo>({a: 1}, {b: 2}) })})
rambda

Version Info

Tagged at
2 months ago