@lsby/ts-fp-data 0.0.4 → 0.0.5

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.
@@ -120,9 +120,9 @@ var Task = class _Task {
120
120
  run() {
121
121
  return this.f();
122
122
  }
123
- tryRun() {
123
+ async tryRun() {
124
124
  try {
125
- return new Right(this.run());
125
+ return new Right(await this.run());
126
126
  } catch (e) {
127
127
  if (e instanceof Error)
128
128
  return new Left(e);
@@ -7,7 +7,7 @@ declare class Task<A> {
7
7
  map<B>(f: (a: A) => B): Task<B>;
8
8
  bind<B>(f: (a: A) => Task<B>): Task<B>;
9
9
  run(): Promise<A>;
10
- tryRun(): Either<Error, Promise<A>>;
10
+ tryRun(): Promise<Either<Error, A>>;
11
11
  }
12
12
 
13
13
  export { Task };
@@ -120,9 +120,9 @@ var Task = class _Task {
120
120
  run() {
121
121
  return this.f();
122
122
  }
123
- tryRun() {
123
+ async tryRun() {
124
124
  try {
125
- return new Right(this.run());
125
+ return new Right(await this.run());
126
126
  } catch (e) {
127
127
  if (e instanceof Error)
128
128
  return new Left(e);
@@ -127,9 +127,9 @@ var Task = class _Task {
127
127
  run() {
128
128
  return this.f();
129
129
  }
130
- tryRun() {
130
+ async tryRun() {
131
131
  try {
132
- return new Right(this.run());
132
+ return new Right(await this.run());
133
133
  } catch (e) {
134
134
  if (e instanceof Error)
135
135
  return new Left(e);
@@ -20,9 +20,9 @@ var Task = class _Task {
20
20
  run() {
21
21
  return this.f();
22
22
  }
23
- tryRun() {
23
+ async tryRun() {
24
24
  try {
25
- return new Right(this.run());
25
+ return new Right(await this.run());
26
26
  } catch (e) {
27
27
  if (e instanceof Error)
28
28
  return new Left(e);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Task
3
- } from "./chunk-V3O5DWBY.js";
3
+ } from "./chunk-2AQUF5MK.js";
4
4
 
5
5
  // src/func/seq.ts
6
6
  function seqArrayTask(a) {
@@ -7,7 +7,7 @@ declare class Task<A> {
7
7
  map<B>(f: (a: A) => B): Task<B>;
8
8
  bind<B>(f: (a: A) => Task<B>): Task<B>;
9
9
  run(): Promise<A>;
10
- tryRun(): Either<Error, Promise<A>>;
10
+ tryRun(): Promise<Either<Error, A>>;
11
11
  }
12
12
 
13
13
  export { Task };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Task
3
- } from "../chunk-V3O5DWBY.js";
3
+ } from "../chunk-2AQUF5MK.js";
4
4
  import "../chunk-VTI5CRVQ.js";
5
5
  export {
6
6
  Task
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  seqArrayTask
3
- } from "../chunk-IGVGNMBF.js";
4
- import "../chunk-V3O5DWBY.js";
3
+ } from "../chunk-VP7O7XD7.js";
4
+ import "../chunk-2AQUF5MK.js";
5
5
  import "../chunk-VTI5CRVQ.js";
6
6
  export {
7
7
  seqArrayTask
package/dist/esm/index.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-PP7TCBHD.js";
6
6
  import {
7
7
  seqArrayTask
8
- } from "./chunk-IGVGNMBF.js";
8
+ } from "./chunk-VP7O7XD7.js";
9
9
  import {
10
10
  Task
11
- } from "./chunk-V3O5DWBY.js";
11
+ } from "./chunk-2AQUF5MK.js";
12
12
  import {
13
13
  Either,
14
14
  Left,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/ts-fp-data",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "require": "./dist/cjs/index.cjs",