Releases: cevr/ftld
ftld@5.0.4
Patch Changes
- 9c2b755: fix unintended any
ftld@5.0.3
Patch Changes
- 28ed0a9: fix generics in static creators
ftld@5.0.2
Patch Changes
- 8d32f73: make Do a bit faster
ftld@5.0.1
Patch Changes
- ff7bd76: improve inner Do workings
ftld@5.0.0
Major Changes
-
f62b683: Simplify Do, remove promise support.
Do no longer needs the unwrapper function.
// before const x = Do(function*($) { const a = yield* $(Result.Ok(1)) const b = yield* $(Option.Some(2)) return a + b; }); // after const x = Do(function*() { const a = yield* Result.Ok(1); const b = yield* Option.Some(2); return a + b; });
A side effect of this is that unwrapping promises is no longer supported. This is a breaking change, but it is for the better.
Promises are not a good fit for the Do notation, and it is better to use async/await instead. Promises also have no way of tracking the Error type, which is a big limitation.
ftld@4.0.0
Major Changes
-
88b7726: Change Result/Task generic order, remove UnknownError class, simplify
Now instead of having
Result<Error, Value>
, it will beResult<Value, Error>
.This makes the happy path less verbose.
// Before const x: Result<unknown, number> = Result.from(() => 1); // After const x: Result<number, unknown> = Result.from(() => 1); // which now can be simplified to const x: Result<number> = Result.from(() => 1);
ftld@3.2.0
Minor Changes
- 6ee87d6: fix unintended internal export
ftld@3.1.0
Minor Changes
- d52353e: fix abort context types
ftld@3.0.0
Major Changes
-
d325357: remove records as collections in option/result/task types
Supporting records greatly complicated the code and increased the bundle size for relatively little gain. It's not common to use records as iterable collections in JS, and the ergonomics of using records as collections in the API were not great. This change removes the ability to use records as collections in option/result/task types.
This is a breaking change for users who were using records as collections in option/result/task types.
ftld@2.0.1
Patch Changes
- 61c5303: Improve
Do
typings