@praha/byethrow 0.11.0 → 0.11.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.
@@ -29,7 +29,8 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  const is_promise_cjs_namespaceObject = require("../internals/helpers/is-promise.cjs");
30
30
  const fail = (...args)=>{
31
31
  if (args.length <= 0) return {
32
- type: 'Failure'
32
+ type: 'Failure',
33
+ error: void 0
33
34
  };
34
35
  const error = args[0];
35
36
  if ((0, is_promise_cjs_namespaceObject.isPromise)(error)) return error.then((error)=>({
@@ -29,7 +29,8 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  const is_promise_cjs_namespaceObject = require("../internals/helpers/is-promise.cjs");
30
30
  const succeed = (...args)=>{
31
31
  if (args.length <= 0) return {
32
- type: 'Success'
32
+ type: 'Success',
33
+ value: void 0
33
34
  };
34
35
  const value = args[0];
35
36
  if ((0, is_promise_cjs_namespaceObject.isPromise)(value)) return value.then((value)=>({
@@ -1,7 +1,8 @@
1
1
  import { isPromise } from "../internals/helpers/is-promise.js";
2
2
  const fail = (...args)=>{
3
3
  if (args.length <= 0) return {
4
- type: 'Failure'
4
+ type: 'Failure',
5
+ error: void 0
5
6
  };
6
7
  const error = args[0];
7
8
  if (isPromise(error)) return error.then((error)=>({
@@ -1,7 +1,8 @@
1
1
  import { isPromise } from "../internals/helpers/is-promise.js";
2
2
  const succeed = (...args)=>{
3
3
  if (args.length <= 0) return {
4
- type: 'Success'
4
+ type: 'Success',
5
+ value: void 0
5
6
  };
6
7
  const value = args[0];
7
8
  if (isPromise(value)) return value.then((value)=>({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praha/byethrow",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "A lightweight, tree-shakable Result type package with a simple, consistent API designed",
5
5
  "keywords": [
6
6
  "javascript",