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