import {pick} from 'rambda'
const input = {a: 'foo', b: 2, c: 3, d: 4}
describe('R.pick with array as props input', () => { it('without passing type', () => { const result = pick(['a', 'c'], input) result.a result.c })})
describe('R.pick with string as props input', () => { interface Input { a: string, b: number, c: number, d: number, } interface Output { a: string, c: number, } it('explicitly declare output', () => { const result = pick<Output>('a,c', input) result result.a result.c
const curriedResult = pick<Output>('a,c')(input)
curriedResult.a })
it('explicitly declare input and output', () => { const result = pick<Input, Output>('a,c', input) result result.a
const curriedResult = pick<Input, Output>('a,c')(input)
curriedResult.a })
it('without passing type', () => { const result = pick('a,c', input) result })})