Features:
- Add
option.mapOr
(8aa1793) - Add
result.mapOr
(8aa1793) - Add
asyncData.mapOr
(8aa1793) - Add
option.orElse
(8aa1793)
Changes:
- Deprecate
getWithDefault
in favor ofgetOr
(8aa1793)
Fixes:
- Handle null checks in store getter (c79d04b)
Features:
- Add
Option.fromPredicate
(9818bcf)
Changes:
- Freeze
Option
,Result
andAsyncData
values (a0112d4) - Make
Option
,Result
andAsyncData
referentially equal when their values are (a0112d4)
Fixes:
- Fix type for
Result.fromJSON
(3c53fb0) (thanks @nobrayner!)
Fixes:
- Make
Serializer.encode
not throw on nullable values (d9e3483) (thanks @nobrayner!)
Features:
- Add
Future.concurrent
(b5ae7e5) - Add
Future.retry
(b5ae7e5) - Add
Future.wait
(b5ae7e5) - Add
option.tapSome
(b5ae7e5)
Features:
- Add
getOr
alias forgetWithDefault
(4c51724)
Features:
- Add
Dict.fromEntries
(773e81e) - Add
Dict.fromOptional
(cc6829c) - Handle JSON serialization with
toJSON
method and add staticfromJSON
hydrators (7074d59)
Changes:
- Make typescript peerDependency optional (509d721)
Changes:
- Improve
Deferred
typing (4dea113)
Changes:
- Improved overall performance (245d7b4)
- Improved type structure for better compiler errors (245d7b4)
- Allow
Future.fromPromise
to type error (d3afa85)
Changes:
- Improved overall performance (245d7b4)
- Improved type structure for better compiler errors (245d7b4)
- Allow
Future.fromPromise
to type error (d3afa85)
Fixes:
- Added a fix for a case where Future hangs when waited on circularly (dfe94fb)
Breaking changes:
- Boxed now requires TypeScript >= 5
⚠️
Features:
- Add
option.filter
method (2f72ce8)
Changes:
- Make patterns use
const
parameter for more precise handling (ebbc808) - Make
Array
functions acceptReadonlyArray
(687b688) (thanks @runeh)
Fixes:
- Make
_state
private inFuture
's exposed signature (25f7bc9)
Features:
- Add
Option.isOption
,Result.isResult
,AsyncData.isAsyncData
&Future.isFuture
guards (8b7841c)
Features:
- Add
P
alias forpattern
(afb971e)
Changes:
- Fix
Dict.entries
type (142b7c7)
Breaking changes:
- Rename
mapResult
tomapOkToResult
(e00b0c0) - Rename
keepMap
tofilterMap
(27f8f4e) - Rename
getBy
tofind
(ad5c0da) - Rename
getIndexBy
tofindIndex
(a8dda24) - Rename
keepMapOne
tofindMap
(cee8c2a)
Features:
- Add
mapErrorToResult
(e00b0c0)
Changes:
- Don't default error types to initial ones in
flatMap
-like methods (29d3307)
Features:
- Add
Array.keepMapOne
(a8300de)
Features:
- Add helpers for
AsyncData<Result>
(6319ada)
Fixes:
- Fixed a formatting issue causing an incorrec type (b9af1ee)
Fixes:
- Fixed a typing issue with optional keys in
Dict.entries
(bc73bd8)
Breaking changes:
- Renamed
future.get
tofuture.onResolve
(7fd9442) - Remove
isPending
,isCancelled
andisResolved
from Future (d759e66)
Features:
- Improve discriminating unions (d759e66)
Breaking changes:
- Make
Array.keepMap
callback return an option instead of a nullable (ff967f9)
Features:
- Add
allFromDict
helpers (04a4662) - Add
Array.zip
&Array.unzip
(04a4662)
Changes:
- Improve type inference when returning newly constructed
Result
,Option
orAsyncData
from a.match
function (ae74ba8)
Fixes:
- Fix flatMap type (fcd4acc)
Changes:
- More concise generics on Result-related types (2f9465e)
Features:
- Add
option.toResult
for better discoverability (cc8a058)
Features:
- Add
Result.fromOption
(6e34a3f)
Changes:
- Make type annotations more compact in IDE (dc320ee)
Breaking changes:
- Move from
value
getter toget
method inLazy
(4d26820)
Fixes:
- Fixed
get
typing forResult
type (thanks @ansavchenco!) (54fe9aa)
Features:
- Add convenience
get
methods (23592b0)
Changes:
- Add inline docs to future (6fd938c)
Breaking changes:
- Update internal representation (181feac)
Fixes:
- Fixed a failing test (64feaff)
Fixes:
- Fixed a compatibility issue with ts-pattern (37337ed)
Breaking changes:
- In case of
Error
,Result
class stores the value inresult.error
(57e254b)
Features:
- Better IDE integration and TypeScript errors (57e254b)
Fixes:
- Fix issue with
Lazy
export (10064dc)
Changes:
- Add more guarantees on Future (7ba99ec)
Changes:
- Remove
Unwrap
type removing guarantees (bb83047)
Changes:
- Simplify
Future.mapResult
type (ce2749a)
Features:
- Add
Option.all
,Result.all
&AsyncData.all
(039eeda)
Features:
- Add tap functions on
Option
,Result
andAsyncData
for debugging (cb63dcf) - Add
mapError
andflatMapError
toResult
(0d36a03)
Changes:
- Improve typing for
Future
(f8d9e12) - Make
Future.flatMapOk
&Future.flatMapError
behave like the result ones (f8d9e12)
Changes:
- Make
flatMap
aggregate error types with a union (015da3b)
Features:
- Reexport
Array
static methods than can be shadowed when importingArray
from boxed (2dd970b)
Changes:
- Better guaratees on
Dict.entries
andDict.keys
(Thanks 0xCAFEADD1C7) (ec67c64, c572dab) - Better typing for
Result.fromExecution
andResult.fromPromise
(c25623f)
Changes:
- Improve exposed types readability (6fb0128)
Changes:
- Improve repository structure (9cd199a)
Initial version