Skip to content

Optimizing Rambda for pipe function with v10.0.0

Dejan Toteff edited this page Jan 28, 2025 · 1 revision
  • Optimize many methods to better work in TS context with R.pipe/R.compose. The focus was passing objects through the pipe/compose chain.

  • Add R.piped method from Rambdax since it works better with TS than R.pipe and R.compose. It supports up to 20 function inputs.

  • Revert adding stopper logic in R.reduce - https://github.com/selfrefactor/rambda/pull/630

  • Take typings of R.filter from Remeda.

_ Regarding using object as input R.map and R.filter in TypeScript - this is no longer supported in TypeScript as it has multiple issues when using inside pipes. Instead R.mapObject and R.filterObject are taken from Rambdax so users can migrate their code.

? indexed - need to be removed

Regarding using object with R.forEach in TypeScript - this is no longer supported. Again, JS version still works with objects.

  • head/last - empty array as input will return undefined, but never
  • assocPath - stop supporting curring of type (x)(y)(z)

Require explicit output type(s) as it is very hard to pick up the correct type in many cases.

  • assocPath
  • dissocPath

Sync with typing of @types/ramda:

  • forEach
  • either
  • both
  • allPass
  • anyPass
  • drop/dropLast
  • map
  • filter

Increase number of function inputs for R.pipe to 20 and for R.compose to 12.