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
type()
can returnBigInt
by @RobinTail in #116- fix(forEach) Remove forEach second generic on root function by @Harris-Miller in #114
- feat(zipObj): stricter types, add test by @GerkinDev in #88
- update(replace) full curry typings by @Harris-Miller in #110
- new(isNotEmpty) add types for isNotEmpty function, and update isEmpty by @Harris-Miller in #101
- new(flow) add types for new flow function by @Harris-Miller in #122
New Contributors
- @RobinTail made their first contribution in #116
Full Changelog: v0.29.10...v0.30.0