decoders 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/result.mjs CHANGED
@@ -1,27 +1,15 @@
1
- /**
2
- * Result <value> <error>
3
- * = Ok <value>
4
- * | Err <error>
5
- */
6
-
7
- /**
8
- * Create a new Result instance representing a successful computation.
9
- */
10
1
  export function ok(value) {
11
2
  return {
12
3
  ok: true,
13
4
  value: value,
14
- error: undefined
15
- };
5
+ error: undefined,
6
+ }
16
7
  }
17
- /**
18
- * Create a new Result instance representing a failed computation.
19
- */
20
8
 
21
9
  export function err(error) {
22
10
  return {
23
11
  ok: false,
24
12
  value: undefined,
25
- error: error
26
- };
27
- }
13
+ error: error,
14
+ }
15
+ }