forked from vultix/ts-results
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the ts-results fork documentation out of the readme (#150)
Following up on the work started in [1]. Applied some necessary changes to the content since we're migrating from Markdown to reStructuredText. [1] 633ccad ("Set up an initial documentation structure (#81)")
- Loading branch information
Showing
4 changed files
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Explanation | ||
=========== | ||
|
||
.. toctree:: | ||
ts-results-relationship |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Relationship with ts-results | ||
============================ | ||
|
||
This package is a friendly fork of the excellent https://github.com/vultix/ts-results/ | ||
created due to time constraints on our (Lune's) side – we needed a package | ||
available with some fixes. | ||
|
||
Notable changes compared to the original package: | ||
|
||
* Added ESM compatibility | ||
* ``Option`` gained extra methods: ``mapOr()``, ``mapOrElse()``, ``or()``, | ||
``orElse()`` | ||
* ``Result`` also gained extra methods: ``mapOr()``, ``mapOrElse()``, | ||
``expectErr()``, ``or()``, ``orElse()`` | ||
* ``Ok`` and ``Err`` no longer have the ``val`` property – it's ``Ok.value`` and ``Err.error`` now | ||
* There is ``Some.value`` which replaced ``Some.val`` | ||
* Boolean flags were replaced with methods: | ||
|
||
* ``Option.some`` -> ``Option.isSome()`` | ||
* ``Option.none`` -> ``Option.isNone()`` | ||
* ``Result.ok`` -> ``Result.isOk()`` | ||
* ``Result.err`` -> ``Result.isErr()`` | ||
|
||
We'll try to get the changes merged into the upstream package so that this fork | ||
can become obsolete. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters