Releases: sbernheim4/excoptional
Releases · sbernheim4/excoptional
1.3.6
1.3.4
Previously invoking None()
had a return type of Option<never>
. This is
not useful when modeling values that may eventually become a Some()
as
the generic for that Option would not be constrained when the value is
updated causing a loss of type support.
This change carries through the generic in a None
and better preserves
the type information throughout a system.
1.3.3
- Improve type inference support. Both
Some
andNone
functions specify they return anOption
. Functions that return the result ofSome()
orNone()
show they return anOption
instead of theSome
type as before.
1.3.2
- Bump TypeScript package to 4.4
1.3.1
- Improve documentation
1.3.0
- Add new method
ap
which formally makes the Option an Applicative. - Add new static method
liftN
to support lifting function with arbitrary number of non option arguments to be a function of option arguments.
1.2.1
- Improve type inference support. Explicitly specifying the return type of a function that returns an option is no longer necessary for accurate type support. Functions that return an option will be correctly inferred.
1.2.0
- Add new static method
lift
.
Option.lift
is an alias forOption.map
. Another name (perhaps more descriptive) for the same thing.
1.1.2
- Fix type issue where the functional argument customToString to the
log
andlogAndContinue
methods has it's argumentopt
defined as optional. - Update README and TSDoc examples to reflect correct values in commented sections
1.1.1
- Improves logging method capabilities.
- Adds
logAndContinue
method - Improves
log
method to allow for a custom toString method to be passed as an argument. - Updates example sample code in the TSDocs and README