effect 4.0.0-beta.72 → 4.0.0-beta.74
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 +16 -16
- package/dist/Array.js +4 -4
- package/dist/Boolean.d.ts +2 -2
- package/dist/Boolean.js +2 -2
- package/dist/Channel.d.ts +63 -63
- package/dist/Channel.js +25 -25
- package/dist/Chunk.d.ts +17 -17
- package/dist/Chunk.js +5 -5
- package/dist/Context.d.ts +3 -3
- package/dist/Context.js +1 -1
- package/dist/Cron.d.ts +4 -4
- package/dist/Cron.js +4 -4
- package/dist/Deferred.d.ts +37 -37
- package/dist/Deferred.js +13 -13
- package/dist/Duration.d.ts +6 -6
- package/dist/Duration.js +2 -2
- package/dist/Effect.d.ts +58 -58
- package/dist/Effect.js +39 -39
- package/dist/Equal.d.ts +2 -2
- package/dist/Equal.js +2 -2
- package/dist/Equivalence.d.ts +1 -1
- package/dist/Equivalence.js +1 -1
- package/dist/ExecutionPlan.d.ts +2 -2
- package/dist/ExecutionPlan.js +1 -1
- package/dist/FileSystem.d.ts +6 -6
- package/dist/FileSystem.js +2 -2
- package/dist/Function.d.ts +5 -5
- package/dist/Function.js +5 -5
- package/dist/Graph.d.ts +11 -11
- package/dist/Graph.js +5 -5
- package/dist/HKT.d.ts +1 -1
- package/dist/HashMap.d.ts +3 -3
- package/dist/HashSet.d.ts +1 -1
- package/dist/Iterable.d.ts +15 -15
- package/dist/Iterable.js +5 -5
- package/dist/Layer.d.ts +16 -16
- package/dist/Layer.js +5 -5
- package/dist/Logger.d.ts +5 -5
- package/dist/Logger.js +4 -4
- package/dist/ManagedRuntime.d.ts +2 -2
- package/dist/Match.d.ts +20 -20
- package/dist/Match.js +16 -16
- package/dist/Metric.d.ts +16 -16
- package/dist/Metric.js +3 -3
- package/dist/Option.d.ts +36 -36
- package/dist/Option.js +17 -17
- package/dist/Order.d.ts +1 -1
- package/dist/Order.js +1 -1
- package/dist/Path.d.ts +1 -1
- package/dist/Path.js +1 -1
- package/dist/Pipeable.d.ts +1 -1
- package/dist/Pipeable.js +1 -1
- package/dist/Predicate.d.ts +5 -5
- package/dist/PubSub.d.ts +9 -9
- package/dist/PubSub.js +5 -5
- package/dist/Queue.d.ts +24 -24
- package/dist/Queue.js +20 -20
- package/dist/Record.d.ts +15 -15
- package/dist/Record.js +5 -5
- package/dist/Redacted.d.ts +2 -2
- package/dist/Redacted.js +1 -1
- package/dist/Ref.d.ts +6 -6
- package/dist/Ref.js +6 -6
- package/dist/RegExp.d.ts +1 -1
- package/dist/RegExp.js +1 -1
- package/dist/Request.d.ts +4 -4
- package/dist/RequestResolver.d.ts +6 -6
- package/dist/RequestResolver.js +2 -2
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.js +1 -1
- package/dist/Result.d.ts +18 -18
- package/dist/Result.js +11 -11
- package/dist/Schedule.d.ts +44 -44
- package/dist/Schedule.js +18 -18
- package/dist/Schema.d.ts +177 -459
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +25 -25
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +1 -1
- package/dist/SchemaGetter.d.ts +13 -13
- package/dist/SchemaGetter.js +12 -12
- package/dist/SchemaParser.d.ts +3 -3
- package/dist/SchemaParser.js +3 -3
- package/dist/Scope.d.ts +1 -1
- package/dist/Scope.js +1 -1
- package/dist/Sink.d.ts +5 -5
- package/dist/Sink.js +3 -3
- package/dist/Stream.d.ts +55 -55
- package/dist/Stream.js +21 -21
- package/dist/String.d.ts +5 -5
- package/dist/String.js +3 -3
- package/dist/Struct.d.ts +8 -8
- package/dist/Struct.js +3 -3
- package/dist/SynchronizedRef.d.ts +57 -57
- package/dist/SynchronizedRef.js +19 -19
- package/dist/Terminal.d.ts +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Tracer.d.ts +5 -5
- package/dist/Tracer.js +2 -2
- package/dist/Tuple.d.ts +14 -14
- package/dist/Tuple.js +6 -6
- package/dist/TxHashMap.d.ts +3 -3
- package/dist/TxHashSet.d.ts +1 -1
- package/dist/Unify.d.ts +7 -7
- package/dist/Unify.js +1 -1
- package/dist/testing/TestClock.d.ts +5 -5
- package/dist/testing/TestClock.js +4 -4
- package/dist/testing/TestConsole.d.ts +3 -3
- package/dist/testing/TestConsole.js +3 -3
- package/dist/unstable/ai/Chat.d.ts +2 -2
- package/dist/unstable/ai/Chat.js +2 -2
- package/dist/unstable/ai/EmbeddingModel.d.ts +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +2 -2
- package/dist/unstable/ai/IdGenerator.js +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +4 -4
- package/dist/unstable/ai/LanguageModel.js +1 -1
- package/dist/unstable/ai/Prompt.d.ts +15 -15
- package/dist/unstable/ai/Prompt.js +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +5 -5
- package/dist/unstable/ai/Telemetry.js +2 -2
- package/dist/unstable/ai/Tokenizer.d.ts +1 -1
- package/dist/unstable/ai/Tokenizer.js +1 -1
- package/dist/unstable/ai/Tool.d.ts +6 -6
- package/dist/unstable/ai/Tool.js +6 -6
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +1 -1
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -3
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Prompt.d.ts +11 -11
- package/dist/unstable/cli/internal/parser.js +145 -10
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +1 -1
- package/dist/unstable/cluster/Entity.js +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +1 -0
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +5 -3
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +1 -1
- package/dist/unstable/cluster/Runners.d.ts +1 -1
- package/dist/unstable/cluster/Runners.js +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +1 -1
- package/dist/unstable/cluster/Sharding.js +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +5 -5
- package/dist/unstable/cluster/Snowflake.js +5 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +1 -1
- package/dist/unstable/eventlog/EventLog.js +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +3 -3
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +3 -3
- package/dist/unstable/http/Cookies.d.ts +1 -1
- package/dist/unstable/http/Etag.d.ts +1 -1
- package/dist/unstable/http/Etag.js +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +2 -2
- package/dist/unstable/http/FetchHttpClient.js +2 -2
- package/dist/unstable/http/HttpClient.d.ts +1 -1
- package/dist/unstable/http/HttpClient.js +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -2
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.js +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +1 -1
- package/dist/unstable/http/HttpPlatform.js +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +4 -4
- package/dist/unstable/http/HttpRouter.js +4 -4
- package/dist/unstable/http/HttpServerResponse.d.ts +3 -3
- package/dist/unstable/http/Url.d.ts +33 -33
- package/dist/unstable/http/Url.js +11 -11
- package/dist/unstable/httpapi/HttpApi.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApi.js +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +2 -3
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.js +13 -13
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +27 -5
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +26 -3
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +2 -2
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -4
- package/dist/unstable/observability/PrometheusMetrics.js +2 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts +3 -3
- package/dist/unstable/persistence/KeyValueStore.js +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -2
- package/dist/unstable/persistence/Persistable.js +2 -2
- package/dist/unstable/persistence/PersistedQueue.d.ts +8 -8
- package/dist/unstable/persistence/PersistedQueue.js +8 -8
- package/dist/unstable/persistence/RateLimiter.d.ts +1 -1
- package/dist/unstable/persistence/RateLimiter.js +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +5 -5
- package/dist/unstable/process/ChildProcess.js +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts +4 -4
- package/dist/unstable/reactivity/AsyncResult.js +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +1 -1
- package/dist/unstable/reactivity/Atom.js +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +1 -1
- package/dist/unstable/reactivity/Reactivity.js +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +5 -5
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +3 -3
- package/dist/unstable/rpc/RpcSchema.js +2 -2
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.js +1 -1
- package/dist/unstable/socket/Socket.d.ts +3 -3
- package/dist/unstable/socket/Socket.js +3 -3
- package/dist/unstable/socket/SocketServer.d.ts +1 -1
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/sql/Migrator.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +3 -3
- package/dist/unstable/sql/SqlClient.js +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Worker.d.ts +1 -1
- package/dist/unstable/workers/Worker.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -1
- package/dist/unstable/workflow/Activity.js +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +16 -16
- package/src/Boolean.ts +2 -2
- package/src/Channel.ts +67 -67
- package/src/Chunk.ts +18 -18
- package/src/Context.ts +4 -4
- package/src/Cron.ts +4 -4
- package/src/Deferred.ts +37 -37
- package/src/Duration.ts +6 -6
- package/src/Effect.ts +58 -58
- package/src/Equal.ts +2 -2
- package/src/Equivalence.ts +1 -1
- package/src/ExecutionPlan.ts +2 -2
- package/src/FileSystem.ts +6 -6
- package/src/Function.ts +5 -5
- package/src/Graph.ts +11 -11
- package/src/HKT.ts +1 -1
- package/src/HashMap.ts +3 -3
- package/src/HashSet.ts +1 -1
- package/src/Iterable.ts +15 -15
- package/src/Layer.ts +16 -16
- package/src/Logger.ts +7 -7
- package/src/ManagedRuntime.ts +2 -2
- package/src/Match.ts +20 -20
- package/src/Metric.ts +20 -20
- package/src/Option.ts +36 -36
- package/src/Order.ts +1 -1
- package/src/Path.ts +1 -1
- package/src/Pipeable.ts +1 -1
- package/src/Predicate.ts +5 -5
- package/src/PubSub.ts +9 -9
- package/src/Queue.ts +24 -24
- package/src/Record.ts +15 -15
- package/src/Redacted.ts +2 -2
- package/src/Ref.ts +18 -18
- package/src/RegExp.ts +1 -1
- package/src/Request.ts +4 -4
- package/src/RequestResolver.ts +8 -8
- package/src/Resource.ts +1 -1
- package/src/Result.ts +18 -18
- package/src/Schedule.ts +45 -45
- package/src/Schema.ts +177 -459
- package/src/SchemaAST.ts +1 -1
- package/src/SchemaGetter.ts +13 -13
- package/src/SchemaParser.ts +3 -3
- package/src/Scope.ts +1 -1
- package/src/Sink.ts +5 -5
- package/src/Stream.ts +57 -57
- package/src/String.ts +5 -5
- package/src/Struct.ts +8 -8
- package/src/SynchronizedRef.ts +57 -57
- package/src/Terminal.ts +1 -1
- package/src/Tracer.ts +5 -5
- package/src/Tuple.ts +14 -14
- package/src/TxHashMap.ts +3 -3
- package/src/TxHashSet.ts +1 -1
- package/src/Unify.ts +7 -7
- package/src/testing/TestClock.ts +5 -5
- package/src/testing/TestConsole.ts +3 -3
- package/src/unstable/ai/Chat.ts +2 -2
- package/src/unstable/ai/EmbeddingModel.ts +1 -1
- package/src/unstable/ai/IdGenerator.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +4 -4
- package/src/unstable/ai/Prompt.ts +15 -15
- package/src/unstable/ai/Telemetry.ts +5 -5
- package/src/unstable/ai/Tokenizer.ts +1 -1
- package/src/unstable/ai/Tool.ts +6 -6
- package/src/unstable/cli/Command.ts +5 -1
- package/src/unstable/cli/Param.ts +1 -1
- package/src/unstable/cli/Primitive.ts +3 -3
- package/src/unstable/cli/Prompt.ts +11 -11
- package/src/unstable/cli/internal/parser.ts +204 -10
- package/src/unstable/cluster/Entity.ts +1 -1
- package/src/unstable/cluster/EntityResource.ts +8 -4
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +1 -1
- package/src/unstable/cluster/Runners.ts +1 -1
- package/src/unstable/cluster/Sharding.ts +1 -1
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +5 -5
- package/src/unstable/devtools/DevToolsClient.ts +1 -1
- package/src/unstable/eventlog/EventLog.ts +1 -1
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogRemote.ts +1 -1
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +3 -3
- package/src/unstable/http/Cookies.ts +1 -1
- package/src/unstable/http/Etag.ts +1 -1
- package/src/unstable/http/FetchHttpClient.ts +2 -2
- package/src/unstable/http/HttpClient.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +2 -2
- package/src/unstable/http/HttpMiddleware.ts +1 -1
- package/src/unstable/http/HttpPlatform.ts +1 -1
- package/src/unstable/http/HttpRouter.ts +4 -4
- package/src/unstable/http/HttpServerResponse.ts +3 -3
- package/src/unstable/http/Url.ts +33 -33
- package/src/unstable/httpapi/HttpApi.ts +1 -1
- package/src/unstable/httpapi/HttpApiBuilder.ts +2 -3
- package/src/unstable/httpapi/HttpApiError.ts +13 -13
- package/src/unstable/httpapi/HttpApiSecurity.ts +36 -8
- package/src/unstable/httpapi/OpenApi.ts +2 -2
- package/src/unstable/observability/PrometheusMetrics.ts +4 -4
- package/src/unstable/persistence/KeyValueStore.ts +3 -3
- package/src/unstable/persistence/Persistable.ts +2 -2
- package/src/unstable/persistence/PersistedQueue.ts +8 -8
- package/src/unstable/persistence/RateLimiter.ts +1 -1
- package/src/unstable/process/ChildProcess.ts +5 -5
- package/src/unstable/reactivity/AsyncResult.ts +4 -4
- package/src/unstable/reactivity/Atom.ts +1 -1
- package/src/unstable/reactivity/AtomRegistry.ts +1 -1
- package/src/unstable/reactivity/Reactivity.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +5 -5
- package/src/unstable/rpc/RpcMiddleware.ts +1 -1
- package/src/unstable/rpc/RpcSchema.ts +3 -3
- package/src/unstable/schema/Model.ts +2 -2
- package/src/unstable/socket/Socket.ts +3 -3
- package/src/unstable/socket/SocketServer.ts +1 -1
- package/src/unstable/sql/Migrator.ts +1 -1
- package/src/unstable/sql/SqlClient.ts +3 -3
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +1 -1
- package/src/unstable/workflow/Activity.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +1 -1
package/src/Effect.ts
CHANGED
|
@@ -1370,7 +1370,7 @@ export const whileLoop: <A, E, R>(options: {
|
|
|
1370
1370
|
* ```
|
|
1371
1371
|
*
|
|
1372
1372
|
* @see {@link tryPromise} for a version that can handle failures.
|
|
1373
|
-
* @category
|
|
1373
|
+
* @category constructors
|
|
1374
1374
|
* @since 2.0.0
|
|
1375
1375
|
*/
|
|
1376
1376
|
export const promise: <A>(
|
|
@@ -1439,7 +1439,7 @@ export const promise: <A>(
|
|
|
1439
1439
|
* ```
|
|
1440
1440
|
*
|
|
1441
1441
|
* @see {@link promise} if the effectful computation is asynchronous and does not throw errors.
|
|
1442
|
-
* @category
|
|
1442
|
+
* @category constructors
|
|
1443
1443
|
* @since 2.0.0
|
|
1444
1444
|
*/
|
|
1445
1445
|
export const tryPromise: <A, E = Cause.UnknownError>(
|
|
@@ -1469,7 +1469,7 @@ export const tryPromise: <A, E = Cause.UnknownError>(
|
|
|
1469
1469
|
* ```
|
|
1470
1470
|
*
|
|
1471
1471
|
* @see {@link fail} to create an effect that represents a failure.
|
|
1472
|
-
* @category
|
|
1472
|
+
* @category constructors
|
|
1473
1473
|
* @since 2.0.0
|
|
1474
1474
|
*/
|
|
1475
1475
|
export const succeed: <A>(value: A) => Effect<A> = internal.succeed
|
|
@@ -1488,7 +1488,7 @@ export const succeed: <A>(value: A) => Effect<A> = internal.succeed
|
|
|
1488
1488
|
* // Output: { _id: 'Option', _tag: 'None' }
|
|
1489
1489
|
* ```
|
|
1490
1490
|
*
|
|
1491
|
-
* @category
|
|
1491
|
+
* @category constructors
|
|
1492
1492
|
* @since 2.0.0
|
|
1493
1493
|
*/
|
|
1494
1494
|
export const succeedNone: Effect<Option<never>> = internal.succeedNone
|
|
@@ -1507,7 +1507,7 @@ export const succeedNone: Effect<Option<never>> = internal.succeedNone
|
|
|
1507
1507
|
* // Output: { _id: 'Option', _tag: 'Some', value: 42 }
|
|
1508
1508
|
* ```
|
|
1509
1509
|
*
|
|
1510
|
-
* @category
|
|
1510
|
+
* @category constructors
|
|
1511
1511
|
* @since 2.0.0
|
|
1512
1512
|
*/
|
|
1513
1513
|
export const succeedSome: <A>(value: A) => Effect<Option<A>> = internal.succeedSome
|
|
@@ -1595,7 +1595,7 @@ export const succeedSome: <A>(value: A) => Effect<Option<A>> = internal.succeedS
|
|
|
1595
1595
|
* )
|
|
1596
1596
|
* ```
|
|
1597
1597
|
*
|
|
1598
|
-
* @category
|
|
1598
|
+
* @category constructors
|
|
1599
1599
|
* @since 2.0.0
|
|
1600
1600
|
*/
|
|
1601
1601
|
export const suspend: <A, E, R>(
|
|
@@ -1634,7 +1634,7 @@ export const suspend: <A, E, R>(
|
|
|
1634
1634
|
* ```
|
|
1635
1635
|
*
|
|
1636
1636
|
* @see {@link try_ | try} for a version that can handle failures.
|
|
1637
|
-
* @category
|
|
1637
|
+
* @category constructors
|
|
1638
1638
|
* @since 2.0.0
|
|
1639
1639
|
*/
|
|
1640
1640
|
export const sync: <A>(thunk: LazyArg<A>) => Effect<A> = internal.sync
|
|
@@ -1644,7 +1644,7 @@ export {
|
|
|
1644
1644
|
/**
|
|
1645
1645
|
* Returns an effect that succeeds with `void`.
|
|
1646
1646
|
*
|
|
1647
|
-
* @category
|
|
1647
|
+
* @category constructors
|
|
1648
1648
|
* @since 2.0.0
|
|
1649
1649
|
*/
|
|
1650
1650
|
void_ as void
|
|
@@ -1655,7 +1655,7 @@ export {
|
|
|
1655
1655
|
/**
|
|
1656
1656
|
* Returns an effect that succeeds with `undefined`.
|
|
1657
1657
|
*
|
|
1658
|
-
* @category
|
|
1658
|
+
* @category constructors
|
|
1659
1659
|
* @since 4.0.0
|
|
1660
1660
|
*/
|
|
1661
1661
|
undefined_ as undefined
|
|
@@ -1693,7 +1693,7 @@ export {
|
|
|
1693
1693
|
* const program = delay(1000)
|
|
1694
1694
|
* ```
|
|
1695
1695
|
*
|
|
1696
|
-
* @category
|
|
1696
|
+
* @category constructors
|
|
1697
1697
|
* @since 4.0.0
|
|
1698
1698
|
*/
|
|
1699
1699
|
export const callback: <A, E = never, R = never>(
|
|
@@ -1723,7 +1723,7 @@ export const callback: <A, E = never, R = never>(
|
|
|
1723
1723
|
* const timedProgram = Effect.timeout(program, "1 second")
|
|
1724
1724
|
* ```
|
|
1725
1725
|
*
|
|
1726
|
-
* @category
|
|
1726
|
+
* @category constructors
|
|
1727
1727
|
* @since 2.0.0
|
|
1728
1728
|
*/
|
|
1729
1729
|
export const never: Effect<never> = internal.never
|
|
@@ -1976,7 +1976,7 @@ export const bind: {
|
|
|
1976
1976
|
* })
|
|
1977
1977
|
* ```
|
|
1978
1978
|
*
|
|
1979
|
-
* @category
|
|
1979
|
+
* @category constructors
|
|
1980
1980
|
* @since 2.0.0
|
|
1981
1981
|
*/
|
|
1982
1982
|
export const gen: {
|
|
@@ -2028,7 +2028,7 @@ export const gen: {
|
|
|
2028
2028
|
* })
|
|
2029
2029
|
* ```
|
|
2030
2030
|
*
|
|
2031
|
-
* @category
|
|
2031
|
+
* @category constructors
|
|
2032
2032
|
* @since 2.0.0
|
|
2033
2033
|
*/
|
|
2034
2034
|
<Eff extends Effect<any, any, any>, AEff>(f: () => Generator<Eff, AEff, never>): Effect<
|
|
@@ -2088,7 +2088,7 @@ export const gen: {
|
|
|
2088
2088
|
* })
|
|
2089
2089
|
* ```
|
|
2090
2090
|
*
|
|
2091
|
-
* @category
|
|
2091
|
+
* @category constructors
|
|
2092
2092
|
* @since 2.0.0
|
|
2093
2093
|
*/
|
|
2094
2094
|
<Self, Eff extends Effect<any, any, any>, AEff>(
|
|
@@ -2116,7 +2116,7 @@ export declare namespace gen {
|
|
|
2116
2116
|
/**
|
|
2117
2117
|
* Generator return type accepted by `Effect.gen`.
|
|
2118
2118
|
*
|
|
2119
|
-
* @category
|
|
2119
|
+
* @category constructors
|
|
2120
2120
|
* @since 4.0.0
|
|
2121
2121
|
*/
|
|
2122
2122
|
export type Return<A, E = never, R = never> = Generator<Effect<any, E, R>, A, any>
|
|
@@ -2146,7 +2146,7 @@ export declare namespace gen {
|
|
|
2146
2146
|
* ```
|
|
2147
2147
|
*
|
|
2148
2148
|
* @see {@link succeed} to create an effect that represents a successful value.
|
|
2149
|
-
* @category
|
|
2149
|
+
* @category constructors
|
|
2150
2150
|
* @since 2.0.0
|
|
2151
2151
|
*/
|
|
2152
2152
|
export const fail: <E>(error: E) => Effect<never, E> = internal.fail
|
|
@@ -2175,7 +2175,7 @@ export const fail: <E>(error: E) => Effect<never, E> = internal.fail
|
|
|
2175
2175
|
* // Output: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
2176
2176
|
* ```
|
|
2177
2177
|
*
|
|
2178
|
-
* @category
|
|
2178
|
+
* @category constructors
|
|
2179
2179
|
* @since 2.0.0
|
|
2180
2180
|
*/
|
|
2181
2181
|
export const failSync: <E>(evaluate: LazyArg<E>) => Effect<never, E> = internal.failSync
|
|
@@ -2201,7 +2201,7 @@ export const failSync: <E>(evaluate: LazyArg<E>) => Effect<never, E> = internal.
|
|
|
2201
2201
|
* // Output: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
2202
2202
|
* ```
|
|
2203
2203
|
*
|
|
2204
|
-
* @category
|
|
2204
|
+
* @category constructors
|
|
2205
2205
|
* @since 2.0.0
|
|
2206
2206
|
*/
|
|
2207
2207
|
export const failCause: <E>(cause: Cause.Cause<E>) => Effect<never, E> = internal.failCause
|
|
@@ -2230,7 +2230,7 @@ export const failCause: <E>(cause: Cause.Cause<E>) => Effect<never, E> = interna
|
|
|
2230
2230
|
* // Output: { _id: 'Exit', _tag: 'Failure', cause: ... }
|
|
2231
2231
|
* ```
|
|
2232
2232
|
*
|
|
2233
|
-
* @category
|
|
2233
|
+
* @category constructors
|
|
2234
2234
|
* @since 2.0.0
|
|
2235
2235
|
*/
|
|
2236
2236
|
export const failCauseSync: <E>(
|
|
@@ -2274,7 +2274,7 @@ export const failCauseSync: <E>(
|
|
|
2274
2274
|
* // ...stack trace...
|
|
2275
2275
|
* ```
|
|
2276
2276
|
*
|
|
2277
|
-
* @category
|
|
2277
|
+
* @category constructors
|
|
2278
2278
|
* @since 2.0.0
|
|
2279
2279
|
*/
|
|
2280
2280
|
export const die: (defect: unknown) => Effect<never> = internal.die
|
|
@@ -2346,7 +2346,7 @@ export {
|
|
|
2346
2346
|
*
|
|
2347
2347
|
* @see {@link sync} if the effectful computation is synchronous and does not
|
|
2348
2348
|
* throw errors.
|
|
2349
|
-
* @category
|
|
2349
|
+
* @category constructors
|
|
2350
2350
|
* @since 2.0.0
|
|
2351
2351
|
*/
|
|
2352
2352
|
try_ as try
|
|
@@ -2369,7 +2369,7 @@ export {
|
|
|
2369
2369
|
* Effect.runPromise(program)
|
|
2370
2370
|
* ```
|
|
2371
2371
|
*
|
|
2372
|
-
* @category
|
|
2372
|
+
* @category constructors
|
|
2373
2373
|
* @since 2.0.0
|
|
2374
2374
|
*/
|
|
2375
2375
|
export const yieldNow: Effect<void> = internal.yieldNow
|
|
@@ -2391,7 +2391,7 @@ export const yieldNow: Effect<void> = internal.yieldNow
|
|
|
2391
2391
|
* Effect.runPromise(program)
|
|
2392
2392
|
* ```
|
|
2393
2393
|
*
|
|
2394
|
-
* @category
|
|
2394
|
+
* @category constructors
|
|
2395
2395
|
* @since 4.0.0
|
|
2396
2396
|
*/
|
|
2397
2397
|
export const yieldNowWith: (priority?: number) => Effect<void> = internal.yieldNowWith
|
|
@@ -2412,7 +2412,7 @@ export const yieldNowWith: (priority?: number) => Effect<void> = internal.yieldN
|
|
|
2412
2412
|
* // Output: Fiber ID: 1
|
|
2413
2413
|
* ```
|
|
2414
2414
|
*
|
|
2415
|
-
* @category
|
|
2415
|
+
* @category constructors
|
|
2416
2416
|
* @since 4.0.0
|
|
2417
2417
|
*/
|
|
2418
2418
|
export const withFiber: <A, E = never, R = never>(
|
|
@@ -6983,7 +6983,7 @@ export const tapDefect: {
|
|
|
6983
6983
|
* // Ready
|
|
6984
6984
|
* ```
|
|
6985
6985
|
*
|
|
6986
|
-
* @category repetition
|
|
6986
|
+
* @category repetition
|
|
6987
6987
|
* @since 2.0.0
|
|
6988
6988
|
*/
|
|
6989
6989
|
export const eventually: <A, E, R>(self: Effect<A, E, R>) => Effect<A, never, R> = internal.eventually
|
|
@@ -14326,7 +14326,7 @@ export declare namespace Repeat {
|
|
|
14326
14326
|
/**
|
|
14327
14327
|
* Computes the result type of `Effect.repeat` from the original effect and repeat options.
|
|
14328
14328
|
*
|
|
14329
|
-
* @category repetition
|
|
14329
|
+
* @category repetition
|
|
14330
14330
|
* @since 2.0.0
|
|
14331
14331
|
*/
|
|
14332
14332
|
export type Return<R, E, A, O extends Options<A>> = Effect<
|
|
@@ -14357,7 +14357,7 @@ export declare namespace Repeat {
|
|
|
14357
14357
|
/**
|
|
14358
14358
|
* Options that control whether and how an effect is repeated.
|
|
14359
14359
|
*
|
|
14360
|
-
* @category repetition
|
|
14360
|
+
* @category repetition
|
|
14361
14361
|
* @since 2.0.0
|
|
14362
14362
|
*/
|
|
14363
14363
|
export interface Options<A> {
|
|
@@ -14395,7 +14395,7 @@ export declare namespace Repeat {
|
|
|
14395
14395
|
* })
|
|
14396
14396
|
* ```
|
|
14397
14397
|
*
|
|
14398
|
-
* @category repetition
|
|
14398
|
+
* @category repetition
|
|
14399
14399
|
* @since 2.0.0
|
|
14400
14400
|
*/
|
|
14401
14401
|
export const forever: <
|
|
@@ -14485,7 +14485,7 @@ export const forever: <
|
|
|
14485
14485
|
* @see {@link retry} for failure-based repetition
|
|
14486
14486
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14487
14487
|
*
|
|
14488
|
-
* @category repetition
|
|
14488
|
+
* @category repetition
|
|
14489
14489
|
* @since 2.0.0
|
|
14490
14490
|
*/
|
|
14491
14491
|
export const repeat: {
|
|
@@ -14562,7 +14562,7 @@ export const repeat: {
|
|
|
14562
14562
|
* @see {@link retry} for failure-based repetition
|
|
14563
14563
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14564
14564
|
*
|
|
14565
|
-
* @category repetition
|
|
14565
|
+
* @category repetition
|
|
14566
14566
|
* @since 2.0.0
|
|
14567
14567
|
*/
|
|
14568
14568
|
<O extends Repeat.Options<A>, A>(options: O): <E, R>(self: Effect<A, E, R>) => Repeat.Return<R, E, A, O>
|
|
@@ -14639,7 +14639,7 @@ export const repeat: {
|
|
|
14639
14639
|
* @see {@link retry} for failure-based repetition
|
|
14640
14640
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14641
14641
|
*
|
|
14642
|
-
* @category repetition
|
|
14642
|
+
* @category repetition
|
|
14643
14643
|
* @since 2.0.0
|
|
14644
14644
|
*/
|
|
14645
14645
|
<Output, Input, Error, Env>(schedule: Schedule<Output, NoInfer<Input>, Error, Env>): <E, R>(self: Effect<Input, E, R>) => Effect<Output, E | Error, R | Env>
|
|
@@ -14716,7 +14716,7 @@ export const repeat: {
|
|
|
14716
14716
|
* @see {@link retry} for failure-based repetition
|
|
14717
14717
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14718
14718
|
*
|
|
14719
|
-
* @category repetition
|
|
14719
|
+
* @category repetition
|
|
14720
14720
|
* @since 2.0.0
|
|
14721
14721
|
*/
|
|
14722
14722
|
<Output, Input, Error, Env>(
|
|
@@ -14797,7 +14797,7 @@ export const repeat: {
|
|
|
14797
14797
|
* @see {@link retry} for failure-based repetition
|
|
14798
14798
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14799
14799
|
*
|
|
14800
|
-
* @category repetition
|
|
14800
|
+
* @category repetition
|
|
14801
14801
|
* @since 2.0.0
|
|
14802
14802
|
*/
|
|
14803
14803
|
<A, E, R, O extends Repeat.Options<A>>(self: Effect<A, E, R>, options: O): Repeat.Return<R, E, A, O>
|
|
@@ -14874,7 +14874,7 @@ export const repeat: {
|
|
|
14874
14874
|
* @see {@link retry} for failure-based repetition
|
|
14875
14875
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14876
14876
|
*
|
|
14877
|
-
* @category repetition
|
|
14877
|
+
* @category repetition
|
|
14878
14878
|
* @since 2.0.0
|
|
14879
14879
|
*/
|
|
14880
14880
|
<Input, E, R, Output, Error, Env>(
|
|
@@ -14954,7 +14954,7 @@ export const repeat: {
|
|
|
14954
14954
|
* @see {@link retry} for failure-based repetition
|
|
14955
14955
|
* @see {@link repeatOrElse} for fallback handling when repetition fails
|
|
14956
14956
|
*
|
|
14957
|
-
* @category repetition
|
|
14957
|
+
* @category repetition
|
|
14958
14958
|
* @since 2.0.0
|
|
14959
14959
|
*/
|
|
14960
14960
|
<Input, E, R, Output, Error, Env>(
|
|
@@ -15004,7 +15004,7 @@ export const repeat: {
|
|
|
15004
15004
|
* )
|
|
15005
15005
|
* ```
|
|
15006
15006
|
*
|
|
15007
|
-
* @category repetition
|
|
15007
|
+
* @category repetition
|
|
15008
15008
|
* @since 2.0.0
|
|
15009
15009
|
*/
|
|
15010
15010
|
export const repeatOrElse: {
|
|
@@ -15047,7 +15047,7 @@ export const repeatOrElse: {
|
|
|
15047
15047
|
* )
|
|
15048
15048
|
* ```
|
|
15049
15049
|
*
|
|
15050
|
-
* @category repetition
|
|
15050
|
+
* @category repetition
|
|
15051
15051
|
* @since 2.0.0
|
|
15052
15052
|
*/
|
|
15053
15053
|
<R2, A, B, E, E2, E3, R3>(
|
|
@@ -15093,7 +15093,7 @@ export const repeatOrElse: {
|
|
|
15093
15093
|
* )
|
|
15094
15094
|
* ```
|
|
15095
15095
|
*
|
|
15096
|
-
* @category repetition
|
|
15096
|
+
* @category repetition
|
|
15097
15097
|
* @since 2.0.0
|
|
15098
15098
|
*/
|
|
15099
15099
|
<A, E, R, R2, B, E2, E3, R3>(
|
|
@@ -15335,7 +15335,7 @@ export const replicateEffect: {
|
|
|
15335
15335
|
* @see {@link scheduleFrom} for a variant that allows the schedule's decision
|
|
15336
15336
|
* to depend on the result of this effect.
|
|
15337
15337
|
*
|
|
15338
|
-
* @category repetition
|
|
15338
|
+
* @category repetition
|
|
15339
15339
|
* @since 2.0.0
|
|
15340
15340
|
*/
|
|
15341
15341
|
export const schedule: {
|
|
@@ -15383,7 +15383,7 @@ export const schedule: {
|
|
|
15383
15383
|
* @see {@link scheduleFrom} for a variant that allows the schedule's decision
|
|
15384
15384
|
* to depend on the result of this effect.
|
|
15385
15385
|
*
|
|
15386
|
-
* @category repetition
|
|
15386
|
+
* @category repetition
|
|
15387
15387
|
* @since 2.0.0
|
|
15388
15388
|
*/
|
|
15389
15389
|
<Output, Error, Env>(schedule: Schedule<Output, unknown, Error, Env>): <A, E, R>(self: Effect<A, E, R>) => Effect<Output, E, R | Env>
|
|
@@ -15431,7 +15431,7 @@ export const schedule: {
|
|
|
15431
15431
|
* @see {@link scheduleFrom} for a variant that allows the schedule's decision
|
|
15432
15432
|
* to depend on the result of this effect.
|
|
15433
15433
|
*
|
|
15434
|
-
* @category repetition
|
|
15434
|
+
* @category repetition
|
|
15435
15435
|
* @since 2.0.0
|
|
15436
15436
|
*/
|
|
15437
15437
|
<A, E, R, Output, Error, Env>(self: Effect<A, E, R>, schedule: Schedule<Output, unknown, Error, Env>): Effect<Output, E, R | Env>
|
|
@@ -15474,7 +15474,7 @@ export const schedule: {
|
|
|
15474
15474
|
* // Returns the schedule count
|
|
15475
15475
|
* ```
|
|
15476
15476
|
*
|
|
15477
|
-
* @category repetition
|
|
15477
|
+
* @category repetition
|
|
15478
15478
|
* @since 2.0.0
|
|
15479
15479
|
*/
|
|
15480
15480
|
export const scheduleFrom: {
|
|
@@ -15512,7 +15512,7 @@ export const scheduleFrom: {
|
|
|
15512
15512
|
* // Returns the schedule count
|
|
15513
15513
|
* ```
|
|
15514
15514
|
*
|
|
15515
|
-
* @category repetition
|
|
15515
|
+
* @category repetition
|
|
15516
15516
|
* @since 2.0.0
|
|
15517
15517
|
*/
|
|
15518
15518
|
<Input, Output, Error, Env>(initial: Input, schedule: Schedule<Output, Input, Error, Env>): <E, R>(self: Effect<Input, E, R>) => Effect<Output, E, R | Env>
|
|
@@ -15550,7 +15550,7 @@ export const scheduleFrom: {
|
|
|
15550
15550
|
* // Returns the schedule count
|
|
15551
15551
|
* ```
|
|
15552
15552
|
*
|
|
15553
|
-
* @category repetition
|
|
15553
|
+
* @category repetition
|
|
15554
15554
|
* @since 2.0.0
|
|
15555
15555
|
*/
|
|
15556
15556
|
<Input, E, R, Output, Error, Env>(
|
|
@@ -17182,7 +17182,7 @@ export const fiberId: Effect<number> = internal.fiberId
|
|
|
17182
17182
|
* @see {@link runPromise} for promise-based running with these options
|
|
17183
17183
|
* @see {@link runPromiseExit} for promise-based running that returns an `Exit`
|
|
17184
17184
|
*
|
|
17185
|
-
* @category running
|
|
17185
|
+
* @category running
|
|
17186
17186
|
* @since 4.0.0
|
|
17187
17187
|
*/
|
|
17188
17188
|
export interface RunOptions {
|
|
@@ -17223,7 +17223,7 @@ export interface RunOptions {
|
|
|
17223
17223
|
* }, 500)
|
|
17224
17224
|
* ```
|
|
17225
17225
|
*
|
|
17226
|
-
* @category running
|
|
17226
|
+
* @category running
|
|
17227
17227
|
* @since 2.0.0
|
|
17228
17228
|
*/
|
|
17229
17229
|
export const runFork: <A, E>(effect: Effect<A, E, never>, options?: RunOptions | undefined) => Fiber<A, E> =
|
|
@@ -17256,7 +17256,7 @@ export const runFork: <A, E>(effect: Effect<A, E, never>, options?: RunOptions |
|
|
|
17256
17256
|
* const fiber = Effect.runForkWith(services)(program)
|
|
17257
17257
|
* ```
|
|
17258
17258
|
*
|
|
17259
|
-
* @category running
|
|
17259
|
+
* @category running
|
|
17260
17260
|
* @since 4.0.0
|
|
17261
17261
|
*/
|
|
17262
17262
|
export const runForkWith: <R>(
|
|
@@ -17303,7 +17303,7 @@ export const runForkWith: <R>(
|
|
|
17303
17303
|
* interrupt()
|
|
17304
17304
|
* ```
|
|
17305
17305
|
*
|
|
17306
|
-
* @category running
|
|
17306
|
+
* @category running
|
|
17307
17307
|
* @since 4.0.0
|
|
17308
17308
|
*/
|
|
17309
17309
|
export const runCallbackWith: <R>(
|
|
@@ -17350,7 +17350,7 @@ export const runCallbackWith: <R>(
|
|
|
17350
17350
|
* // interrupt() to cancel the fiber if needed
|
|
17351
17351
|
* ```
|
|
17352
17352
|
*
|
|
17353
|
-
* @category running
|
|
17353
|
+
* @category running
|
|
17354
17354
|
* @since 2.0.0
|
|
17355
17355
|
*/
|
|
17356
17356
|
export const runCallback: <A, E>(
|
|
@@ -17391,7 +17391,7 @@ export const runCallback: <A, E>(
|
|
|
17391
17391
|
* ```
|
|
17392
17392
|
*
|
|
17393
17393
|
* @see {@link runPromiseExit} for a version that returns an `Exit` type instead of rejecting.
|
|
17394
|
-
* @category running
|
|
17394
|
+
* @category running
|
|
17395
17395
|
* @since 2.0.0
|
|
17396
17396
|
*/
|
|
17397
17397
|
export const runPromise: <A, E>(
|
|
@@ -17425,7 +17425,7 @@ export const runPromise: <A, E>(
|
|
|
17425
17425
|
* Effect.runPromiseWith(context)(program).then(console.log)
|
|
17426
17426
|
* ```
|
|
17427
17427
|
*
|
|
17428
|
-
* @category running
|
|
17428
|
+
* @category running
|
|
17429
17429
|
* @since 4.0.0
|
|
17430
17430
|
*/
|
|
17431
17431
|
export const runPromiseWith: <R>(
|
|
@@ -17478,7 +17478,7 @@ export const runPromiseWith: <R>(
|
|
|
17478
17478
|
*
|
|
17479
17479
|
* @see {@link runPromise} for a version that rejects on failure.
|
|
17480
17480
|
*
|
|
17481
|
-
* @category running
|
|
17481
|
+
* @category running
|
|
17482
17482
|
* @since 2.0.0
|
|
17483
17483
|
*/
|
|
17484
17484
|
export const runPromiseExit: <A, E>(
|
|
@@ -17516,7 +17516,7 @@ export const runPromiseExit: <A, E>(
|
|
|
17516
17516
|
* })
|
|
17517
17517
|
* ```
|
|
17518
17518
|
*
|
|
17519
|
-
* @category running
|
|
17519
|
+
* @category running
|
|
17520
17520
|
* @since 4.0.0
|
|
17521
17521
|
*/
|
|
17522
17522
|
export const runPromiseExitWith: <R>(
|
|
@@ -17581,7 +17581,7 @@ export const runPromiseExitWith: <R>(
|
|
|
17581
17581
|
*
|
|
17582
17582
|
* @see {@link runSyncExit} for a version that returns an `Exit` type instead of
|
|
17583
17583
|
* throwing an error.
|
|
17584
|
-
* @category running
|
|
17584
|
+
* @category running
|
|
17585
17585
|
* @since 2.0.0
|
|
17586
17586
|
*/
|
|
17587
17587
|
export const runSync: <A, E>(effect: Effect<A, E>) => A = internal.runSync
|
|
@@ -17613,7 +17613,7 @@ export const runSync: <A, E>(effect: Effect<A, E>) => A = internal.runSync
|
|
|
17613
17613
|
* console.log(result) // 5
|
|
17614
17614
|
* ```
|
|
17615
17615
|
*
|
|
17616
|
-
* @category running
|
|
17616
|
+
* @category running
|
|
17617
17617
|
* @since 4.0.0
|
|
17618
17618
|
*/
|
|
17619
17619
|
export const runSyncWith: <R>(
|
|
@@ -17690,7 +17690,7 @@ export const runSyncWith: <R>(
|
|
|
17690
17690
|
*
|
|
17691
17691
|
* @see {@link runSync} for a version that throws on failure.
|
|
17692
17692
|
*
|
|
17693
|
-
* @category running
|
|
17693
|
+
* @category running
|
|
17694
17694
|
* @since 2.0.0
|
|
17695
17695
|
*/
|
|
17696
17696
|
export const runSyncExit: <A, E>(effect: Effect<A, E>) => Exit.Exit<A, E> = internal.runSyncExit
|
|
@@ -17731,7 +17731,7 @@ export const runSyncExit: <A, E>(effect: Effect<A, E>) => Exit.Exit<A, E> = inte
|
|
|
17731
17731
|
* // Success: 42
|
|
17732
17732
|
* ```
|
|
17733
17733
|
*
|
|
17734
|
-
* @category running
|
|
17734
|
+
* @category running
|
|
17735
17735
|
* @since 4.0.0
|
|
17736
17736
|
*/
|
|
17737
17737
|
export const runSyncExitWith: <R>(
|
|
@@ -24351,7 +24351,7 @@ export declare namespace Effectify {
|
|
|
24351
24351
|
/**
|
|
24352
24352
|
* Extracts the callback error type from a callback-based function type.
|
|
24353
24353
|
*
|
|
24354
|
-
* @category
|
|
24354
|
+
* @category effectify
|
|
24355
24355
|
* @since 4.0.0
|
|
24356
24356
|
*/
|
|
24357
24357
|
export type EffectifyError<T> = T extends {
|
package/src/Equal.ts
CHANGED
|
@@ -570,7 +570,7 @@ export const asEquivalence: <A>() => Equivalence<A> = () => equals
|
|
|
570
570
|
* @see {@link byReferenceUnsafe} — same effect without a proxy (mutates the
|
|
571
571
|
* original)
|
|
572
572
|
* @see {@link equals} — the comparison function affected by this opt-out
|
|
573
|
-
* @category
|
|
573
|
+
* @category equality
|
|
574
574
|
* @since 4.0.0
|
|
575
575
|
*/
|
|
576
576
|
export const byReference = <T extends object>(obj: T): T => byReferenceUnsafe(new Proxy(obj, {}))
|
|
@@ -614,7 +614,7 @@ export const byReference = <T extends object>(obj: T): T => byReferenceUnsafe(ne
|
|
|
614
614
|
*
|
|
615
615
|
* @see {@link byReference} — safer alternative that creates a proxy
|
|
616
616
|
* @see {@link equals} — the comparison function affected by this opt-out
|
|
617
|
-
* @category
|
|
617
|
+
* @category unsafe
|
|
618
618
|
* @since 4.0.0
|
|
619
619
|
*/
|
|
620
620
|
export const byReferenceUnsafe = <T extends object>(obj: T): T => {
|
package/src/Equivalence.ts
CHANGED
|
@@ -1094,7 +1094,7 @@ export function Record<A>(value: Equivalence<A>): Equivalence<Record<PropertyKey
|
|
|
1094
1094
|
* @see {@link combine} Combine two equivalences
|
|
1095
1095
|
* @see {@link combineAll} Combine multiple equivalences
|
|
1096
1096
|
* @see {@link Reducer} Reducer type for collection operations
|
|
1097
|
-
* @category
|
|
1097
|
+
* @category constructors
|
|
1098
1098
|
* @since 4.0.0
|
|
1099
1099
|
*/
|
|
1100
1100
|
export function makeReducer<A>() {
|
package/src/ExecutionPlan.ts
CHANGED
|
@@ -441,7 +441,7 @@ const makeProto = <Provides, In, PlanE, PlanR>(
|
|
|
441
441
|
*
|
|
442
442
|
* @see {@link make} for building a plan from individual steps instead of combining existing plans
|
|
443
443
|
*
|
|
444
|
-
* @category
|
|
444
|
+
* @category combining
|
|
445
445
|
* @since 3.16.0
|
|
446
446
|
*/
|
|
447
447
|
export const merge = <const Plans extends NonEmptyReadonlyArray<ExecutionPlan<any>>>(
|
|
@@ -461,7 +461,7 @@ export const merge = <const Plans extends NonEmptyReadonlyArray<ExecutionPlan<an
|
|
|
461
461
|
* `attempt` is the current 1-based attempt number, and `stepIndex` is the
|
|
462
462
|
* 0-based index of the plan step currently being evaluated.
|
|
463
463
|
*
|
|
464
|
-
* @category
|
|
464
|
+
* @category metadata
|
|
465
465
|
* @since 4.0.0
|
|
466
466
|
*/
|
|
467
467
|
export interface Metadata {
|
package/src/FileSystem.ts
CHANGED
|
@@ -778,7 +778,7 @@ export type OpenFlag =
|
|
|
778
778
|
* )
|
|
779
779
|
* ```
|
|
780
780
|
*
|
|
781
|
-
* @category
|
|
781
|
+
* @category services
|
|
782
782
|
* @since 4.0.0
|
|
783
783
|
*/
|
|
784
784
|
export const FileSystem: Context.Service<FileSystem, FileSystem> = Context.Service("effect/platform/FileSystem")
|
|
@@ -1104,7 +1104,7 @@ export const FileTypeId = "~effect/platform/FileSystem/File"
|
|
|
1104
1104
|
* @see {@link File} for the file-handle interface narrowed by this guard
|
|
1105
1105
|
* @see {@link FileTypeId} for the runtime marker checked by this guard
|
|
1106
1106
|
*
|
|
1107
|
-
* @category
|
|
1107
|
+
* @category file
|
|
1108
1108
|
* @since 4.0.0
|
|
1109
1109
|
*/
|
|
1110
1110
|
export const isFile = (u: unknown): u is File => hasProperty(u, FileTypeId)
|
|
@@ -1150,7 +1150,7 @@ export const isFile = (u: unknown): u is File => hasProperty(u, FileTypeId)
|
|
|
1150
1150
|
* })
|
|
1151
1151
|
* ```
|
|
1152
1152
|
*
|
|
1153
|
-
* @category
|
|
1153
|
+
* @category file
|
|
1154
1154
|
* @since 4.0.0
|
|
1155
1155
|
*/
|
|
1156
1156
|
export interface File {
|
|
@@ -1181,7 +1181,7 @@ export declare namespace File {
|
|
|
1181
1181
|
* File descriptors are numeric handles used by the operating system
|
|
1182
1182
|
* to identify open files. The branded type ensures type safety.
|
|
1183
1183
|
*
|
|
1184
|
-
* @category
|
|
1184
|
+
* @category file
|
|
1185
1185
|
* @since 4.0.0
|
|
1186
1186
|
*/
|
|
1187
1187
|
export type Descriptor = Brand.Branded<number, "FileDescriptor">
|
|
@@ -1194,7 +1194,7 @@ export declare namespace File {
|
|
|
1194
1194
|
* Represents the different types of entries that can exist in a file system,
|
|
1195
1195
|
* from regular files to special device files and symbolic links.
|
|
1196
1196
|
*
|
|
1197
|
-
* @category
|
|
1197
|
+
* @category file
|
|
1198
1198
|
* @since 4.0.0
|
|
1199
1199
|
*/
|
|
1200
1200
|
export type Type =
|
|
@@ -1249,7 +1249,7 @@ export declare namespace File {
|
|
|
1249
1249
|
* })
|
|
1250
1250
|
* ```
|
|
1251
1251
|
*
|
|
1252
|
-
* @category
|
|
1252
|
+
* @category file
|
|
1253
1253
|
* @since 4.0.0
|
|
1254
1254
|
*/
|
|
1255
1255
|
export interface Info {
|
package/src/Function.ts
CHANGED
|
@@ -430,7 +430,7 @@ export const identity = <A>(a: A): A => a
|
|
|
430
430
|
*
|
|
431
431
|
* @see {@link cast} for changing only the static TypeScript type
|
|
432
432
|
*
|
|
433
|
-
* @category
|
|
433
|
+
* @category utility types
|
|
434
434
|
* @since 2.0.0
|
|
435
435
|
*/
|
|
436
436
|
export const satisfies = <A>() => <B extends A>(b: B) => b
|
|
@@ -450,7 +450,7 @@ export const satisfies = <A>() => <B extends A>(b: B) => b
|
|
|
450
450
|
*
|
|
451
451
|
* @see {@link satisfies} for checking assignability without changing the resulting type
|
|
452
452
|
*
|
|
453
|
-
* @category
|
|
453
|
+
* @category utility types
|
|
454
454
|
* @since 4.0.0
|
|
455
455
|
*/
|
|
456
456
|
export const cast: <A, B>(a: A) => B = identity as any
|
|
@@ -722,7 +722,7 @@ export const compose: {
|
|
|
722
722
|
* }
|
|
723
723
|
* ```
|
|
724
724
|
*
|
|
725
|
-
* @category
|
|
725
|
+
* @category utility types
|
|
726
726
|
* @since 2.0.0
|
|
727
727
|
*/
|
|
728
728
|
export const absurd = <A>(_: never): A => {
|
|
@@ -1561,7 +1561,7 @@ export function flow(
|
|
|
1561
1561
|
* console.log(typeof buildUser) // "function"
|
|
1562
1562
|
* ```
|
|
1563
1563
|
*
|
|
1564
|
-
* @category
|
|
1564
|
+
* @category utility types
|
|
1565
1565
|
* @since 2.0.0
|
|
1566
1566
|
*/
|
|
1567
1567
|
export const hole: <T>() => T = cast(absurd)
|
|
@@ -1610,7 +1610,7 @@ export const SK = <A, B>(_: A, b: B): B => b
|
|
|
1610
1610
|
* mutated after its first call, later calls still return the cached result for
|
|
1611
1611
|
* that reference.
|
|
1612
1612
|
*
|
|
1613
|
-
* @category
|
|
1613
|
+
* @category caching
|
|
1614
1614
|
* @since 4.0.0
|
|
1615
1615
|
*/
|
|
1616
1616
|
export function memoize<A extends object, O>(f: (a: A) => O): (ast: A) => O {
|