Skip to content

v0.30.0

Latest
Compare
Choose a tag to compare
@Harris-Miller Harris-Miller released this 02 May 03:43

types-ramda@0.30.0 release to coincide with ramda@0.30.0. Adds support for new isNotEmpty and flow functions.

Semi-breaking change: R.head(s: string) and R.last(s: string) now return string | undefined, as R.head('')/R.last('') will return you undefined, correctly reflecting the runtime behavior. A short-term solution if you get type-checking errors on upgrade is to utilize the non-null assertion operation on those calls R.head(x)!/R.last(x)!. Recommend to update code with proper null checking with if(R.isNil()) {} or if(R.isNotNil()) {}

The new R.isNotEmpty() does type assertion, returning NonEmptyArray<T>. R.head() and R.last() has been updated to return T instead of T | undefined in these cases. See core ramda MR ramda/ramda#3430 for full examples

R.replace was incorrectly typed for currying, specifically incorrect if you passed R.replace(x) as an argument. It is not typed like all other functions in terms of curried behavior

What's Changed

New Contributors

Full Changelog: v0.29.10...v0.30.0