1
Fork 0

typescript(option): chore: updated readme

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-12-26 17:07:40 +02:00 committed by prescientmoon
parent 457f1ee53e
commit 0fd6baac81
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4

View file

@ -8,7 +8,9 @@ Probably the most opinionated implementation of the Option type for TypeScript.
## Features:
- Large amount of helpers (curently 25), more than f#'s and elm's core libraries combined.
- Lazy and async versions of helpers:
One of the goals of this lib is to provide variations of helpers which are lazy (don't compute something if it's not needed) or async (make mixing Promises and Options easier). If there is any function you want one of those variations of, be sure to open an issue:)
- Large amount of helpers (curently 30), more than f#'s and elm's core libraries combined.
- Typesafe:
```ts
const foo0: Option<string> = None // works
@ -17,7 +19,7 @@ Probably the most opinionated implementation of the Option type for TypeScript.
const foo3: Option<string> = null // errors out
const foo4: Option<string> = Some(4) // errors out
```
- Native equality:
- Reference equality:
```ts
Some(7) === Some(7) // true
Some(7) === Some(5) // false