effect 4.0.0-beta.83 → 4.0.0-beta.85
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/dist/Array.d.ts +64 -64
- package/dist/Array.js +26 -26
- package/dist/Cache.d.ts +1 -1
- package/dist/Cache.js +1 -1
- package/dist/Cause.d.ts +68 -68
- package/dist/Cause.js +47 -47
- package/dist/Channel.d.ts +5 -5
- package/dist/Channel.js +3 -3
- package/dist/Clock.d.ts +1 -1
- package/dist/Clock.js +1 -1
- package/dist/Combiner.d.ts +9 -9
- package/dist/Combiner.js +8 -8
- package/dist/Config.d.ts +15 -94
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +22 -70
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +58 -74
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +66 -41
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +1 -1
- package/dist/Console.js +1 -1
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +4 -3
- package/dist/Context.js.map +1 -1
- package/dist/Data.d.ts +15 -15
- package/dist/Data.js +3 -3
- package/dist/DateTime.d.ts +6 -6
- package/dist/DateTime.js +2 -2
- package/dist/Duration.d.ts +3 -3
- package/dist/Duration.js +3 -3
- package/dist/Effect.d.ts +84 -45
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +72 -33
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts +7 -7
- package/dist/Equal.js +5 -5
- package/dist/Equivalence.d.ts +17 -17
- package/dist/Equivalence.js +13 -13
- package/dist/Exit.d.ts +3 -3
- package/dist/Exit.js +3 -3
- package/dist/Formatter.d.ts +5 -5
- package/dist/Formatter.js +4 -4
- package/dist/Function.d.ts +10 -10
- package/dist/Function.js +3 -3
- package/dist/HashMap.d.ts +3 -3
- package/dist/HashMap.js +1 -1
- package/dist/Iterable.d.ts +6 -6
- package/dist/Iterable.js +2 -2
- package/dist/JsonPatch.d.ts +2 -2
- package/dist/Layer.d.ts +1 -1
- package/dist/Layer.js +5 -4
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +4 -3
- package/dist/LayerMap.js.map +1 -1
- package/dist/Logger.d.ts +1 -1
- package/dist/Logger.js +1 -1
- package/dist/Match.d.ts +8 -8
- package/dist/Match.js +8 -8
- package/dist/Metric.d.ts +3 -3
- package/dist/Metric.js +3 -3
- package/dist/Optic.d.ts +30 -30
- package/dist/Optic.js +12 -12
- package/dist/Option.d.ts +7 -7
- package/dist/Option.js +7 -7
- package/dist/Order.d.ts +23 -23
- package/dist/Order.js +20 -20
- package/dist/Pool.d.ts +1 -1
- package/dist/Pool.js +1 -1
- package/dist/Predicate.d.ts +88 -88
- package/dist/Predicate.js +47 -47
- package/dist/PubSub.d.ts +3 -3
- package/dist/PubSub.js +3 -3
- package/dist/Random.d.ts +31 -0
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +32 -0
- package/dist/Random.js.map +1 -1
- package/dist/Reducer.d.ts +1 -1
- package/dist/Reducer.js +1 -1
- package/dist/Result.d.ts +18 -18
- package/dist/Result.js +8 -8
- package/dist/Runtime.d.ts +1 -1
- package/dist/Runtime.js +1 -1
- package/dist/Schema.d.ts +313 -126
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +316 -127
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +9 -8
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +203 -140
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +48 -48
- package/dist/SchemaGetter.js +44 -44
- package/dist/SchemaIssue.d.ts +3 -3
- package/dist/SchemaIssue.js +3 -3
- package/dist/SchemaParser.d.ts +122 -22
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +186 -50
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +1 -1
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +96 -2
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +20 -20
- package/dist/SchemaTransformation.js +18 -18
- package/dist/Stream.d.ts +3 -3
- package/dist/Stream.js +2 -2
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +1 -1
- package/dist/String.js +1 -1
- package/dist/Struct.d.ts +1 -1
- package/dist/Struct.js +1 -1
- package/dist/Types.d.ts +13 -13
- package/dist/internal/effect.js +33 -20
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/schema/arbitrary.js +17 -1
- package/dist/internal/schema/arbitrary.js.map +1 -1
- package/dist/internal/schema/cause.d.ts +2 -0
- package/dist/internal/schema/cause.d.ts.map +1 -0
- package/dist/internal/schema/cause.js +24 -0
- package/dist/internal/schema/cause.js.map +1 -0
- package/dist/internal/schema/schema.d.ts +8 -4
- package/dist/internal/schema/schema.d.ts.map +1 -1
- package/dist/internal/schema/schema.js +21 -8
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/stackTraceLimit.d.ts +2 -0
- package/dist/internal/stackTraceLimit.d.ts.map +1 -0
- package/dist/internal/stackTraceLimit.js +40 -0
- package/dist/internal/stackTraceLimit.js.map +1 -0
- package/dist/internal/tracer.d.ts.map +1 -1
- package/dist/internal/tracer.js +4 -3
- package/dist/internal/tracer.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +3 -3
- package/dist/testing/TestSchema.js +1 -1
- package/dist/unstable/ai/AiError.d.ts +1 -1
- package/dist/unstable/ai/AiError.js +1 -1
- package/dist/unstable/ai/Chat.d.ts +1 -1
- package/dist/unstable/ai/Chat.js +1 -1
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +4 -5
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/cli/Prompt.js +2 -2
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +4 -3
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +2 -2
- package/dist/unstable/persistence/PersistedQueue.js +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +1 -1
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +3 -4
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +4 -3
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +15 -2
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -0
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +1 -0
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +65 -65
- package/src/Cache.ts +1 -1
- package/src/Cause.ts +68 -68
- package/src/Channel.ts +5 -5
- package/src/Clock.ts +1 -1
- package/src/Combiner.ts +9 -9
- package/src/Config.ts +40 -108
- package/src/ConfigProvider.ts +139 -100
- package/src/Console.ts +1 -1
- package/src/Context.ts +4 -5
- package/src/Data.ts +15 -15
- package/src/DateTime.ts +6 -6
- package/src/Duration.ts +3 -3
- package/src/Effect.ts +89 -45
- package/src/Equal.ts +7 -7
- package/src/Equivalence.ts +17 -17
- package/src/Exit.ts +3 -3
- package/src/Formatter.ts +5 -5
- package/src/Function.ts +10 -10
- package/src/HashMap.ts +3 -3
- package/src/Iterable.ts +6 -6
- package/src/JsonPatch.ts +2 -2
- package/src/Layer.ts +5 -5
- package/src/LayerMap.ts +4 -3
- package/src/Logger.ts +1 -1
- package/src/Match.ts +8 -8
- package/src/Metric.ts +3 -3
- package/src/Optic.ts +30 -30
- package/src/Option.ts +7 -7
- package/src/Order.ts +23 -23
- package/src/Pool.ts +1 -1
- package/src/Predicate.ts +88 -88
- package/src/PubSub.ts +3 -3
- package/src/Random.ts +42 -0
- package/src/Reducer.ts +1 -1
- package/src/Result.ts +20 -20
- package/src/Runtime.ts +1 -1
- package/src/Schema.ts +389 -153
- package/src/SchemaAST.ts +237 -148
- package/src/SchemaGetter.ts +48 -48
- package/src/SchemaIssue.ts +3 -3
- package/src/SchemaParser.ts +197 -58
- package/src/SchemaRepresentation.ts +73 -3
- package/src/SchemaTransformation.ts +20 -20
- package/src/Stream.ts +4 -4
- package/src/String.ts +1 -1
- package/src/Struct.ts +1 -1
- package/src/Types.ts +13 -13
- package/src/internal/effect.ts +40 -21
- package/src/internal/schema/arbitrary.ts +23 -2
- package/src/internal/schema/cause.ts +26 -0
- package/src/internal/schema/schema.ts +36 -10
- package/src/internal/stackTraceLimit.ts +63 -0
- package/src/internal/tracer.ts +4 -3
- package/src/testing/TestSchema.ts +3 -3
- package/src/unstable/ai/AiError.ts +1 -1
- package/src/unstable/ai/Chat.ts +1 -1
- package/src/unstable/ai/Tool.ts +4 -3
- package/src/unstable/cli/Prompt.ts +1 -1
- package/src/unstable/httpapi/HttpApiMiddleware.ts +4 -3
- package/src/unstable/httpapi/HttpApiScalar.ts +2 -2
- package/src/unstable/persistence/PersistedQueue.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +1 -1
- package/src/unstable/rpc/RpcGroup.ts +3 -4
- package/src/unstable/rpc/RpcMiddleware.ts +4 -3
- package/src/unstable/sql/SqlResolver.ts +15 -2
- package/src/unstable/workflow/Activity.ts +2 -0
- package/src/unstable/workflow/WorkflowEngine.ts +1 -1
package/dist/Result.d.ts
CHANGED
|
@@ -311,7 +311,7 @@ export {
|
|
|
311
311
|
* This is equivalent to `Result.succeed(undefined)`, but reuses a shared
|
|
312
312
|
* `Success` wrapper instead of allocating one each time.
|
|
313
313
|
*
|
|
314
|
-
* **Example** (
|
|
314
|
+
* **Example** (Referencing void results)
|
|
315
315
|
*
|
|
316
316
|
* ```ts
|
|
317
317
|
* import { Result } from "effect"
|
|
@@ -342,7 +342,7 @@ void_ as void };
|
|
|
342
342
|
* `Result<never, void>`, but reuses a shared `Failure` wrapper instead of
|
|
343
343
|
* allocating one each time.
|
|
344
344
|
*
|
|
345
|
-
* **Example** (
|
|
345
|
+
* **Example** (Failing without a payload)
|
|
346
346
|
*
|
|
347
347
|
* ```ts
|
|
348
348
|
* import { Result } from "effect"
|
|
@@ -655,7 +655,7 @@ export declare const isResult: (input: unknown) => input is Result<unknown, unkn
|
|
|
655
655
|
* - Acts as a TypeScript type guard, narrowing to `Failure<A, E>`
|
|
656
656
|
* - After narrowing, you can access `.failure` to read the error value
|
|
657
657
|
*
|
|
658
|
-
* **Example** (Narrowing to
|
|
658
|
+
* **Example** (Narrowing to failure)
|
|
659
659
|
*
|
|
660
660
|
* ```ts
|
|
661
661
|
* import { Result } from "effect"
|
|
@@ -687,7 +687,7 @@ export declare const isFailure: <A, E>(self: Result<A, E>) => self is Failure<A,
|
|
|
687
687
|
* - Acts as a TypeScript type guard, narrowing to `Success<A, E>`
|
|
688
688
|
* - After narrowing, you can access `.success` to read the value
|
|
689
689
|
*
|
|
690
|
-
* **Example** (Narrowing to
|
|
690
|
+
* **Example** (Narrowing to success)
|
|
691
691
|
*
|
|
692
692
|
* ```ts
|
|
693
693
|
* import { Result } from "effect"
|
|
@@ -2096,7 +2096,7 @@ export declare const orElse: {
|
|
|
2096
2096
|
* - The error types are merged into a union (`E | E2`)
|
|
2097
2097
|
* - This is the monadic `bind` / `>>=` for `Result`
|
|
2098
2098
|
*
|
|
2099
|
-
* **Example** (
|
|
2099
|
+
* **Example** (Validating sequentially)
|
|
2100
2100
|
*
|
|
2101
2101
|
* ```ts
|
|
2102
2102
|
* import { pipe, Result } from "effect"
|
|
@@ -2133,7 +2133,7 @@ export declare const flatMap: {
|
|
|
2133
2133
|
* - The error types are merged into a union (`E | E2`)
|
|
2134
2134
|
* - This is the monadic `bind` / `>>=` for `Result`
|
|
2135
2135
|
*
|
|
2136
|
-
* **Example** (
|
|
2136
|
+
* **Example** (Validating sequentially)
|
|
2137
2137
|
*
|
|
2138
2138
|
* ```ts
|
|
2139
2139
|
* import { pipe, Result } from "effect"
|
|
@@ -2170,7 +2170,7 @@ export declare const flatMap: {
|
|
|
2170
2170
|
* - The error types are merged into a union (`E | E2`)
|
|
2171
2171
|
* - This is the monadic `bind` / `>>=` for `Result`
|
|
2172
2172
|
*
|
|
2173
|
-
* **Example** (
|
|
2173
|
+
* **Example** (Validating sequentially)
|
|
2174
2174
|
*
|
|
2175
2175
|
* ```ts
|
|
2176
2176
|
* import { pipe, Result } from "effect"
|
|
@@ -2211,7 +2211,7 @@ export declare const flatMap: {
|
|
|
2211
2211
|
*
|
|
2212
2212
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2213
2213
|
*
|
|
2214
|
-
* **Example** (
|
|
2214
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2215
2215
|
*
|
|
2216
2216
|
* ```ts
|
|
2217
2217
|
* import { pipe, Result } from "effect"
|
|
@@ -2259,7 +2259,7 @@ export declare const andThen: {
|
|
|
2259
2259
|
*
|
|
2260
2260
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2261
2261
|
*
|
|
2262
|
-
* **Example** (
|
|
2262
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2263
2263
|
*
|
|
2264
2264
|
* ```ts
|
|
2265
2265
|
* import { pipe, Result } from "effect"
|
|
@@ -2307,7 +2307,7 @@ export declare const andThen: {
|
|
|
2307
2307
|
*
|
|
2308
2308
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2309
2309
|
*
|
|
2310
|
-
* **Example** (
|
|
2310
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2311
2311
|
*
|
|
2312
2312
|
* ```ts
|
|
2313
2313
|
* import { pipe, Result } from "effect"
|
|
@@ -2355,7 +2355,7 @@ export declare const andThen: {
|
|
|
2355
2355
|
*
|
|
2356
2356
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2357
2357
|
*
|
|
2358
|
-
* **Example** (
|
|
2358
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2359
2359
|
*
|
|
2360
2360
|
* ```ts
|
|
2361
2361
|
* import { pipe, Result } from "effect"
|
|
@@ -2403,7 +2403,7 @@ export declare const andThen: {
|
|
|
2403
2403
|
*
|
|
2404
2404
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2405
2405
|
*
|
|
2406
|
-
* **Example** (
|
|
2406
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2407
2407
|
*
|
|
2408
2408
|
* ```ts
|
|
2409
2409
|
* import { pipe, Result } from "effect"
|
|
@@ -2451,7 +2451,7 @@ export declare const andThen: {
|
|
|
2451
2451
|
*
|
|
2452
2452
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2453
2453
|
*
|
|
2454
|
-
* **Example** (
|
|
2454
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2455
2455
|
*
|
|
2456
2456
|
* ```ts
|
|
2457
2457
|
* import { pipe, Result } from "effect"
|
|
@@ -2499,7 +2499,7 @@ export declare const andThen: {
|
|
|
2499
2499
|
*
|
|
2500
2500
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2501
2501
|
*
|
|
2502
|
-
* **Example** (
|
|
2502
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2503
2503
|
*
|
|
2504
2504
|
* ```ts
|
|
2505
2505
|
* import { pipe, Result } from "effect"
|
|
@@ -2547,7 +2547,7 @@ export declare const andThen: {
|
|
|
2547
2547
|
*
|
|
2548
2548
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2549
2549
|
*
|
|
2550
|
-
* **Example** (
|
|
2550
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2551
2551
|
*
|
|
2552
2552
|
* ```ts
|
|
2553
2553
|
* import { pipe, Result } from "effect"
|
|
@@ -2595,7 +2595,7 @@ export declare const andThen: {
|
|
|
2595
2595
|
*
|
|
2596
2596
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
2597
2597
|
*
|
|
2598
|
-
* **Example** (
|
|
2598
|
+
* **Example** (Chaining Result values with different argument types)
|
|
2599
2599
|
*
|
|
2600
2600
|
* ```ts
|
|
2601
2601
|
* import { pipe, Result } from "effect"
|
|
@@ -3095,7 +3095,7 @@ export declare const transposeOption: <A = never, E = never>(self: Option<Result
|
|
|
3095
3095
|
* - `Some(a)` where `f(a)` is `Success(b)` becomes `Success(Some(b))`
|
|
3096
3096
|
* - `Some(a)` where `f(a)` is `Failure(e)` becomes `Failure(e)`
|
|
3097
3097
|
*
|
|
3098
|
-
* **Example** (
|
|
3098
|
+
* **Example** (Mapping and transposing in one step)
|
|
3099
3099
|
*
|
|
3100
3100
|
* ```ts
|
|
3101
3101
|
* import { Option, Result } from "effect"
|
|
@@ -3131,7 +3131,7 @@ export declare const transposeMapOption: (<A, B, E = never>(f: (self: A) => Resu
|
|
|
3131
3131
|
* This is equivalent to `Result.succeed(Option.none())`, but reuses a shared
|
|
3132
3132
|
* `Success` wrapper instead of allocating one each time.
|
|
3133
3133
|
*
|
|
3134
|
-
* **Example** (
|
|
3134
|
+
* **Example** (Succeeding with None)
|
|
3135
3135
|
*
|
|
3136
3136
|
* ```ts
|
|
3137
3137
|
* import { Result } from "effect"
|
package/dist/Result.js
CHANGED
|
@@ -86,7 +86,7 @@ export {
|
|
|
86
86
|
* This is equivalent to `Result.succeed(undefined)`, but reuses a shared
|
|
87
87
|
* `Success` wrapper instead of allocating one each time.
|
|
88
88
|
*
|
|
89
|
-
* **Example** (
|
|
89
|
+
* **Example** (Referencing void results)
|
|
90
90
|
*
|
|
91
91
|
* ```ts
|
|
92
92
|
* import { Result } from "effect"
|
|
@@ -117,7 +117,7 @@ void_ as void };
|
|
|
117
117
|
* `Result<never, void>`, but reuses a shared `Failure` wrapper instead of
|
|
118
118
|
* allocating one each time.
|
|
119
119
|
*
|
|
120
|
-
* **Example** (
|
|
120
|
+
* **Example** (Failing without a payload)
|
|
121
121
|
*
|
|
122
122
|
* ```ts
|
|
123
123
|
* import { Result } from "effect"
|
|
@@ -296,7 +296,7 @@ export const isResult = result.isResult;
|
|
|
296
296
|
* - Acts as a TypeScript type guard, narrowing to `Failure<A, E>`
|
|
297
297
|
* - After narrowing, you can access `.failure` to read the error value
|
|
298
298
|
*
|
|
299
|
-
* **Example** (Narrowing to
|
|
299
|
+
* **Example** (Narrowing to failure)
|
|
300
300
|
*
|
|
301
301
|
* ```ts
|
|
302
302
|
* import { Result } from "effect"
|
|
@@ -328,7 +328,7 @@ export const isFailure = result.isFailure;
|
|
|
328
328
|
* - Acts as a TypeScript type guard, narrowing to `Success<A, E>`
|
|
329
329
|
* - After narrowing, you can access `.success` to read the value
|
|
330
330
|
*
|
|
331
|
-
* **Example** (Narrowing to
|
|
331
|
+
* **Example** (Narrowing to success)
|
|
332
332
|
*
|
|
333
333
|
* ```ts
|
|
334
334
|
* import { Result } from "effect"
|
|
@@ -922,7 +922,7 @@ export const orElse = /*#__PURE__*/dual(2, (self, that) => isFailure(self) ? tha
|
|
|
922
922
|
* - The error types are merged into a union (`E | E2`)
|
|
923
923
|
* - This is the monadic `bind` / `>>=` for `Result`
|
|
924
924
|
*
|
|
925
|
-
* **Example** (
|
|
925
|
+
* **Example** (Validating sequentially)
|
|
926
926
|
*
|
|
927
927
|
* ```ts
|
|
928
928
|
* import { pipe, Result } from "effect"
|
|
@@ -962,7 +962,7 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => isFailure(self) ? fail(
|
|
|
962
962
|
*
|
|
963
963
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
964
964
|
*
|
|
965
|
-
* **Example** (
|
|
965
|
+
* **Example** (Chaining Result values with different argument types)
|
|
966
966
|
*
|
|
967
967
|
* ```ts
|
|
968
968
|
* import { pipe, Result } from "effect"
|
|
@@ -1341,7 +1341,7 @@ export const transposeOption = self => {
|
|
|
1341
1341
|
* - `Some(a)` where `f(a)` is `Success(b)` becomes `Success(Some(b))`
|
|
1342
1342
|
* - `Some(a)` where `f(a)` is `Failure(e)` becomes `Failure(e)`
|
|
1343
1343
|
*
|
|
1344
|
-
* **Example** (
|
|
1344
|
+
* **Example** (Mapping and transposing in one step)
|
|
1345
1345
|
*
|
|
1346
1346
|
* ```ts
|
|
1347
1347
|
* import { Option, Result } from "effect"
|
|
@@ -1377,7 +1377,7 @@ export const transposeMapOption = /*#__PURE__*/dual(2, (self, f) => option_.isNo
|
|
|
1377
1377
|
* This is equivalent to `Result.succeed(Option.none())`, but reuses a shared
|
|
1378
1378
|
* `Success` wrapper instead of allocating one each time.
|
|
1379
1379
|
*
|
|
1380
|
-
* **Example** (
|
|
1380
|
+
* **Example** (Succeeding with None)
|
|
1381
1381
|
*
|
|
1382
1382
|
* ```ts
|
|
1383
1383
|
* import { Result } from "effect"
|
package/dist/Runtime.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export interface Teardown {
|
|
|
73
73
|
* The `130` code is used only when the Cause contains interruptions and no
|
|
74
74
|
* other failure reasons. Mixed causes use the squashed error path instead.
|
|
75
75
|
*
|
|
76
|
-
* **Example** (
|
|
76
|
+
* **Example** (Referencing default teardown)
|
|
77
77
|
*
|
|
78
78
|
* ```ts
|
|
79
79
|
* import { Exit, Runtime } from "effect"
|
package/dist/Runtime.js
CHANGED
|
@@ -36,7 +36,7 @@ import { constVoid, dual } from "effect/Function";
|
|
|
36
36
|
* The `130` code is used only when the Cause contains interruptions and no
|
|
37
37
|
* other failure reasons. Mixed causes use the squashed error path instead.
|
|
38
38
|
*
|
|
39
|
-
* **Example** (
|
|
39
|
+
* **Example** (Referencing default teardown)
|
|
40
40
|
*
|
|
41
41
|
* ```ts
|
|
42
42
|
* import { Exit, Runtime } from "effect"
|