Skip to main content
Module

x/rambda/applySpec-spec.ts

Faster and smaller alternative to Ramda
Go to Latest
File
import {multiply, applySpec, inc, dec, add} from 'rambda'
describe('applySpec', () => { it('ramda 1', () => { const result = applySpec({ v: inc, u: dec, })(1) result // $ExpectType { readonly v: number; readonly u: number; } }) it('ramda 1', () => { interface Output { sum: number, multiplied: number, } const result = applySpec<Output>({ sum: add, multiplied: multiply, })(1, 2)
result // $ExpectType Output })})