@nlozgachev/pipelined 0.54.0 → 0.55.0

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.
@@ -1,8 +1,8 @@
1
- import { M as Maybe, R as Result, T as Task } from './Validation-C5Qz1R0S.mjs';
2
- export { E as Equality, a as Err, F as Failed, N as None, O as Ok, b as Ordering, P as Passed, S as Some, V as Validation } from './Validation-C5Qz1R0S.mjs';
3
- import { o as WithValue, i as WithLog, D as Deferred, h as WithKind, e as WithError, R as RetryOptions, b as TimeoutOptions, n as WithTimeout, j as WithMinInterval, c as WithCooldown, W as WithConcurrency, m as WithSize, d as WithDuration, k as WithN, g as WithFirst, l as WithSecond } from './InternalTypes-CDiDBAY4.mjs';
4
- import { D as Duration } from './Duration-B8joKzro.mjs';
5
- import './types.mjs';
1
+ import { M as Maybe, R as Result, T as Task } from './Validation-CbU7Z-kj.cjs';
2
+ export { E as Equality, a as Err, F as Failed, N as None, O as Ok, b as Ordering, P as Passed, S as Some, V as Validation } from './Validation-CbU7Z-kj.cjs';
3
+ import { o as WithValue, i as WithLog, D as Deferred, h as WithKind, e as WithError, R as RetryOptions, b as TimeoutOptions, n as WithTimeout, j as WithMinInterval, c as WithCooldown, W as WithConcurrency, m as WithSize, d as WithDuration, k as WithN, g as WithFirst, l as WithSecond } from './InternalTypes-DuK_XpTi.cjs';
4
+ import { D as Duration } from './Duration-B8joKzro.cjs';
5
+ import './types.cjs';
6
6
 
7
7
  /**
8
8
  * A type that can combine two values of type `A` into one, with a neutral starting value.
@@ -2096,7 +2096,7 @@ declare namespace RemoteData {
2096
2096
  *
2097
2097
  * @example
2098
2098
  * ```ts
2099
- * const result = await Task.Result.tryCatch(fetchUser, { onError: String })();
2099
+ * const result = await Task.Result.tryCatch(() => loadUser(), { onError: String })();
2100
2100
  * setState(RemoteData.from.Result(result)); // Success(user) or Failure(msg)
2101
2101
  * ```
2102
2102
  */
@@ -2147,7 +2147,7 @@ declare namespace RemoteData {
2147
2147
  * ```ts
2148
2148
  * const dbResource = Resource.from.handlers(
2149
2149
  * Task.Result.tryCatch(() => openConnection(config), { onError: (e) => new DbError(e) }),
2150
- * (conn) => Task.from.Promise(() => conn.close())
2150
+ * (conn) => Task.tryCatch(() => conn.close(), { onError: () => {} })
2151
2151
  * );
2152
2152
  *
2153
2153
  * const result = await pipe(
@@ -2170,7 +2170,7 @@ declare namespace Resource {
2170
2170
  * ```ts
2171
2171
  * const fileResource = Resource.from.handlers(
2172
2172
  * Task.Result.tryCatch(() => fs.promises.open("data.csv", "r"), { onError: toFileError }),
2173
- * (handle) => Task.from.Promise(() => handle.close())
2173
+ * (handle) => Task.tryCatch(() => handle.close(), { onError: () => {} })
2174
2174
  * );
2175
2175
  * ```
2176
2176
  */
@@ -2183,8 +2183,8 @@ declare namespace Resource {
2183
2183
  * @example
2184
2184
  * ```ts
2185
2185
  * const timerResource = Resource.from.Task<never, Timer>(
2186
- * Task.from.Promise(() => Promise.resolve(startTimer())),
2187
- * (timer) => Task.from.Promise(() => Promise.resolve(timer.stop()))
2186
+ * Task.tryCatch(() => Promise.resolve(startTimer()), { onError: () => defaultTimer }),
2187
+ * (timer) => Task.tryCatch(() => Promise.resolve(timer.stop()), { onError: () => {} })
2188
2188
  * );
2189
2189
  * ```
2190
2190
  */
package/dist/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as Maybe, R as Result, T as Task } from './Validation-yOcgYn9K.js';
2
- export { E as Equality, a as Err, F as Failed, N as None, O as Ok, b as Ordering, P as Passed, S as Some, V as Validation } from './Validation-yOcgYn9K.js';
1
+ import { M as Maybe, R as Result, T as Task } from './Validation-CmxZ3V4r.js';
2
+ export { E as Equality, a as Err, F as Failed, N as None, O as Ok, b as Ordering, P as Passed, S as Some, V as Validation } from './Validation-CmxZ3V4r.js';
3
3
  import { o as WithValue, i as WithLog, D as Deferred, h as WithKind, e as WithError, R as RetryOptions, b as TimeoutOptions, n as WithTimeout, j as WithMinInterval, c as WithCooldown, W as WithConcurrency, m as WithSize, d as WithDuration, k as WithN, g as WithFirst, l as WithSecond } from './InternalTypes-LdhLQx3N.js';
4
4
  import { D as Duration } from './Duration-B8joKzro.js';
5
5
  import './types.js';
@@ -2096,7 +2096,7 @@ declare namespace RemoteData {
2096
2096
  *
2097
2097
  * @example
2098
2098
  * ```ts
2099
- * const result = await Task.Result.tryCatch(fetchUser, { onError: String })();
2099
+ * const result = await Task.Result.tryCatch(() => loadUser(), { onError: String })();
2100
2100
  * setState(RemoteData.from.Result(result)); // Success(user) or Failure(msg)
2101
2101
  * ```
2102
2102
  */
@@ -2147,7 +2147,7 @@ declare namespace RemoteData {
2147
2147
  * ```ts
2148
2148
  * const dbResource = Resource.from.handlers(
2149
2149
  * Task.Result.tryCatch(() => openConnection(config), { onError: (e) => new DbError(e) }),
2150
- * (conn) => Task.from.Promise(() => conn.close())
2150
+ * (conn) => Task.tryCatch(() => conn.close(), { onError: () => {} })
2151
2151
  * );
2152
2152
  *
2153
2153
  * const result = await pipe(
@@ -2170,7 +2170,7 @@ declare namespace Resource {
2170
2170
  * ```ts
2171
2171
  * const fileResource = Resource.from.handlers(
2172
2172
  * Task.Result.tryCatch(() => fs.promises.open("data.csv", "r"), { onError: toFileError }),
2173
- * (handle) => Task.from.Promise(() => handle.close())
2173
+ * (handle) => Task.tryCatch(() => handle.close(), { onError: () => {} })
2174
2174
  * );
2175
2175
  * ```
2176
2176
  */
@@ -2183,8 +2183,8 @@ declare namespace Resource {
2183
2183
  * @example
2184
2184
  * ```ts
2185
2185
  * const timerResource = Resource.from.Task<never, Timer>(
2186
- * Task.from.Promise(() => Promise.resolve(startTimer())),
2187
- * (timer) => Task.from.Promise(() => Promise.resolve(timer.stop()))
2186
+ * Task.tryCatch(() => Promise.resolve(startTimer()), { onError: () => defaultTimer }),
2187
+ * (timer) => Task.tryCatch(() => Promise.resolve(timer.stop()), { onError: () => {} })
2188
2188
  * );
2189
2189
  * ```
2190
2190
  */