effect 4.0.0-beta.82 → 4.0.0-beta.84
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/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 +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/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 +265 -120
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +285 -116
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +13 -9
- 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 +23 -10
- package/dist/internal/effect.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/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/cli/Prompt.js +2 -2
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +39 -0
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js.map +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/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/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 +1 -1
- 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/Reducer.ts +1 -1
- package/src/Result.ts +20 -20
- package/src/Runtime.ts +1 -1
- package/src/Schema.ts +314 -131
- package/src/SchemaAST.ts +20 -11
- 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 +29 -10
- package/src/internal/schema/cause.ts +26 -0
- package/src/internal/schema/schema.ts +36 -10
- 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/cli/Prompt.ts +1 -1
- package/src/unstable/httpapi/HttpApiScalar.ts +2 -2
- package/src/unstable/httpapi/HttpApiSchema.ts +18 -6
- package/src/unstable/rpc/Rpc.ts +1 -1
- package/src/unstable/rpc/RpcGroup.ts +3 -4
- 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/src/Cause.ts
CHANGED
|
@@ -61,7 +61,7 @@ export const ReasonTypeId: "~effect/Cause/Reason" = core.CauseReasonTypeId
|
|
|
61
61
|
* `Cause` implements `Equal` — two causes with the same reasons (by value)
|
|
62
62
|
* compare as equal.
|
|
63
63
|
*
|
|
64
|
-
* **Example** (
|
|
64
|
+
* **Example** (Creating and inspecting a cause)
|
|
65
65
|
*
|
|
66
66
|
* ```ts
|
|
67
67
|
* import { Cause } from "effect"
|
|
@@ -82,7 +82,7 @@ export interface Cause<out E> extends Pipeable, Inspectable, Equal {
|
|
|
82
82
|
/**
|
|
83
83
|
* Checks whether an arbitrary value is a `Cause`.
|
|
84
84
|
*
|
|
85
|
-
* **Example** (runtime type
|
|
85
|
+
* **Example** (Checking the runtime type)
|
|
86
86
|
*
|
|
87
87
|
* ```ts
|
|
88
88
|
* import { Cause } from "effect"
|
|
@@ -99,7 +99,7 @@ export const isCause: (self: unknown) => self is Cause<unknown> = core.isCause
|
|
|
99
99
|
/**
|
|
100
100
|
* Checks whether an arbitrary value is a `Reason` (`Fail`, `Die`, or `Interrupt`).
|
|
101
101
|
*
|
|
102
|
-
* **Example** (runtime type
|
|
102
|
+
* **Example** (Checking the runtime type)
|
|
103
103
|
*
|
|
104
104
|
* ```ts
|
|
105
105
|
* import { Cause } from "effect"
|
|
@@ -129,7 +129,7 @@ export const isReason: (self: unknown) => self is Reason<unknown> = core.isCause
|
|
|
129
129
|
* Every reason carries an `annotations` map and an `annotate` method for
|
|
130
130
|
* attaching tracing metadata.
|
|
131
131
|
*
|
|
132
|
-
* **Example** (
|
|
132
|
+
* **Example** (Narrowing a reason)
|
|
133
133
|
*
|
|
134
134
|
* ```ts
|
|
135
135
|
* import { Cause } from "effect"
|
|
@@ -153,7 +153,7 @@ export type Reason<E> = Fail<E> | Die | Interrupt
|
|
|
153
153
|
* Use as a predicate for `Array.filter` to pick out typed `Fail` reasons when
|
|
154
154
|
* iterating over `cause.reasons`.
|
|
155
155
|
*
|
|
156
|
-
* **Example** (
|
|
156
|
+
* **Example** (Filtering fail reasons)
|
|
157
157
|
*
|
|
158
158
|
* ```ts
|
|
159
159
|
* import { Cause } from "effect"
|
|
@@ -179,7 +179,7 @@ export const isFailReason: <E>(self: Reason<E>) => self is Fail<E> = core.isFail
|
|
|
179
179
|
* Use as a predicate for `Array.filter` to pick out `Die` (defect) reasons when
|
|
180
180
|
* iterating over `cause.reasons`.
|
|
181
181
|
*
|
|
182
|
-
* **Example** (
|
|
182
|
+
* **Example** (Filtering die reasons)
|
|
183
183
|
*
|
|
184
184
|
* ```ts
|
|
185
185
|
* import { Cause } from "effect"
|
|
@@ -205,7 +205,7 @@ export const isDieReason: <E>(self: Reason<E>) => self is Die = core.isDieReason
|
|
|
205
205
|
* Use as a predicate for `Array.filter` to pick out `Interrupt` reasons when
|
|
206
206
|
* iterating over `cause.reasons`.
|
|
207
207
|
*
|
|
208
|
-
* **Example** (
|
|
208
|
+
* **Example** (Filtering interrupt reasons)
|
|
209
209
|
*
|
|
210
210
|
* ```ts
|
|
211
211
|
* import { Cause } from "effect"
|
|
@@ -232,7 +232,7 @@ export declare namespace Cause {
|
|
|
232
232
|
/**
|
|
233
233
|
* Extracts the error type `E` from a `Cause<E>`.
|
|
234
234
|
*
|
|
235
|
-
* **Example** (
|
|
235
|
+
* **Example** (Extracting the error type)
|
|
236
236
|
*
|
|
237
237
|
* ```ts
|
|
238
238
|
* import type { Cause } from "effect"
|
|
@@ -278,7 +278,7 @@ export declare namespace Reason {
|
|
|
278
278
|
/**
|
|
279
279
|
* Extracts the error type `E` from a `Reason<E>`.
|
|
280
280
|
*
|
|
281
|
-
* **Example** (
|
|
281
|
+
* **Example** (Extracting the error type)
|
|
282
282
|
*
|
|
283
283
|
* ```ts
|
|
284
284
|
* import type { Cause } from "effect"
|
|
@@ -307,7 +307,7 @@ export declare namespace Reason {
|
|
|
307
307
|
* typed error channel. Use {@link isDieReason} to narrow a `Reason`
|
|
308
308
|
* to this type.
|
|
309
309
|
*
|
|
310
|
-
* **Example** (
|
|
310
|
+
* **Example** (Accessing the defect)
|
|
311
311
|
*
|
|
312
312
|
* ```ts
|
|
313
313
|
* import { Cause } from "effect"
|
|
@@ -342,7 +342,7 @@ export interface Die extends Cause.ReasonProto<"Die"> {
|
|
|
342
342
|
* The `error` property carries the typed value `E`. Use {@link isFailReason}
|
|
343
343
|
* to narrow a `Reason` to this type.
|
|
344
344
|
*
|
|
345
|
-
* **Example** (
|
|
345
|
+
* **Example** (Accessing the error)
|
|
346
346
|
*
|
|
347
347
|
* ```ts
|
|
348
348
|
* import { Cause } from "effect"
|
|
@@ -372,7 +372,7 @@ export interface Fail<out E> extends Cause.ReasonProto<"Fail"> {
|
|
|
372
372
|
*
|
|
373
373
|
* Use {@link isInterruptReason} to narrow a `Reason` to this type.
|
|
374
374
|
*
|
|
375
|
-
* **Example** (
|
|
375
|
+
* **Example** (Accessing the fiber ID)
|
|
376
376
|
*
|
|
377
377
|
* ```ts
|
|
378
378
|
* import { Cause } from "effect"
|
|
@@ -410,7 +410,7 @@ export interface Interrupt extends Cause.ReasonProto<"Interrupt"> {
|
|
|
410
410
|
* The `reasons` array is stored as provided. Treat the array as immutable
|
|
411
411
|
* after passing it to this function.
|
|
412
412
|
*
|
|
413
|
-
* **Example** (
|
|
413
|
+
* **Example** (Building a cause from reasons)
|
|
414
414
|
*
|
|
415
415
|
* ```ts
|
|
416
416
|
* import { Cause } from "effect"
|
|
@@ -445,7 +445,7 @@ export const fromReasons: <E>(
|
|
|
445
445
|
* Represents the absence of failure. Combining any cause with `empty` via
|
|
446
446
|
* {@link combine} returns the original cause unchanged.
|
|
447
447
|
*
|
|
448
|
-
* **Example** (
|
|
448
|
+
* **Example** (Combining with the empty cause)
|
|
449
449
|
*
|
|
450
450
|
* ```ts
|
|
451
451
|
* import { Cause } from "effect"
|
|
@@ -471,7 +471,7 @@ export const empty: Cause<never> = core.causeEmpty
|
|
|
471
471
|
*
|
|
472
472
|
* Use to construct a cause from an expected typed error.
|
|
473
473
|
*
|
|
474
|
-
* **Example** (
|
|
474
|
+
* **Example** (Creating a fail cause)
|
|
475
475
|
*
|
|
476
476
|
* ```ts
|
|
477
477
|
* import { Cause } from "effect"
|
|
@@ -497,7 +497,7 @@ export const fail: <E>(error: E) => Cause<E> = core.causeFail
|
|
|
497
497
|
*
|
|
498
498
|
* Use to construct a cause from an untyped defect or unexpected thrown value.
|
|
499
499
|
*
|
|
500
|
-
* **Example** (
|
|
500
|
+
* **Example** (Creating a die cause)
|
|
501
501
|
*
|
|
502
502
|
* ```ts
|
|
503
503
|
* import { Cause } from "effect"
|
|
@@ -519,7 +519,7 @@ export const die: (defect: unknown) => Cause<never> = core.causeDie
|
|
|
519
519
|
* Creates a `Cause` containing a single `Interrupt` reason,
|
|
520
520
|
* optionally carrying the interrupting fiber's ID.
|
|
521
521
|
*
|
|
522
|
-
* **Example** (
|
|
522
|
+
* **Example** (Creating an interrupt cause)
|
|
523
523
|
*
|
|
524
524
|
* ```ts
|
|
525
525
|
* import { Cause } from "effect"
|
|
@@ -545,7 +545,7 @@ export const interrupt: (fiberId?: number | undefined) => Cause<never> = effect.
|
|
|
545
545
|
* Use when constructing a standalone typed failure reason for
|
|
546
546
|
* {@link fromReasons} or direct comparison.
|
|
547
547
|
*
|
|
548
|
-
* **Example** (
|
|
548
|
+
* **Example** (Creating a Fail reason)
|
|
549
549
|
*
|
|
550
550
|
* ```ts
|
|
551
551
|
* import { Cause } from "effect"
|
|
@@ -571,7 +571,7 @@ export const makeFailReason = <E>(error: E): Fail<E> => new core.Fail(error)
|
|
|
571
571
|
* Use when constructing a standalone defect reason for {@link fromReasons} or
|
|
572
572
|
* direct comparison.
|
|
573
573
|
*
|
|
574
|
-
* **Example** (
|
|
574
|
+
* **Example** (Creating a Die reason)
|
|
575
575
|
*
|
|
576
576
|
* ```ts
|
|
577
577
|
* import { Cause } from "effect"
|
|
@@ -598,7 +598,7 @@ export const makeDieReason = (defect: unknown): Die => new core.Die(defect)
|
|
|
598
598
|
* Use when constructing a standalone interrupt reason for {@link fromReasons}
|
|
599
599
|
* or direct comparison.
|
|
600
600
|
*
|
|
601
|
-
* **Example** (
|
|
601
|
+
* **Example** (Creating an Interrupt reason)
|
|
602
602
|
*
|
|
603
603
|
* ```ts
|
|
604
604
|
* import { Cause } from "effect"
|
|
@@ -624,7 +624,7 @@ export const makeInterruptReason: (fiberId?: number | undefined) => Interrupt =
|
|
|
624
624
|
*
|
|
625
625
|
* Use when you need to detect failures caused only by interruption.
|
|
626
626
|
*
|
|
627
|
-
* **Example** (
|
|
627
|
+
* **Example** (Checking interrupt-only causes)
|
|
628
628
|
*
|
|
629
629
|
* ```ts
|
|
630
630
|
* import { Cause } from "effect"
|
|
@@ -657,7 +657,7 @@ export const hasInterruptsOnly: <E>(self: Cause<E>) => boolean = effect.hasInter
|
|
|
657
657
|
* containing the mapped failures. If the cause has no `Fail` reasons, the
|
|
658
658
|
* original cause is returned unchanged.
|
|
659
659
|
*
|
|
660
|
-
* **Example** (
|
|
660
|
+
* **Example** (Mapping errors to uppercase)
|
|
661
661
|
*
|
|
662
662
|
* ```ts
|
|
663
663
|
* import { Cause } from "effect"
|
|
@@ -690,7 +690,7 @@ export const map: {
|
|
|
690
690
|
* containing the mapped failures. If the cause has no `Fail` reasons, the
|
|
691
691
|
* original cause is returned unchanged.
|
|
692
692
|
*
|
|
693
|
-
* **Example** (
|
|
693
|
+
* **Example** (Mapping errors to uppercase)
|
|
694
694
|
*
|
|
695
695
|
* ```ts
|
|
696
696
|
* import { Cause } from "effect"
|
|
@@ -723,7 +723,7 @@ export const map: {
|
|
|
723
723
|
* containing the mapped failures. If the cause has no `Fail` reasons, the
|
|
724
724
|
* original cause is returned unchanged.
|
|
725
725
|
*
|
|
726
|
-
* **Example** (
|
|
726
|
+
* **Example** (Mapping errors to uppercase)
|
|
727
727
|
*
|
|
728
728
|
* ```ts
|
|
729
729
|
* import { Cause } from "effect"
|
|
@@ -756,7 +756,7 @@ export const map: {
|
|
|
756
756
|
* - If the result is structurally equal to `self`, `self` is returned
|
|
757
757
|
* (referential shortcut).
|
|
758
758
|
*
|
|
759
|
-
* **Example** (
|
|
759
|
+
* **Example** (Combining two causes)
|
|
760
760
|
*
|
|
761
761
|
* ```ts
|
|
762
762
|
* import { Cause } from "effect"
|
|
@@ -788,7 +788,7 @@ export const combine: {
|
|
|
788
788
|
* - If the result is structurally equal to `self`, `self` is returned
|
|
789
789
|
* (referential shortcut).
|
|
790
790
|
*
|
|
791
|
-
* **Example** (
|
|
791
|
+
* **Example** (Combining two causes)
|
|
792
792
|
*
|
|
793
793
|
* ```ts
|
|
794
794
|
* import { Cause } from "effect"
|
|
@@ -820,7 +820,7 @@ export const combine: {
|
|
|
820
820
|
* - If the result is structurally equal to `self`, `self` is returned
|
|
821
821
|
* (referential shortcut).
|
|
822
822
|
*
|
|
823
|
-
* **Example** (
|
|
823
|
+
* **Example** (Combining two causes)
|
|
824
824
|
*
|
|
825
825
|
* ```ts
|
|
826
826
|
* import { Cause } from "effect"
|
|
@@ -864,7 +864,7 @@ export const combine: {
|
|
|
864
864
|
* This function is lossy. Use {@link prettyErrors} or iterate `cause.reasons`
|
|
865
865
|
* when you need all failures.
|
|
866
866
|
*
|
|
867
|
-
* **Example** (
|
|
867
|
+
* **Example** (Squashing a cause)
|
|
868
868
|
*
|
|
869
869
|
* ```ts
|
|
870
870
|
* import { Cause } from "effect"
|
|
@@ -889,7 +889,7 @@ export const squash: <E>(self: Cause<E>) => unknown = effect.causeSquash
|
|
|
889
889
|
* Use to check whether a cause includes typed failures before extracting,
|
|
890
890
|
* mapping, or rendering them.
|
|
891
891
|
*
|
|
892
|
-
* **Example** (
|
|
892
|
+
* **Example** (Checking for typed errors)
|
|
893
893
|
*
|
|
894
894
|
* ```ts
|
|
895
895
|
* import { Cause } from "effect"
|
|
@@ -917,7 +917,7 @@ export const hasFails: <E>(self: Cause<E>) => boolean = effect.hasFails
|
|
|
917
917
|
* Use when you need the full `Fail` reason from a `Cause`, including
|
|
918
918
|
* annotations.
|
|
919
919
|
*
|
|
920
|
-
* **Example** (
|
|
920
|
+
* **Example** (Extracting the first Fail reason)
|
|
921
921
|
*
|
|
922
922
|
* ```ts
|
|
923
923
|
* import { Cause, Result } from "effect"
|
|
@@ -947,7 +947,7 @@ export const findFail: <E>(self: Cause<E>) => Result.Result<Fail<E>, Cause<never
|
|
|
947
947
|
* Use when you need the first typed error value from a `Cause` as a `Result`
|
|
948
948
|
* that preserves the original cause when no match is found.
|
|
949
949
|
*
|
|
950
|
-
* **Example** (
|
|
950
|
+
* **Example** (Extracting the first error value)
|
|
951
951
|
*
|
|
952
952
|
* ```ts
|
|
953
953
|
* import { Cause, Result } from "effect"
|
|
@@ -975,7 +975,7 @@ export const findError: <E>(self: Cause<E>) => Result.Result<E, Cause<never>> =
|
|
|
975
975
|
* Use when you need the first typed error value from a `Cause` as an `Option`,
|
|
976
976
|
* discarding the original cause.
|
|
977
977
|
*
|
|
978
|
-
* **Example** (
|
|
978
|
+
* **Example** (Extracting an error as Option)
|
|
979
979
|
*
|
|
980
980
|
* ```ts
|
|
981
981
|
* import { Cause, Option } from "effect"
|
|
@@ -1002,7 +1002,7 @@ export const findErrorOption: <E>(input: Cause<E>) => Option<E> = effect.findErr
|
|
|
1002
1002
|
* Use to check whether a cause includes defects before extracting or rendering
|
|
1003
1003
|
* them.
|
|
1004
1004
|
*
|
|
1005
|
-
* **Example** (
|
|
1005
|
+
* **Example** (Checking for defects)
|
|
1006
1006
|
*
|
|
1007
1007
|
* ```ts
|
|
1008
1008
|
* import { Cause } from "effect"
|
|
@@ -1029,7 +1029,7 @@ export const hasDies: <E>(self: Cause<E>) => boolean = effect.hasDies
|
|
|
1029
1029
|
* Use when you need the full `Die` reason from a `Cause`, including
|
|
1030
1030
|
* annotations.
|
|
1031
1031
|
*
|
|
1032
|
-
* **Example** (
|
|
1032
|
+
* **Example** (Extracting the first Die reason)
|
|
1033
1033
|
*
|
|
1034
1034
|
* ```ts
|
|
1035
1035
|
* import { Cause, Result } from "effect"
|
|
@@ -1058,7 +1058,7 @@ export const findDie: <E>(self: Cause<E>) => Result.Result<Die, Cause<E>> = effe
|
|
|
1058
1058
|
* Use when you need the first defect value from a `Cause` as a `Result`,
|
|
1059
1059
|
* without the full `Die` reason.
|
|
1060
1060
|
*
|
|
1061
|
-
* **Example** (
|
|
1061
|
+
* **Example** (Extracting the first defect)
|
|
1062
1062
|
*
|
|
1063
1063
|
* ```ts
|
|
1064
1064
|
* import { Cause, Result } from "effect"
|
|
@@ -1080,7 +1080,7 @@ export const findDefect: <E>(self: Cause<E>) => Result.Result<unknown, Cause<E>>
|
|
|
1080
1080
|
/**
|
|
1081
1081
|
* Returns `true` if the cause contains at least one `Interrupt` reason.
|
|
1082
1082
|
*
|
|
1083
|
-
* **Example** (
|
|
1083
|
+
* **Example** (Checking for interruptions)
|
|
1084
1084
|
*
|
|
1085
1085
|
* ```ts
|
|
1086
1086
|
* import { Cause } from "effect"
|
|
@@ -1108,7 +1108,7 @@ export const hasInterrupts: <E>(self: Cause<E>) => boolean = effect.hasInterrupt
|
|
|
1108
1108
|
* Use when you need the first `Interrupt` reason from a `Cause`, including the
|
|
1109
1109
|
* fiber ID and annotations.
|
|
1110
1110
|
*
|
|
1111
|
-
* **Example** (
|
|
1111
|
+
* **Example** (Extracting the first interrupt)
|
|
1112
1112
|
*
|
|
1113
1113
|
* ```ts
|
|
1114
1114
|
* import { Cause, Result } from "effect"
|
|
@@ -1136,7 +1136,7 @@ export const findInterrupt: <E>(self: Cause<E>) => Result.Result<Interrupt, Caus
|
|
|
1136
1136
|
* Use when you need interrupting fiber IDs as a set, with absence represented
|
|
1137
1137
|
* as an empty set.
|
|
1138
1138
|
*
|
|
1139
|
-
* **Example** (
|
|
1139
|
+
* **Example** (Collecting interruptors)
|
|
1140
1140
|
*
|
|
1141
1141
|
* ```ts
|
|
1142
1142
|
* import { Cause } from "effect"
|
|
@@ -1172,7 +1172,7 @@ export const interruptors: <E>(self: Cause<E>) => ReadonlySet<number> = effect.c
|
|
|
1172
1172
|
* function succeeds with an empty `Set` when every interrupt reason has an
|
|
1173
1173
|
* undefined fiber ID.
|
|
1174
1174
|
*
|
|
1175
|
-
* **Example** (
|
|
1175
|
+
* **Example** (Extracting interruptors with Result)
|
|
1176
1176
|
*
|
|
1177
1177
|
* ```ts
|
|
1178
1178
|
* import { Cause, Result } from "effect"
|
|
@@ -1218,7 +1218,7 @@ export const filterInterruptors: <E>(self: Cause<E>) => Result.Result<Set<number
|
|
|
1218
1218
|
*
|
|
1219
1219
|
* An empty cause returns an empty array.
|
|
1220
1220
|
*
|
|
1221
|
-
* **Example** (
|
|
1221
|
+
* **Example** (Converting a cause to errors)
|
|
1222
1222
|
*
|
|
1223
1223
|
* ```ts
|
|
1224
1224
|
* import { Cause } from "effect"
|
|
@@ -1266,7 +1266,7 @@ export const prettyErrors: <E>(self: Cause<E>) => Array<Error> = effect.causePre
|
|
|
1266
1266
|
* Rendering an empty cause produces an empty string because there are no
|
|
1267
1267
|
* errors to render.
|
|
1268
1268
|
*
|
|
1269
|
-
* **Example** (
|
|
1269
|
+
* **Example** (Rendering a cause)
|
|
1270
1270
|
*
|
|
1271
1271
|
* ```ts
|
|
1272
1272
|
* import { Cause } from "effect"
|
|
@@ -1293,7 +1293,7 @@ export const pretty: <E>(cause: Cause<E>) => string = effect.causePretty
|
|
|
1293
1293
|
* `TimeoutError`, `IllegalArgumentError`, `ExceededCapacityError`,
|
|
1294
1294
|
* `AsyncFiberError`, and `UnknownError`) implement this interface.
|
|
1295
1295
|
*
|
|
1296
|
-
* **Example** (
|
|
1296
|
+
* **Example** (Yielding an error in Effect.gen)
|
|
1297
1297
|
*
|
|
1298
1298
|
* ```ts
|
|
1299
1299
|
* import { Cause, Effect } from "effect"
|
|
@@ -1316,7 +1316,7 @@ export interface YieldableError extends Error, Pipeable, Inspectable {
|
|
|
1316
1316
|
/**
|
|
1317
1317
|
* Checks whether an arbitrary value is a `NoSuchElementError`.
|
|
1318
1318
|
*
|
|
1319
|
-
* **Example** (runtime type
|
|
1319
|
+
* **Example** (Checking the runtime type)
|
|
1320
1320
|
*
|
|
1321
1321
|
* ```ts
|
|
1322
1322
|
* import { Cause } from "effect"
|
|
@@ -1357,7 +1357,7 @@ export const NoSuchElementErrorTypeId: "~effect/Cause/NoSuchElementError" = core
|
|
|
1357
1357
|
* expected case. This error is mainly for APIs that intentionally turn absence
|
|
1358
1358
|
* into a thrown value or failed effect.
|
|
1359
1359
|
*
|
|
1360
|
-
* **Example** (
|
|
1360
|
+
* **Example** (Creating and checking a NoSuchElementError)
|
|
1361
1361
|
*
|
|
1362
1362
|
* ```ts
|
|
1363
1363
|
* import { Cause } from "effect"
|
|
@@ -1383,7 +1383,7 @@ export interface NoSuchElementError extends YieldableError {
|
|
|
1383
1383
|
* Use to create the error value for APIs that intentionally fail when an
|
|
1384
1384
|
* expected element is absent.
|
|
1385
1385
|
*
|
|
1386
|
-
* **Example** (
|
|
1386
|
+
* **Example** (Creating a NoSuchElementError)
|
|
1387
1387
|
*
|
|
1388
1388
|
* ```ts
|
|
1389
1389
|
* import { Cause } from "effect"
|
|
@@ -1402,7 +1402,7 @@ export const NoSuchElementError: new(message?: string) => NoSuchElementError = c
|
|
|
1402
1402
|
/**
|
|
1403
1403
|
* Checks whether an arbitrary value is a `Done` signal.
|
|
1404
1404
|
*
|
|
1405
|
-
* **Example** (runtime type
|
|
1405
|
+
* **Example** (Checking the runtime type)
|
|
1406
1406
|
*
|
|
1407
1407
|
* ```ts
|
|
1408
1408
|
* import { Cause } from "effect"
|
|
@@ -1439,7 +1439,7 @@ export const DoneTypeId: "~effect/Cause/Done" = core.DoneTypeId
|
|
|
1439
1439
|
* successful completion. The optional `value` field can carry a final
|
|
1440
1440
|
* leftover payload.
|
|
1441
1441
|
*
|
|
1442
|
-
* **Example** (
|
|
1442
|
+
* **Example** (Signaling queue completion)
|
|
1443
1443
|
*
|
|
1444
1444
|
* ```ts
|
|
1445
1445
|
* import { Cause, Effect, Queue } from "effect"
|
|
@@ -1509,7 +1509,7 @@ export const Done: <A = void>(value?: A) => Done<A> = core.Done
|
|
|
1509
1509
|
*
|
|
1510
1510
|
* Use when you model stream or queue completion through the error channel.
|
|
1511
1511
|
*
|
|
1512
|
-
* **Example** (
|
|
1512
|
+
* **Example** (Failing with Done)
|
|
1513
1513
|
*
|
|
1514
1514
|
* ```ts
|
|
1515
1515
|
* import { Cause, Effect } from "effect"
|
|
@@ -1539,7 +1539,7 @@ export const TimeoutErrorTypeId: "~effect/Cause/TimeoutError" = effect.TimeoutEr
|
|
|
1539
1539
|
/**
|
|
1540
1540
|
* Checks whether an arbitrary value is a `TimeoutError`.
|
|
1541
1541
|
*
|
|
1542
|
-
* **Example** (runtime type
|
|
1542
|
+
* **Example** (Checking the runtime type)
|
|
1543
1543
|
*
|
|
1544
1544
|
* ```ts
|
|
1545
1545
|
* import { Cause } from "effect"
|
|
@@ -1561,7 +1561,7 @@ export const isTimeoutError: (u: unknown) => u is TimeoutError = effect.isTimeou
|
|
|
1561
1561
|
* Produced by `Effect.timeout` and related APIs. Implements
|
|
1562
1562
|
* `YieldableError`.
|
|
1563
1563
|
*
|
|
1564
|
-
* **Example** (
|
|
1564
|
+
* **Example** (Creating and checking a TimeoutError)
|
|
1565
1565
|
*
|
|
1566
1566
|
* ```ts
|
|
1567
1567
|
* import { Cause } from "effect"
|
|
@@ -1582,7 +1582,7 @@ export interface TimeoutError extends YieldableError {
|
|
|
1582
1582
|
/**
|
|
1583
1583
|
* Constructs a `TimeoutError` with an optional message.
|
|
1584
1584
|
*
|
|
1585
|
-
* **Example** (
|
|
1585
|
+
* **Example** (Creating a TimeoutError)
|
|
1586
1586
|
*
|
|
1587
1587
|
* ```ts
|
|
1588
1588
|
* import { Cause } from "effect"
|
|
@@ -1607,7 +1607,7 @@ export const IllegalArgumentErrorTypeId: "~effect/Cause/IllegalArgumentError" =
|
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Checks whether an arbitrary value is an `IllegalArgumentError`.
|
|
1609
1609
|
*
|
|
1610
|
-
* **Example** (runtime type
|
|
1610
|
+
* **Example** (Checking the runtime type)
|
|
1611
1611
|
*
|
|
1612
1612
|
* ```ts
|
|
1613
1613
|
* import { Cause } from "effect"
|
|
@@ -1629,7 +1629,7 @@ export const isIllegalArgumentError: (u: unknown) => u is IllegalArgumentError =
|
|
|
1629
1629
|
*
|
|
1630
1630
|
* Implements `YieldableError`.
|
|
1631
1631
|
*
|
|
1632
|
-
* **Example** (
|
|
1632
|
+
* **Example** (Creating and checking an IllegalArgumentError)
|
|
1633
1633
|
*
|
|
1634
1634
|
* ```ts
|
|
1635
1635
|
* import { Cause } from "effect"
|
|
@@ -1650,7 +1650,7 @@ export interface IllegalArgumentError extends YieldableError {
|
|
|
1650
1650
|
/**
|
|
1651
1651
|
* Constructs an `IllegalArgumentError` with an optional message.
|
|
1652
1652
|
*
|
|
1653
|
-
* **Example** (
|
|
1653
|
+
* **Example** (Creating an IllegalArgumentError)
|
|
1654
1654
|
*
|
|
1655
1655
|
* ```ts
|
|
1656
1656
|
* import { Cause } from "effect"
|
|
@@ -1667,7 +1667,7 @@ export const IllegalArgumentError: new(message?: string) => IllegalArgumentError
|
|
|
1667
1667
|
/**
|
|
1668
1668
|
* Checks whether an arbitrary value is an `ExceededCapacityError`.
|
|
1669
1669
|
*
|
|
1670
|
-
* **Example** (runtime type
|
|
1670
|
+
* **Example** (Checking the runtime type)
|
|
1671
1671
|
*
|
|
1672
1672
|
* ```ts
|
|
1673
1673
|
* import { Cause } from "effect"
|
|
@@ -1702,7 +1702,7 @@ export const ExceededCapacityErrorTypeId: "~effect/Cause/ExceededCapacityError"
|
|
|
1702
1702
|
*
|
|
1703
1703
|
* Implements `YieldableError`.
|
|
1704
1704
|
*
|
|
1705
|
-
* **Example** (
|
|
1705
|
+
* **Example** (Creating and checking an ExceededCapacityError)
|
|
1706
1706
|
*
|
|
1707
1707
|
* ```ts
|
|
1708
1708
|
* import { Cause } from "effect"
|
|
@@ -1727,7 +1727,7 @@ export interface ExceededCapacityError extends YieldableError {
|
|
|
1727
1727
|
*
|
|
1728
1728
|
* Use to create the error value for bounded-resource capacity failures.
|
|
1729
1729
|
*
|
|
1730
|
-
* **Example** (
|
|
1730
|
+
* **Example** (Creating an ExceededCapacityError)
|
|
1731
1731
|
*
|
|
1732
1732
|
* ```ts
|
|
1733
1733
|
* import { Cause } from "effect"
|
|
@@ -1755,7 +1755,7 @@ export const AsyncFiberErrorTypeId: "~effect/Cause/AsyncFiberError" = effect.Asy
|
|
|
1755
1755
|
/**
|
|
1756
1756
|
* Checks whether an arbitrary value is an `AsyncFiberError`.
|
|
1757
1757
|
*
|
|
1758
|
-
* **Example** (runtime type
|
|
1758
|
+
* **Example** (Checking the runtime type)
|
|
1759
1759
|
*
|
|
1760
1760
|
* ```ts
|
|
1761
1761
|
* import { Cause } from "effect"
|
|
@@ -1786,7 +1786,7 @@ export const isAsyncFiberError: (u: unknown) => u is AsyncFiberError = effect.is
|
|
|
1786
1786
|
* The `fiber` property stores the fiber that could not be synchronously
|
|
1787
1787
|
* resolved. This error implements `YieldableError`.
|
|
1788
1788
|
*
|
|
1789
|
-
* **Example** (
|
|
1789
|
+
* **Example** (Accessing the fiber)
|
|
1790
1790
|
*
|
|
1791
1791
|
* ```ts
|
|
1792
1792
|
* import { Cause } from "effect"
|
|
@@ -1817,7 +1817,7 @@ export interface AsyncFiberError extends YieldableError {
|
|
|
1817
1817
|
* Use to create the error value for a fiber that could not be completed by a
|
|
1818
1818
|
* synchronous runner.
|
|
1819
1819
|
*
|
|
1820
|
-
* **Example** (
|
|
1820
|
+
* **Example** (Creating an AsyncFiberError)
|
|
1821
1821
|
*
|
|
1822
1822
|
* ```ts
|
|
1823
1823
|
* import { Cause } from "effect"
|
|
@@ -1847,7 +1847,7 @@ export const UnknownErrorTypeId: "~effect/Cause/UnknownError" = effect.UnknownEr
|
|
|
1847
1847
|
/**
|
|
1848
1848
|
* Checks whether an arbitrary value is an `UnknownError`.
|
|
1849
1849
|
*
|
|
1850
|
-
* **Example** (runtime type
|
|
1850
|
+
* **Example** (Checking the runtime type)
|
|
1851
1851
|
*
|
|
1852
1852
|
* ```ts
|
|
1853
1853
|
* import { Cause } from "effect"
|
|
@@ -1870,7 +1870,7 @@ export const isUnknownError: (u: unknown) => u is UnknownError = effect.isUnknow
|
|
|
1870
1870
|
* typed error. The original value is stored in the `cause` property inherited
|
|
1871
1871
|
* from `Error`. Implements `YieldableError`.
|
|
1872
1872
|
*
|
|
1873
|
-
* **Example** (
|
|
1873
|
+
* **Example** (Creating and checking an UnknownError)
|
|
1874
1874
|
*
|
|
1875
1875
|
* ```ts
|
|
1876
1876
|
* import { Cause } from "effect"
|
|
@@ -1893,7 +1893,7 @@ export interface UnknownError extends YieldableError {
|
|
|
1893
1893
|
* cause (stored in `Error.cause`); the second is an optional human-readable
|
|
1894
1894
|
* message.
|
|
1895
1895
|
*
|
|
1896
|
-
* **Example** (
|
|
1896
|
+
* **Example** (Creating an UnknownError)
|
|
1897
1897
|
*
|
|
1898
1898
|
* ```ts
|
|
1899
1899
|
* import { Cause } from "effect"
|
|
@@ -1924,7 +1924,7 @@ export const UnknownError: new(cause: unknown, message?: string) => UnknownError
|
|
|
1924
1924
|
* - By default, existing keys are preserved. Pass `{ overwrite: true }` to
|
|
1925
1925
|
* replace them.
|
|
1926
1926
|
*
|
|
1927
|
-
* **Example** (
|
|
1927
|
+
* **Example** (Annotating a cause)
|
|
1928
1928
|
*
|
|
1929
1929
|
* ```ts
|
|
1930
1930
|
* import { Cause, Context } from "effect"
|
|
@@ -1961,7 +1961,7 @@ export const annotate: {
|
|
|
1961
1961
|
* - By default, existing keys are preserved. Pass `{ overwrite: true }` to
|
|
1962
1962
|
* replace them.
|
|
1963
1963
|
*
|
|
1964
|
-
* **Example** (
|
|
1964
|
+
* **Example** (Annotating a cause)
|
|
1965
1965
|
*
|
|
1966
1966
|
* ```ts
|
|
1967
1967
|
* import { Cause, Context } from "effect"
|
|
@@ -2001,7 +2001,7 @@ export const annotate: {
|
|
|
2001
2001
|
* - By default, existing keys are preserved. Pass `{ overwrite: true }` to
|
|
2002
2002
|
* replace them.
|
|
2003
2003
|
*
|
|
2004
|
-
* **Example** (
|
|
2004
|
+
* **Example** (Annotating a cause)
|
|
2005
2005
|
*
|
|
2006
2006
|
* ```ts
|
|
2007
2007
|
* import { Cause, Context } from "effect"
|
|
@@ -2035,7 +2035,7 @@ export const annotate: {
|
|
|
2035
2035
|
* Use when you need tracing metadata (e.g. `StackTrace`) from
|
|
2036
2036
|
* a specific reason rather than the whole cause.
|
|
2037
2037
|
*
|
|
2038
|
-
* **Example** (
|
|
2038
|
+
* **Example** (Reading reason annotations)
|
|
2039
2039
|
*
|
|
2040
2040
|
* ```ts
|
|
2041
2041
|
* import { Cause, Context } from "effect"
|
|
@@ -2067,7 +2067,7 @@ export const reasonAnnotations: <E>(self: Reason<E>) => Context.Context<never> =
|
|
|
2067
2067
|
* When multiple reasons contain the same annotation key, the value from the
|
|
2068
2068
|
* later reason wins.
|
|
2069
2069
|
*
|
|
2070
|
-
* **Example** (
|
|
2070
|
+
* **Example** (Reading merged annotations)
|
|
2071
2071
|
*
|
|
2072
2072
|
* ```ts
|
|
2073
2073
|
* import { Cause, Context } from "effect"
|
package/src/Channel.ts
CHANGED
|
@@ -913,7 +913,7 @@ export const sync = <A>(evaluate: LazyArg<A>): Channel<A> => fromEffect(Effect.s
|
|
|
913
913
|
/**
|
|
914
914
|
* Represents a `Channel` that emits no elements.
|
|
915
915
|
*
|
|
916
|
-
* **Example** (
|
|
916
|
+
* **Example** (Creating empty channels)
|
|
917
917
|
*
|
|
918
918
|
* ```ts
|
|
919
919
|
* import { Channel } from "effect"
|
|
@@ -938,7 +938,7 @@ export const empty: Channel<never> = fromPull(Effect.succeed(Cause.done()))
|
|
|
938
938
|
/**
|
|
939
939
|
* Represents a `Channel` that never completes.
|
|
940
940
|
*
|
|
941
|
-
* **Example** (
|
|
941
|
+
* **Example** (Creating non-terminating channels)
|
|
942
942
|
*
|
|
943
943
|
* ```ts
|
|
944
944
|
* import { Channel } from "effect"
|
|
@@ -2546,7 +2546,7 @@ export const tap: {
|
|
|
2546
2546
|
* sequentially. Use `options.concurrency` and `options.bufferSize` to run child
|
|
2547
2547
|
* channels concurrently.
|
|
2548
2548
|
*
|
|
2549
|
-
* **Example** (
|
|
2549
|
+
* **Example** (Flat mapping channel output)
|
|
2550
2550
|
*
|
|
2551
2551
|
* ```ts
|
|
2552
2552
|
* import { Channel, Data } from "effect"
|
|
@@ -2584,7 +2584,7 @@ export const flatMap: {
|
|
|
2584
2584
|
* sequentially. Use `options.concurrency` and `options.bufferSize` to run child
|
|
2585
2585
|
* channels concurrently.
|
|
2586
2586
|
*
|
|
2587
|
-
* **Example** (
|
|
2587
|
+
* **Example** (Flat mapping channel output)
|
|
2588
2588
|
*
|
|
2589
2589
|
* ```ts
|
|
2590
2590
|
* import { Channel, Data } from "effect"
|
|
@@ -2638,7 +2638,7 @@ export const flatMap: {
|
|
|
2638
2638
|
* sequentially. Use `options.concurrency` and `options.bufferSize` to run child
|
|
2639
2639
|
* channels concurrently.
|
|
2640
2640
|
*
|
|
2641
|
-
* **Example** (
|
|
2641
|
+
* **Example** (Flat mapping channel output)
|
|
2642
2642
|
*
|
|
2643
2643
|
* ```ts
|
|
2644
2644
|
* import { Channel, Data } from "effect"
|
package/src/Clock.ts
CHANGED
|
@@ -118,7 +118,7 @@ export const Clock: Context.Reference<Clock> = effect.ClockRef
|
|
|
118
118
|
* Use when you need the full Clock service interface to perform multiple time
|
|
119
119
|
* operations or call unsafe variants within a single effect.
|
|
120
120
|
*
|
|
121
|
-
* **Example** (
|
|
121
|
+
* **Example** (Accessing the current Clock service)
|
|
122
122
|
*
|
|
123
123
|
* ```ts
|
|
124
124
|
* import { Clock, Effect } from "effect"
|