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

fromPairs-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
import {fromPairs} from 'rambda'
describe('R.fromPairs - require explicit type for input list', () => { it('with string index', () => { const list: [string, number][] = [ ['a', 1], ['b', 2], ['c', 3], ] const result = fromPairs(list)
result // $ExpectType { [index: string]: number; } }) it('with number index', () => { const list: [number, string][] = [ [10, 'foo'], [20, 'bar'], [30, 'baz'], ] const result = fromPairs(list)
result // $ExpectType { [index: number]: string; } })})
rambda

Version Info

Tagged at
2 months ago