@madkarma/result 1.0.1 → 1.0.3
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/README.md +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type Result<T, E extends {
|
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* ```typescript
|
|
35
|
-
* const
|
|
35
|
+
* const [value, _] = Ok(42);
|
|
36
36
|
* ```
|
|
37
37
|
*
|
|
38
38
|
* @see https://www.youtube.com/watch?v=ovnyeq-Xxrc
|
|
@@ -45,7 +45,7 @@ export declare const Ok: <T>(value: T) => Result<T, never>;
|
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
47
|
* ```typescript
|
|
48
|
-
* const
|
|
48
|
+
* const [_, error] = Err({ code: 'NOT_FOUND' });
|
|
49
49
|
* ```
|
|
50
50
|
*
|
|
51
51
|
* @see https://www.youtube.com/watch?v=ovnyeq-Xxrc
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```typescript
|
|
6
|
-
* const
|
|
6
|
+
* const [value, _] = Ok(42);
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
9
|
* @see https://www.youtube.com/watch?v=ovnyeq-Xxrc
|
|
@@ -16,7 +16,7 @@ export const Ok = (value) => [value, null];
|
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```typescript
|
|
19
|
-
* const
|
|
19
|
+
* const [_, error] = Err({ code: 'NOT_FOUND' });
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
22
22
|
* @see https://www.youtube.com/watch?v=ovnyeq-Xxrc
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madkarma/result",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Rust's Result type, for TypeScript",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"prettier": "3.8.3",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"patch": "bun pm version patch && bun run tags",
|
|
26
26
|
"minor": "bun pm version minor && bun run tags",
|
|
27
27
|
"major": "bun pm version major && bun run tags",
|
|
28
|
-
"
|
|
28
|
+
"prepare": "git config core.hooksPath .githooks"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|