effect 4.0.0-beta.10 → 4.0.0-beta.11
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/Channel.d.ts +7 -7
- package/dist/Effect.d.ts +217 -8
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +46 -0
- package/dist/Effect.js.map +1 -1
- package/dist/ErrorReporter.d.ts +376 -0
- package/dist/ErrorReporter.d.ts.map +1 -0
- package/dist/ErrorReporter.js +246 -0
- package/dist/ErrorReporter.js.map +1 -0
- package/dist/LogLevel.d.ts +5 -0
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +25 -91
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +2 -3
- package/dist/Logger.js.map +1 -1
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +0 -1
- package/dist/Queue.js.map +1 -1
- package/dist/References.d.ts +3 -3
- package/dist/References.d.ts.map +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +2 -1
- package/dist/SchemaAST.js.map +1 -1
- package/dist/Stream.d.ts +5 -5
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/effect.js +54 -4
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/hashMap.js +2 -2
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +41 -0
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/cli/CliOutput.js +37 -6
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +199 -7
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +116 -6
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +60 -2
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +11 -1
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +33 -8
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/CommandDescriptor.js +7 -2
- package/dist/unstable/cli/internal/completions/CommandDescriptor.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +10 -2
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +27 -10
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +12 -7
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +8 -26
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +11 -27
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +2 -2
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +5 -5
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +2 -1
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +2 -0
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +11 -0
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +29 -9
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +7 -4
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +6 -0
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +22 -1
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +4 -0
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +6 -0
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +131 -0
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +1 -1
- package/src/Channel.ts +9 -9
- package/src/Effect.ts +235 -8
- package/src/ErrorReporter.ts +459 -0
- package/src/LogLevel.ts +6 -0
- package/src/Logger.ts +28 -95
- package/src/Queue.ts +0 -1
- package/src/References.ts +4 -4
- package/src/SchemaAST.ts +2 -1
- package/src/Stream.ts +7 -7
- package/src/index.ts +5 -0
- package/src/internal/effect.ts +137 -14
- package/src/internal/hashMap.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +71 -0
- package/src/unstable/cli/CliOutput.ts +45 -6
- package/src/unstable/cli/Command.ts +298 -11
- package/src/unstable/cli/HelpDoc.ts +68 -2
- package/src/unstable/cli/internal/command.ts +47 -11
- package/src/unstable/cli/internal/completions/CommandDescriptor.ts +7 -2
- package/src/unstable/cli/internal/parser.ts +11 -3
- package/src/unstable/http/Headers.ts +28 -13
- package/src/unstable/http/HttpEffect.ts +10 -5
- package/src/unstable/http/HttpServerError.ts +13 -27
- package/src/unstable/http/HttpServerRespondable.ts +6 -6
- package/src/unstable/http/HttpServerResponse.ts +3 -1
- package/src/unstable/httpapi/HttpApiBuilder.ts +1 -0
- package/src/unstable/httpapi/HttpApiError.ts +30 -9
- package/src/unstable/observability/OtlpLogger.ts +9 -5
- package/src/unstable/reactivity/AtomRegistry.ts +29 -1
- package/src/unstable/rpc/RpcServer.ts +4 -0
- package/src/unstable/workflow/WorkflowEngine.ts +178 -0
package/dist/Channel.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ import * as Exit from "./Exit.ts";
|
|
|
64
64
|
import * as Filter from "./Filter.ts";
|
|
65
65
|
import type { LazyArg } from "./Function.ts";
|
|
66
66
|
import * as Layer from "./Layer.ts";
|
|
67
|
-
import type {
|
|
67
|
+
import type { Severity } from "./LogLevel.ts";
|
|
68
68
|
import * as Option from "./Option.ts";
|
|
69
69
|
import type { Pipeable } from "./Pipeable.ts";
|
|
70
70
|
import type * as Predicate from "./Predicate.ts";
|
|
@@ -3455,11 +3455,11 @@ export declare const orDie: <OutElem, OutErr, OutDone, InElem, InErr, InDone, En
|
|
|
3455
3455
|
* @category Error handling
|
|
3456
3456
|
*/
|
|
3457
3457
|
export declare const ignore: <Arg extends Channel<any, any, any, any, any, any, any> | {
|
|
3458
|
-
readonly log?: boolean |
|
|
3458
|
+
readonly log?: boolean | Severity | undefined;
|
|
3459
3459
|
} | undefined = {
|
|
3460
|
-
readonly log?: boolean |
|
|
3460
|
+
readonly log?: boolean | Severity | undefined;
|
|
3461
3461
|
}>(selfOrOptions: Arg, options?: {
|
|
3462
|
-
readonly log?: boolean |
|
|
3462
|
+
readonly log?: boolean | Severity | undefined;
|
|
3463
3463
|
} | undefined) => [Arg] extends [
|
|
3464
3464
|
Channel<infer OutElem, infer _OutErr, infer OutDone, infer InElem, infer InErr, infer InDone, infer Env>
|
|
3465
3465
|
] ? Channel<OutElem, never, OutDone | void, InElem, InErr, InDone, Env> : <OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>(self: Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>) => Channel<OutElem, never, OutDone | void, InElem, InErr, InDone, Env>;
|
|
@@ -3472,11 +3472,11 @@ export declare const ignore: <Arg extends Channel<any, any, any, any, any, any,
|
|
|
3472
3472
|
* @category Error handling
|
|
3473
3473
|
*/
|
|
3474
3474
|
export declare const ignoreCause: <Arg extends Channel<any, any, any, any, any, any, any> | {
|
|
3475
|
-
readonly log?: boolean |
|
|
3475
|
+
readonly log?: boolean | Severity | undefined;
|
|
3476
3476
|
} | undefined = {
|
|
3477
|
-
readonly log?: boolean |
|
|
3477
|
+
readonly log?: boolean | Severity | undefined;
|
|
3478
3478
|
}>(selfOrOptions: Arg, options?: {
|
|
3479
|
-
readonly log?: boolean |
|
|
3479
|
+
readonly log?: boolean | Severity | undefined;
|
|
3480
3480
|
} | undefined) => [Arg] extends [
|
|
3481
3481
|
Channel<infer OutElem, infer _OutErr, infer OutDone, infer InElem, infer InErr, infer InDone, infer Env>
|
|
3482
3482
|
] ? Channel<OutElem, never, OutDone | void, InElem, InErr, InDone, Env> : <OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>(self: Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>) => Channel<OutElem, never, OutDone | void, InElem, InErr, InDone, Env>;
|
package/dist/Effect.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ import { type LazyArg } from "./Function.ts";
|
|
|
78
78
|
import type { TypeLambda } from "./HKT.ts";
|
|
79
79
|
import type * as Layer from "./Layer.ts";
|
|
80
80
|
import type { Logger } from "./Logger.ts";
|
|
81
|
-
import type {
|
|
81
|
+
import type { Severity } from "./LogLevel.ts";
|
|
82
82
|
import * as Metric from "./Metric.ts";
|
|
83
83
|
import type { Option } from "./Option.ts";
|
|
84
84
|
import type { Pipeable } from "./Pipeable.ts";
|
|
@@ -724,6 +724,199 @@ export declare const partition: {
|
|
|
724
724
|
readonly concurrency?: Concurrency | undefined;
|
|
725
725
|
}): Effect<[excluded: Array<E>, satisfying: Array<B>], never, R>;
|
|
726
726
|
};
|
|
727
|
+
/**
|
|
728
|
+
* Applies an effectful function to each element and accumulates all failures.
|
|
729
|
+
*
|
|
730
|
+
* This function always evaluates every element. If at least one effect fails,
|
|
731
|
+
* all failures are returned as a non-empty array and successes are discarded.
|
|
732
|
+
* If all effects succeed, it returns all collected successes.
|
|
733
|
+
*
|
|
734
|
+
* Use `discard: true` to ignore successful values while still validating all
|
|
735
|
+
* elements.
|
|
736
|
+
*
|
|
737
|
+
* @example
|
|
738
|
+
* ```ts
|
|
739
|
+
* import { Effect } from "effect"
|
|
740
|
+
*
|
|
741
|
+
* const program = Effect.validate([0, 1, 2, 3], (n) =>
|
|
742
|
+
* n % 2 === 0 ? Effect.fail(`${n} is even`) : Effect.succeed(n)
|
|
743
|
+
* )
|
|
744
|
+
*
|
|
745
|
+
* Effect.runPromiseExit(program).then(console.log)
|
|
746
|
+
* // {
|
|
747
|
+
* // _id: 'Exit',
|
|
748
|
+
* // _tag: 'Failure',
|
|
749
|
+
* // cause: {
|
|
750
|
+
* // _id: 'Cause',
|
|
751
|
+
* // reasons: [
|
|
752
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '0 is even' },
|
|
753
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '2 is even' }
|
|
754
|
+
* // ]
|
|
755
|
+
* // }
|
|
756
|
+
* // }
|
|
757
|
+
* ```
|
|
758
|
+
*
|
|
759
|
+
* @since 4.0.0
|
|
760
|
+
* @category Error Accumulation
|
|
761
|
+
*/
|
|
762
|
+
export declare const validate: {
|
|
763
|
+
/**
|
|
764
|
+
* Applies an effectful function to each element and accumulates all failures.
|
|
765
|
+
*
|
|
766
|
+
* This function always evaluates every element. If at least one effect fails,
|
|
767
|
+
* all failures are returned as a non-empty array and successes are discarded.
|
|
768
|
+
* If all effects succeed, it returns all collected successes.
|
|
769
|
+
*
|
|
770
|
+
* Use `discard: true` to ignore successful values while still validating all
|
|
771
|
+
* elements.
|
|
772
|
+
*
|
|
773
|
+
* @example
|
|
774
|
+
* ```ts
|
|
775
|
+
* import { Effect } from "effect"
|
|
776
|
+
*
|
|
777
|
+
* const program = Effect.validate([0, 1, 2, 3], (n) =>
|
|
778
|
+
* n % 2 === 0 ? Effect.fail(`${n} is even`) : Effect.succeed(n)
|
|
779
|
+
* )
|
|
780
|
+
*
|
|
781
|
+
* Effect.runPromiseExit(program).then(console.log)
|
|
782
|
+
* // {
|
|
783
|
+
* // _id: 'Exit',
|
|
784
|
+
* // _tag: 'Failure',
|
|
785
|
+
* // cause: {
|
|
786
|
+
* // _id: 'Cause',
|
|
787
|
+
* // reasons: [
|
|
788
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '0 is even' },
|
|
789
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '2 is even' }
|
|
790
|
+
* // ]
|
|
791
|
+
* // }
|
|
792
|
+
* // }
|
|
793
|
+
* ```
|
|
794
|
+
*
|
|
795
|
+
* @since 4.0.0
|
|
796
|
+
* @category Error Accumulation
|
|
797
|
+
*/
|
|
798
|
+
<A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options?: {
|
|
799
|
+
readonly concurrency?: Concurrency | undefined;
|
|
800
|
+
readonly discard?: false | undefined;
|
|
801
|
+
} | undefined): (elements: Iterable<A>) => Effect<Array<B>, Arr.NonEmptyArray<E>, R>;
|
|
802
|
+
/**
|
|
803
|
+
* Applies an effectful function to each element and accumulates all failures.
|
|
804
|
+
*
|
|
805
|
+
* This function always evaluates every element. If at least one effect fails,
|
|
806
|
+
* all failures are returned as a non-empty array and successes are discarded.
|
|
807
|
+
* If all effects succeed, it returns all collected successes.
|
|
808
|
+
*
|
|
809
|
+
* Use `discard: true` to ignore successful values while still validating all
|
|
810
|
+
* elements.
|
|
811
|
+
*
|
|
812
|
+
* @example
|
|
813
|
+
* ```ts
|
|
814
|
+
* import { Effect } from "effect"
|
|
815
|
+
*
|
|
816
|
+
* const program = Effect.validate([0, 1, 2, 3], (n) =>
|
|
817
|
+
* n % 2 === 0 ? Effect.fail(`${n} is even`) : Effect.succeed(n)
|
|
818
|
+
* )
|
|
819
|
+
*
|
|
820
|
+
* Effect.runPromiseExit(program).then(console.log)
|
|
821
|
+
* // {
|
|
822
|
+
* // _id: 'Exit',
|
|
823
|
+
* // _tag: 'Failure',
|
|
824
|
+
* // cause: {
|
|
825
|
+
* // _id: 'Cause',
|
|
826
|
+
* // reasons: [
|
|
827
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '0 is even' },
|
|
828
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '2 is even' }
|
|
829
|
+
* // ]
|
|
830
|
+
* // }
|
|
831
|
+
* // }
|
|
832
|
+
* ```
|
|
833
|
+
*
|
|
834
|
+
* @since 4.0.0
|
|
835
|
+
* @category Error Accumulation
|
|
836
|
+
*/
|
|
837
|
+
<A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options: {
|
|
838
|
+
readonly concurrency?: Concurrency | undefined;
|
|
839
|
+
readonly discard: true;
|
|
840
|
+
}): (elements: Iterable<A>) => Effect<void, Arr.NonEmptyArray<E>, R>;
|
|
841
|
+
/**
|
|
842
|
+
* Applies an effectful function to each element and accumulates all failures.
|
|
843
|
+
*
|
|
844
|
+
* This function always evaluates every element. If at least one effect fails,
|
|
845
|
+
* all failures are returned as a non-empty array and successes are discarded.
|
|
846
|
+
* If all effects succeed, it returns all collected successes.
|
|
847
|
+
*
|
|
848
|
+
* Use `discard: true` to ignore successful values while still validating all
|
|
849
|
+
* elements.
|
|
850
|
+
*
|
|
851
|
+
* @example
|
|
852
|
+
* ```ts
|
|
853
|
+
* import { Effect } from "effect"
|
|
854
|
+
*
|
|
855
|
+
* const program = Effect.validate([0, 1, 2, 3], (n) =>
|
|
856
|
+
* n % 2 === 0 ? Effect.fail(`${n} is even`) : Effect.succeed(n)
|
|
857
|
+
* )
|
|
858
|
+
*
|
|
859
|
+
* Effect.runPromiseExit(program).then(console.log)
|
|
860
|
+
* // {
|
|
861
|
+
* // _id: 'Exit',
|
|
862
|
+
* // _tag: 'Failure',
|
|
863
|
+
* // cause: {
|
|
864
|
+
* // _id: 'Cause',
|
|
865
|
+
* // reasons: [
|
|
866
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '0 is even' },
|
|
867
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '2 is even' }
|
|
868
|
+
* // ]
|
|
869
|
+
* // }
|
|
870
|
+
* // }
|
|
871
|
+
* ```
|
|
872
|
+
*
|
|
873
|
+
* @since 4.0.0
|
|
874
|
+
* @category Error Accumulation
|
|
875
|
+
*/
|
|
876
|
+
<A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options?: {
|
|
877
|
+
readonly concurrency?: Concurrency | undefined;
|
|
878
|
+
readonly discard?: false | undefined;
|
|
879
|
+
} | undefined): Effect<Array<B>, Arr.NonEmptyArray<E>, R>;
|
|
880
|
+
/**
|
|
881
|
+
* Applies an effectful function to each element and accumulates all failures.
|
|
882
|
+
*
|
|
883
|
+
* This function always evaluates every element. If at least one effect fails,
|
|
884
|
+
* all failures are returned as a non-empty array and successes are discarded.
|
|
885
|
+
* If all effects succeed, it returns all collected successes.
|
|
886
|
+
*
|
|
887
|
+
* Use `discard: true` to ignore successful values while still validating all
|
|
888
|
+
* elements.
|
|
889
|
+
*
|
|
890
|
+
* @example
|
|
891
|
+
* ```ts
|
|
892
|
+
* import { Effect } from "effect"
|
|
893
|
+
*
|
|
894
|
+
* const program = Effect.validate([0, 1, 2, 3], (n) =>
|
|
895
|
+
* n % 2 === 0 ? Effect.fail(`${n} is even`) : Effect.succeed(n)
|
|
896
|
+
* )
|
|
897
|
+
*
|
|
898
|
+
* Effect.runPromiseExit(program).then(console.log)
|
|
899
|
+
* // {
|
|
900
|
+
* // _id: 'Exit',
|
|
901
|
+
* // _tag: 'Failure',
|
|
902
|
+
* // cause: {
|
|
903
|
+
* // _id: 'Cause',
|
|
904
|
+
* // reasons: [
|
|
905
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '0 is even' },
|
|
906
|
+
* // { _id: 'Reason', _tag: 'Fail', error: '2 is even' }
|
|
907
|
+
* // ]
|
|
908
|
+
* // }
|
|
909
|
+
* // }
|
|
910
|
+
* ```
|
|
911
|
+
*
|
|
912
|
+
* @since 4.0.0
|
|
913
|
+
* @category Error Accumulation
|
|
914
|
+
*/
|
|
915
|
+
<A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options: {
|
|
916
|
+
readonly concurrency?: Concurrency | undefined;
|
|
917
|
+
readonly discard: true;
|
|
918
|
+
}): Effect<void, Arr.NonEmptyArray<E>, R>;
|
|
919
|
+
};
|
|
727
920
|
/**
|
|
728
921
|
* Executes an effectful operation for each element in an `Iterable`.
|
|
729
922
|
*
|
|
@@ -6421,11 +6614,11 @@ export declare const sandbox: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Caus
|
|
|
6421
6614
|
* @category Error Handling
|
|
6422
6615
|
*/
|
|
6423
6616
|
export declare const ignore: <Arg extends Effect<any, any, any> | {
|
|
6424
|
-
readonly log?: boolean |
|
|
6617
|
+
readonly log?: boolean | Severity | undefined;
|
|
6425
6618
|
} | undefined = {
|
|
6426
|
-
readonly log?: boolean |
|
|
6619
|
+
readonly log?: boolean | Severity | undefined;
|
|
6427
6620
|
}>(effectOrOptions?: Arg, options?: {
|
|
6428
|
-
readonly log?: boolean |
|
|
6621
|
+
readonly log?: boolean | Severity | undefined;
|
|
6429
6622
|
} | undefined) => [Arg] extends [Effect<infer _A, infer _E, infer _R>] ? Effect<void, never, _R> : <A, E, R>(self: Effect<A, E, R>) => Effect<void, never, R>;
|
|
6430
6623
|
/**
|
|
6431
6624
|
* Ignores the effect's failure cause, including defects and interruptions.
|
|
@@ -6446,11 +6639,11 @@ export declare const ignore: <Arg extends Effect<any, any, any> | {
|
|
|
6446
6639
|
* @category Error Handling
|
|
6447
6640
|
*/
|
|
6448
6641
|
export declare const ignoreCause: <Arg extends Effect<any, any, any> | {
|
|
6449
|
-
readonly log?: boolean |
|
|
6642
|
+
readonly log?: boolean | Severity | undefined;
|
|
6450
6643
|
} | undefined = {
|
|
6451
|
-
readonly log?: boolean |
|
|
6644
|
+
readonly log?: boolean | Severity | undefined;
|
|
6452
6645
|
}>(effectOrOptions?: Arg, options?: {
|
|
6453
|
-
readonly log?: boolean |
|
|
6646
|
+
readonly log?: boolean | Severity | undefined;
|
|
6454
6647
|
} | undefined) => [Arg] extends [Effect<infer _A, infer _E, infer _R>] ? Effect<void, never, _R> : <A, E, R>(self: Effect<A, E, R>) => Effect<void, never, R>;
|
|
6455
6648
|
/**
|
|
6456
6649
|
* Apply an `ExecutionPlan` to an effect, retrying with step-provided resources
|
|
@@ -6556,6 +6749,22 @@ export declare const withExecutionPlan: {
|
|
|
6556
6749
|
requirements: PlanR;
|
|
6557
6750
|
}>): Effect<A, E | PlanE, Exclude<R, Provides> | PlanR>;
|
|
6558
6751
|
};
|
|
6752
|
+
/**
|
|
6753
|
+
* Runs an effect and reports any errors to the configured `ErrorReporter`s.
|
|
6754
|
+
*
|
|
6755
|
+
* If the `defectsOnly` option is set to `true`, only defects (unrecoverable
|
|
6756
|
+
* errors) will be reported, while regular failures will be ignored.
|
|
6757
|
+
*
|
|
6758
|
+
* @since 4.0.0
|
|
6759
|
+
* @category Error Handling
|
|
6760
|
+
*/
|
|
6761
|
+
export declare const withErrorReporting: <Arg extends Effect<any, any, any> | {
|
|
6762
|
+
readonly defectsOnly?: boolean | undefined;
|
|
6763
|
+
} | undefined = {
|
|
6764
|
+
readonly defectsOnly?: boolean | undefined;
|
|
6765
|
+
}>(effectOrOptions: Arg, options?: {
|
|
6766
|
+
readonly defectsOnly?: boolean | undefined;
|
|
6767
|
+
} | undefined) => [Arg] extends [Effect<infer _A, infer _E, infer _R>] ? Arg : <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
|
|
6559
6768
|
/**
|
|
6560
6769
|
* Replaces the original failure with a success value, ensuring the effect
|
|
6561
6770
|
* cannot fail.
|
|
@@ -15630,7 +15839,7 @@ export declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect<A, E, R>)
|
|
|
15630
15839
|
* @since 2.0.0
|
|
15631
15840
|
* @category Logging
|
|
15632
15841
|
*/
|
|
15633
|
-
export declare const logWithLevel: (level?:
|
|
15842
|
+
export declare const logWithLevel: (level?: Severity) => (...message: ReadonlyArray<any>) => Effect<void>;
|
|
15634
15843
|
/**
|
|
15635
15844
|
* Logs one or more messages using the default log level.
|
|
15636
15845
|
*
|