1.3.1 • Published 4 years ago
@kakekomu/result-type v1.3.1
Result
Result type for error handling. This is a frequently used approach for handling results of side effects in functinal languages, sometimes called an Either type.
Result is an union type.
type Result<err, val> = Err<err> | Ok<val>
Under the hood, these four types are simple objects with a type
field. You can use a
switch
or if
statement to get the wrapped value (see the example below).
1.3.1
4 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.2.0-alpha.21
5 years ago
1.2.0-alpha.14
6 years ago
1.2.0-alpha.12
6 years ago
1.2.0-alpha.10
6 years ago
1.2.0-alpha.9
6 years ago
1.2.0-alpha.8
6 years ago
1.2.0-alpha.7
6 years ago
1.2.0-alpha.4
6 years ago
1.2.0-alpha.3
6 years ago
1.2.0-alpha.2
6 years ago
1.2.0-alpha.1
6 years ago