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/Queue.ts
CHANGED
|
@@ -891,7 +891,7 @@ export const offerAllUnsafe = <A, E>(self: Enqueue<A, E>, messages: Iterable<A>)
|
|
|
891
891
|
* })
|
|
892
892
|
* ```
|
|
893
893
|
*
|
|
894
|
-
* @category
|
|
894
|
+
* @category completion
|
|
895
895
|
* @since 4.0.0
|
|
896
896
|
*/
|
|
897
897
|
export const fail = <A, E>(self: Enqueue<A, E>, error: E) => failCause(self, core.causeFail(error))
|
|
@@ -918,7 +918,7 @@ export const fail = <A, E>(self: Enqueue<A, E>, error: E) => failCause(self, cor
|
|
|
918
918
|
* })
|
|
919
919
|
* ```
|
|
920
920
|
*
|
|
921
|
-
* @category
|
|
921
|
+
* @category completion
|
|
922
922
|
* @since 4.0.0
|
|
923
923
|
*/
|
|
924
924
|
export const failCause: {
|
|
@@ -944,7 +944,7 @@ export const failCause: {
|
|
|
944
944
|
* })
|
|
945
945
|
* ```
|
|
946
946
|
*
|
|
947
|
-
* @category
|
|
947
|
+
* @category completion
|
|
948
948
|
* @since 4.0.0
|
|
949
949
|
*/
|
|
950
950
|
<E>(cause: Cause<E>): <A>(self: Enqueue<A, E>) => Effect<boolean>
|
|
@@ -970,7 +970,7 @@ export const failCause: {
|
|
|
970
970
|
* })
|
|
971
971
|
* ```
|
|
972
972
|
*
|
|
973
|
-
* @category
|
|
973
|
+
* @category completion
|
|
974
974
|
* @since 4.0.0
|
|
975
975
|
*/
|
|
976
976
|
<A, E>(self: Enqueue<A, E>, cause: Cause<E>): Effect<boolean>
|
|
@@ -1006,7 +1006,7 @@ export const failCause: {
|
|
|
1006
1006
|
* })
|
|
1007
1007
|
* ```
|
|
1008
1008
|
*
|
|
1009
|
-
* @category
|
|
1009
|
+
* @category completion
|
|
1010
1010
|
* @since 4.0.0
|
|
1011
1011
|
*/
|
|
1012
1012
|
export const failCauseUnsafe = <A, E>(self: Enqueue<A, E>, cause: Cause<E>): boolean => {
|
|
@@ -1064,7 +1064,7 @@ export const failCauseUnsafe = <A, E>(self: Enqueue<A, E>, cause: Cause<E>): boo
|
|
|
1064
1064
|
* })
|
|
1065
1065
|
* ```
|
|
1066
1066
|
*
|
|
1067
|
-
* @category
|
|
1067
|
+
* @category completion
|
|
1068
1068
|
* @since 4.0.0
|
|
1069
1069
|
*/
|
|
1070
1070
|
export const end = <A, E>(self: Enqueue<A, E | Done>): Effect<boolean> => failCause(self, core.causeFail(core.Done()))
|
|
@@ -1113,7 +1113,7 @@ export const end = <A, E>(self: Enqueue<A, E | Done>): Effect<boolean> => failCa
|
|
|
1113
1113
|
* })
|
|
1114
1114
|
* ```
|
|
1115
1115
|
*
|
|
1116
|
-
* @category
|
|
1116
|
+
* @category completion
|
|
1117
1117
|
* @since 4.0.0
|
|
1118
1118
|
*/
|
|
1119
1119
|
export const endUnsafe = <A, E>(self: Enqueue<A, E | Done>) => failCauseUnsafe(self, core.causeFail(core.Done()))
|
|
@@ -1159,7 +1159,7 @@ export const endUnsafe = <A, E>(self: Enqueue<A, E | Done>) => failCauseUnsafe(s
|
|
|
1159
1159
|
* })
|
|
1160
1160
|
* ```
|
|
1161
1161
|
*
|
|
1162
|
-
* @category
|
|
1162
|
+
* @category completion
|
|
1163
1163
|
* @since 4.0.0
|
|
1164
1164
|
*/
|
|
1165
1165
|
export const interrupt = <A, E>(self: Enqueue<A, E>): Effect<boolean> =>
|
|
@@ -1196,7 +1196,7 @@ export const interrupt = <A, E>(self: Enqueue<A, E>): Effect<boolean> =>
|
|
|
1196
1196
|
* })
|
|
1197
1197
|
* ```
|
|
1198
1198
|
*
|
|
1199
|
-
* @category
|
|
1199
|
+
* @category completion
|
|
1200
1200
|
* @since 2.0.0
|
|
1201
1201
|
*/
|
|
1202
1202
|
export const shutdown = <A, E>(self: Enqueue<A, E>): Effect<boolean> =>
|
|
@@ -1295,7 +1295,7 @@ export const clear = <A, E>(self: Dequeue<A, E>): Effect<Array<A>, Pull.ExcludeD
|
|
|
1295
1295
|
* })
|
|
1296
1296
|
* ```
|
|
1297
1297
|
*
|
|
1298
|
-
* @category
|
|
1298
|
+
* @category taking
|
|
1299
1299
|
* @since 2.0.0
|
|
1300
1300
|
*/
|
|
1301
1301
|
export const takeAll = <A, E>(self: Dequeue<A, E>): Effect<Arr.NonEmptyArray<A>, E> =>
|
|
@@ -1323,7 +1323,7 @@ export const takeAll = <A, E>(self: Dequeue<A, E>): Effect<Arr.NonEmptyArray<A>,
|
|
|
1323
1323
|
* })
|
|
1324
1324
|
* ```
|
|
1325
1325
|
*
|
|
1326
|
-
* @category
|
|
1326
|
+
* @category taking
|
|
1327
1327
|
* @since 4.0.0
|
|
1328
1328
|
*/
|
|
1329
1329
|
export const collect = <A, E>(self: Dequeue<A, E | Done>): Effect<Array<A>, Pull.ExcludeDone<E>> =>
|
|
@@ -1381,7 +1381,7 @@ export const collect = <A, E>(self: Dequeue<A, E | Done>): Effect<Array<A>, Pull
|
|
|
1381
1381
|
* })
|
|
1382
1382
|
* ```
|
|
1383
1383
|
*
|
|
1384
|
-
* @category
|
|
1384
|
+
* @category taking
|
|
1385
1385
|
* @since 2.0.0
|
|
1386
1386
|
*/
|
|
1387
1387
|
export const takeN = <A, E>(
|
|
@@ -1423,7 +1423,7 @@ export const takeN = <A, E>(
|
|
|
1423
1423
|
* })
|
|
1424
1424
|
* ```
|
|
1425
1425
|
*
|
|
1426
|
-
* @category
|
|
1426
|
+
* @category taking
|
|
1427
1427
|
* @since 2.0.0
|
|
1428
1428
|
*/
|
|
1429
1429
|
export const takeBetween = <A, E>(
|
|
@@ -1473,7 +1473,7 @@ export const takeBetween = <A, E>(
|
|
|
1473
1473
|
* })
|
|
1474
1474
|
* ```
|
|
1475
1475
|
*
|
|
1476
|
-
* @category
|
|
1476
|
+
* @category taking
|
|
1477
1477
|
* @since 2.0.0
|
|
1478
1478
|
*/
|
|
1479
1479
|
export const take = <A, E>(self: Dequeue<A, E>): Effect<A, E> =>
|
|
@@ -1511,7 +1511,7 @@ export const take = <A, E>(self: Dequeue<A, E>): Effect<A, E> =>
|
|
|
1511
1511
|
* })
|
|
1512
1512
|
* ```
|
|
1513
1513
|
*
|
|
1514
|
-
* @category
|
|
1514
|
+
* @category taking
|
|
1515
1515
|
* @since 2.0.0
|
|
1516
1516
|
*/
|
|
1517
1517
|
export const poll = <A, E>(self: Dequeue<A, E>): Effect<Option.Option<A>> =>
|
|
@@ -1597,7 +1597,7 @@ export const peek = <A, E>(self: Dequeue<A, E>): Effect<A, E> =>
|
|
|
1597
1597
|
* })
|
|
1598
1598
|
* ```
|
|
1599
1599
|
*
|
|
1600
|
-
* @category
|
|
1600
|
+
* @category taking
|
|
1601
1601
|
* @since 4.0.0
|
|
1602
1602
|
*/
|
|
1603
1603
|
export const takeUnsafe = <A, E>(self: Dequeue<A, E>): Exit<A, E> | undefined => {
|
|
@@ -1661,7 +1661,7 @@ export {
|
|
|
1661
1661
|
* @see {@link interrupt} for graceful interruption after buffered messages are drained
|
|
1662
1662
|
* @see {@link shutdown} for immediately discarding buffered messages and resuming pending operations
|
|
1663
1663
|
*
|
|
1664
|
-
* @category
|
|
1664
|
+
* @category completion
|
|
1665
1665
|
* @since 4.0.0
|
|
1666
1666
|
*/
|
|
1667
1667
|
await_ as await
|
|
@@ -1702,7 +1702,7 @@ export {
|
|
|
1702
1702
|
* })
|
|
1703
1703
|
* ```
|
|
1704
1704
|
*
|
|
1705
|
-
* @category
|
|
1705
|
+
* @category sizes
|
|
1706
1706
|
* @since 2.0.0
|
|
1707
1707
|
*/
|
|
1708
1708
|
export const size = <A, E>(self: Dequeue<A, E>): Effect<number> => internalEffect.sync(() => sizeUnsafe(self))
|
|
@@ -1727,7 +1727,7 @@ export const size = <A, E>(self: Dequeue<A, E>): Effect<number> => internalEffec
|
|
|
1727
1727
|
* })
|
|
1728
1728
|
* ```
|
|
1729
1729
|
*
|
|
1730
|
-
* @category
|
|
1730
|
+
* @category sizes
|
|
1731
1731
|
* @since 2.0.0
|
|
1732
1732
|
*/
|
|
1733
1733
|
export const isFull = <A, E>(self: Dequeue<A, E>): Effect<boolean> => internalEffect.sync(() => isFullUnsafe(self))
|
|
@@ -1770,7 +1770,7 @@ export const isFull = <A, E>(self: Dequeue<A, E>): Effect<boolean> => internalEf
|
|
|
1770
1770
|
* })
|
|
1771
1771
|
* ```
|
|
1772
1772
|
*
|
|
1773
|
-
* @category
|
|
1773
|
+
* @category sizes
|
|
1774
1774
|
* @since 4.0.0
|
|
1775
1775
|
*/
|
|
1776
1776
|
export const sizeUnsafe = <A, E>(self: Dequeue<A, E>): number => self.state._tag === "Done" ? 0 : self.messages.length
|
|
@@ -1795,7 +1795,7 @@ export const sizeUnsafe = <A, E>(self: Dequeue<A, E>): number => self.state._tag
|
|
|
1795
1795
|
* })
|
|
1796
1796
|
* ```
|
|
1797
1797
|
*
|
|
1798
|
-
* @category
|
|
1798
|
+
* @category sizes
|
|
1799
1799
|
* @since 4.0.0
|
|
1800
1800
|
*/
|
|
1801
1801
|
export const isFullUnsafe = <A, E>(self: Dequeue<A, E>): boolean => sizeUnsafe(self) === self.capacity
|
|
@@ -1831,7 +1831,7 @@ export const isFullUnsafe = <A, E>(self: Dequeue<A, E>): boolean => sizeUnsafe(s
|
|
|
1831
1831
|
* })
|
|
1832
1832
|
* ```
|
|
1833
1833
|
*
|
|
1834
|
-
* @category
|
|
1834
|
+
* @category completion
|
|
1835
1835
|
* @since 4.0.0
|
|
1836
1836
|
*/
|
|
1837
1837
|
export const into: {
|
|
@@ -1866,7 +1866,7 @@ export const into: {
|
|
|
1866
1866
|
* })
|
|
1867
1867
|
* ```
|
|
1868
1868
|
*
|
|
1869
|
-
* @category
|
|
1869
|
+
* @category completion
|
|
1870
1870
|
* @since 4.0.0
|
|
1871
1871
|
*/
|
|
1872
1872
|
<A, E>(self: Enqueue<A, E | Done>): <AX, EX extends E, RX>(
|
|
@@ -1903,7 +1903,7 @@ export const into: {
|
|
|
1903
1903
|
* })
|
|
1904
1904
|
* ```
|
|
1905
1905
|
*
|
|
1906
|
-
* @category
|
|
1906
|
+
* @category completion
|
|
1907
1907
|
* @since 4.0.0
|
|
1908
1908
|
*/
|
|
1909
1909
|
<AX, E, EX extends E, RX, A>(effect: Effect<AX, EX, RX>, self: Enqueue<A, E | Done>): Effect<boolean, never, RX>
|
package/src/Record.ts
CHANGED
|
@@ -661,7 +661,7 @@ export const get: {
|
|
|
661
661
|
* Record.modify(input, "b", f) // Option.none()
|
|
662
662
|
* ```
|
|
663
663
|
*
|
|
664
|
-
* @category
|
|
664
|
+
* @category mutations
|
|
665
665
|
* @since 2.0.0
|
|
666
666
|
*/
|
|
667
667
|
export const modify: {
|
|
@@ -682,7 +682,7 @@ export const modify: {
|
|
|
682
682
|
* Record.modify(input, "b", f) // Option.none()
|
|
683
683
|
* ```
|
|
684
684
|
*
|
|
685
|
-
* @category
|
|
685
|
+
* @category mutations
|
|
686
686
|
* @since 2.0.0
|
|
687
687
|
*/
|
|
688
688
|
<K extends string | symbol, A, B>(key: NoInfer<K>, f: (a: A) => B): (self: ReadonlyRecord<K, A>) => Option.Option<Record<K, A | B>>
|
|
@@ -703,7 +703,7 @@ export const modify: {
|
|
|
703
703
|
* Record.modify(input, "b", f) // Option.none()
|
|
704
704
|
* ```
|
|
705
705
|
*
|
|
706
|
-
* @category
|
|
706
|
+
* @category mutations
|
|
707
707
|
* @since 2.0.0
|
|
708
708
|
*/
|
|
709
709
|
<K extends string | symbol, A, B>(self: ReadonlyRecord<K, A>, key: NoInfer<K>, f: (a: A) => B): Option.Option<Record<K, A | B>>
|
|
@@ -737,7 +737,7 @@ export const modify: {
|
|
|
737
737
|
* Record.replace(Record.empty<string>(), "a", 10) // Option.none()
|
|
738
738
|
* ```
|
|
739
739
|
*
|
|
740
|
-
* @category
|
|
740
|
+
* @category mutations
|
|
741
741
|
* @since 2.0.0
|
|
742
742
|
*/
|
|
743
743
|
export const replace: {
|
|
@@ -759,7 +759,7 @@ export const replace: {
|
|
|
759
759
|
* Record.replace(Record.empty<string>(), "a", 10) // Option.none()
|
|
760
760
|
* ```
|
|
761
761
|
*
|
|
762
|
-
* @category
|
|
762
|
+
* @category mutations
|
|
763
763
|
* @since 2.0.0
|
|
764
764
|
*/
|
|
765
765
|
<K extends string | symbol, B>(key: NoInfer<K>, b: B): <A>(self: ReadonlyRecord<K, A>) => Option.Option<Record<K, A | B>>
|
|
@@ -781,7 +781,7 @@ export const replace: {
|
|
|
781
781
|
* Record.replace(Record.empty<string>(), "a", 10) // Option.none()
|
|
782
782
|
* ```
|
|
783
783
|
*
|
|
784
|
-
* @category
|
|
784
|
+
* @category mutations
|
|
785
785
|
* @since 2.0.0
|
|
786
786
|
*/
|
|
787
787
|
<K extends string | symbol, A, B>(self: ReadonlyRecord<K, A>, key: NoInfer<K>, b: B): Option.Option<Record<K, A | B>>
|
|
@@ -815,7 +815,7 @@ export const replace: {
|
|
|
815
815
|
* assert.deepStrictEqual(Record.remove({ a: 1, b: 2 }, "a"), { b: 2 })
|
|
816
816
|
* ```
|
|
817
817
|
*
|
|
818
|
-
* @category
|
|
818
|
+
* @category mutations
|
|
819
819
|
* @since 2.0.0
|
|
820
820
|
*/
|
|
821
821
|
export const remove: {
|
|
@@ -840,7 +840,7 @@ export const remove: {
|
|
|
840
840
|
* assert.deepStrictEqual(Record.remove({ a: 1, b: 2 }, "a"), { b: 2 })
|
|
841
841
|
* ```
|
|
842
842
|
*
|
|
843
|
-
* @category
|
|
843
|
+
* @category mutations
|
|
844
844
|
* @since 2.0.0
|
|
845
845
|
*/
|
|
846
846
|
<K extends string | symbol, X extends K>(key: X): <A>(self: ReadonlyRecord<K, A>) => Record<Exclude<K, X>, A>
|
|
@@ -865,7 +865,7 @@ export const remove: {
|
|
|
865
865
|
* assert.deepStrictEqual(Record.remove({ a: 1, b: 2 }, "a"), { b: 2 })
|
|
866
866
|
* ```
|
|
867
867
|
*
|
|
868
|
-
* @category
|
|
868
|
+
* @category mutations
|
|
869
869
|
* @since 2.0.0
|
|
870
870
|
*/
|
|
871
871
|
<K extends string | symbol, A, X extends K>(self: ReadonlyRecord<K, A>, key: X): Record<Exclude<K, X>, A>
|
|
@@ -897,7 +897,7 @@ export const remove: {
|
|
|
897
897
|
* Record.pop(input, "c") // Option.none()
|
|
898
898
|
* ```
|
|
899
899
|
*
|
|
900
|
-
* @category
|
|
900
|
+
* @category mutations
|
|
901
901
|
* @since 2.0.0
|
|
902
902
|
*/
|
|
903
903
|
export const pop: {
|
|
@@ -917,7 +917,7 @@ export const pop: {
|
|
|
917
917
|
* Record.pop(input, "c") // Option.none()
|
|
918
918
|
* ```
|
|
919
919
|
*
|
|
920
|
-
* @category
|
|
920
|
+
* @category mutations
|
|
921
921
|
* @since 2.0.0
|
|
922
922
|
*/
|
|
923
923
|
<K extends string | symbol, X extends K>(key: X): <A>(self: ReadonlyRecord<K, A>) => Option.Option<[A, Record<Exclude<K, X>, A>]>
|
|
@@ -937,7 +937,7 @@ export const pop: {
|
|
|
937
937
|
* Record.pop(input, "c") // Option.none()
|
|
938
938
|
* ```
|
|
939
939
|
*
|
|
940
|
-
* @category
|
|
940
|
+
* @category mutations
|
|
941
941
|
* @since 2.0.0
|
|
942
942
|
*/
|
|
943
943
|
<K extends string | symbol, A, X extends K>(self: ReadonlyRecord<K, A>, key: X): Option.Option<[A, Record<Exclude<K, X>, A>]>
|
|
@@ -1616,7 +1616,7 @@ export const values = <K extends string, A>(self: ReadonlyRecord<K, A>): Array<A
|
|
|
1616
1616
|
* assert.deepStrictEqual(Record.set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 })
|
|
1617
1617
|
* ```
|
|
1618
1618
|
*
|
|
1619
|
-
* @category
|
|
1619
|
+
* @category mutations
|
|
1620
1620
|
* @since 2.0.0
|
|
1621
1621
|
*/
|
|
1622
1622
|
export const set: {
|
|
@@ -1633,7 +1633,7 @@ export const set: {
|
|
|
1633
1633
|
* assert.deepStrictEqual(Record.set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 })
|
|
1634
1634
|
* ```
|
|
1635
1635
|
*
|
|
1636
|
-
* @category
|
|
1636
|
+
* @category mutations
|
|
1637
1637
|
* @since 2.0.0
|
|
1638
1638
|
*/
|
|
1639
1639
|
<K extends string | symbol, K1 extends K | ((string | symbol) & {}), B>(key: K1, value: B): <A>(self: ReadonlyRecord<K, A>) => Record<K | K1, A | B>
|
|
@@ -1650,7 +1650,7 @@ export const set: {
|
|
|
1650
1650
|
* assert.deepStrictEqual(Record.set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 })
|
|
1651
1651
|
* ```
|
|
1652
1652
|
*
|
|
1653
|
-
* @category
|
|
1653
|
+
* @category mutations
|
|
1654
1654
|
* @since 2.0.0
|
|
1655
1655
|
*/
|
|
1656
1656
|
<K extends string | symbol, A, K1 extends K | ((string | symbol) & {}), B>(self: ReadonlyRecord<K, A>, key: K1, value: B): Record<K | K1, A | B>
|
package/src/Redacted.ts
CHANGED
|
@@ -155,7 +155,7 @@ export declare namespace Redacted {
|
|
|
155
155
|
* console.log(rotate({ token: "secret" })) // { token: "secret:rotated" }
|
|
156
156
|
* ```
|
|
157
157
|
*
|
|
158
|
-
* @category
|
|
158
|
+
* @category utility types
|
|
159
159
|
* @since 3.3.0
|
|
160
160
|
*/
|
|
161
161
|
export type Value<T extends Redacted<any>> = [T] extends [Redacted<infer _A>] ? _A : never
|
|
@@ -340,7 +340,7 @@ export const wipeUnsafe = <T>(self: Redacted<T>): boolean => redacted.redactedRe
|
|
|
340
340
|
* assert.equal(equivalence(API_KEY1, API_KEY3), true)
|
|
341
341
|
* ```
|
|
342
342
|
*
|
|
343
|
-
* @category
|
|
343
|
+
* @category instances
|
|
344
344
|
* @since 4.0.0
|
|
345
345
|
*/
|
|
346
346
|
export const makeEquivalence = <A>(isEquivalent: Equivalence.Equivalence<A>): Equivalence.Equivalence<Redacted<A>> =>
|
package/src/Ref.ts
CHANGED
|
@@ -386,7 +386,7 @@ export const set = dual<
|
|
|
386
386
|
* @see {@link set} for setting without returning the previous value
|
|
387
387
|
* @see {@link getAndUpdate} for deriving the new value from the previous value
|
|
388
388
|
*
|
|
389
|
-
* @category
|
|
389
|
+
* @category mutations
|
|
390
390
|
* @since 2.0.0
|
|
391
391
|
*/
|
|
392
392
|
export const getAndSet = dual<
|
|
@@ -417,7 +417,7 @@ export const getAndSet = dual<
|
|
|
417
417
|
* @see {@link set} for setting without returning the previous value
|
|
418
418
|
* @see {@link getAndUpdate} for deriving the new value from the previous value
|
|
419
419
|
*
|
|
420
|
-
* @category
|
|
420
|
+
* @category mutations
|
|
421
421
|
* @since 2.0.0
|
|
422
422
|
*/
|
|
423
423
|
<A>(value: A) => (self: Ref<A>) => Effect.Effect<A>,
|
|
@@ -448,7 +448,7 @@ export const getAndSet = dual<
|
|
|
448
448
|
* @see {@link set} for setting without returning the previous value
|
|
449
449
|
* @see {@link getAndUpdate} for deriving the new value from the previous value
|
|
450
450
|
*
|
|
451
|
-
* @category
|
|
451
|
+
* @category mutations
|
|
452
452
|
* @since 2.0.0
|
|
453
453
|
*/
|
|
454
454
|
<A>(self: Ref<A>, value: A) => Effect.Effect<A>
|
|
@@ -486,7 +486,7 @@ export const getAndSet = dual<
|
|
|
486
486
|
* @see {@link update} for updating without returning the previous value
|
|
487
487
|
* @see {@link updateAndGet} for returning the new value instead
|
|
488
488
|
*
|
|
489
|
-
* @category
|
|
489
|
+
* @category mutations
|
|
490
490
|
* @since 2.0.0
|
|
491
491
|
*/
|
|
492
492
|
export const getAndUpdate = dual<
|
|
@@ -517,7 +517,7 @@ export const getAndUpdate = dual<
|
|
|
517
517
|
* @see {@link update} for updating without returning the previous value
|
|
518
518
|
* @see {@link updateAndGet} for returning the new value instead
|
|
519
519
|
*
|
|
520
|
-
* @category
|
|
520
|
+
* @category mutations
|
|
521
521
|
* @since 2.0.0
|
|
522
522
|
*/
|
|
523
523
|
<A>(f: (a: A) => A) => (self: Ref<A>) => Effect.Effect<A>,
|
|
@@ -548,7 +548,7 @@ export const getAndUpdate = dual<
|
|
|
548
548
|
* @see {@link update} for updating without returning the previous value
|
|
549
549
|
* @see {@link updateAndGet} for returning the new value instead
|
|
550
550
|
*
|
|
551
|
-
* @category
|
|
551
|
+
* @category mutations
|
|
552
552
|
* @since 2.0.0
|
|
553
553
|
*/
|
|
554
554
|
<A>(self: Ref<A>, f: (a: A) => A) => Effect.Effect<A>
|
|
@@ -605,7 +605,7 @@ export const getAndUpdate = dual<
|
|
|
605
605
|
* @see {@link getAndUpdate} for always applying an update
|
|
606
606
|
* @see {@link updateSome} for conditional updates without returning the previous value
|
|
607
607
|
*
|
|
608
|
-
* @category
|
|
608
|
+
* @category mutations
|
|
609
609
|
* @since 2.0.0
|
|
610
610
|
*/
|
|
611
611
|
export const getAndUpdateSome = dual<
|
|
@@ -655,7 +655,7 @@ export const getAndUpdateSome = dual<
|
|
|
655
655
|
* @see {@link getAndUpdate} for always applying an update
|
|
656
656
|
* @see {@link updateSome} for conditional updates without returning the previous value
|
|
657
657
|
*
|
|
658
|
-
* @category
|
|
658
|
+
* @category mutations
|
|
659
659
|
* @since 2.0.0
|
|
660
660
|
*/
|
|
661
661
|
<A>(pf: (a: A) => Option.Option<A>) => (self: Ref<A>) => Effect.Effect<A>,
|
|
@@ -705,7 +705,7 @@ export const getAndUpdateSome = dual<
|
|
|
705
705
|
* @see {@link getAndUpdate} for always applying an update
|
|
706
706
|
* @see {@link updateSome} for conditional updates without returning the previous value
|
|
707
707
|
*
|
|
708
|
-
* @category
|
|
708
|
+
* @category mutations
|
|
709
709
|
* @since 2.0.0
|
|
710
710
|
*/
|
|
711
711
|
<A>(self: Ref<A>, pf: (a: A) => Option.Option<A>) => Effect.Effect<A>
|
|
@@ -753,7 +753,7 @@ export const getAndUpdateSome = dual<
|
|
|
753
753
|
* })
|
|
754
754
|
* ```
|
|
755
755
|
*
|
|
756
|
-
* @category
|
|
756
|
+
* @category mutations
|
|
757
757
|
* @since 2.0.0
|
|
758
758
|
*/
|
|
759
759
|
export const setAndGet = dual<
|
|
@@ -791,7 +791,7 @@ export const setAndGet = dual<
|
|
|
791
791
|
* })
|
|
792
792
|
* ```
|
|
793
793
|
*
|
|
794
|
-
* @category
|
|
794
|
+
* @category mutations
|
|
795
795
|
* @since 2.0.0
|
|
796
796
|
*/
|
|
797
797
|
<A>(value: A) => (self: Ref<A>) => Effect.Effect<A>,
|
|
@@ -829,7 +829,7 @@ export const setAndGet = dual<
|
|
|
829
829
|
* })
|
|
830
830
|
* ```
|
|
831
831
|
*
|
|
832
|
-
* @category
|
|
832
|
+
* @category mutations
|
|
833
833
|
* @since 2.0.0
|
|
834
834
|
*/
|
|
835
835
|
<A>(self: Ref<A>, value: A) => Effect.Effect<A>
|
|
@@ -1453,7 +1453,7 @@ export const update = dual<
|
|
|
1453
1453
|
* @see {@link update} for updating without returning the new value
|
|
1454
1454
|
* @see {@link getAndUpdate} for returning the previous value instead
|
|
1455
1455
|
*
|
|
1456
|
-
* @category
|
|
1456
|
+
* @category mutations
|
|
1457
1457
|
* @since 2.0.0
|
|
1458
1458
|
*/
|
|
1459
1459
|
export const updateAndGet = dual<
|
|
@@ -1485,7 +1485,7 @@ export const updateAndGet = dual<
|
|
|
1485
1485
|
* @see {@link update} for updating without returning the new value
|
|
1486
1486
|
* @see {@link getAndUpdate} for returning the previous value instead
|
|
1487
1487
|
*
|
|
1488
|
-
* @category
|
|
1488
|
+
* @category mutations
|
|
1489
1489
|
* @since 2.0.0
|
|
1490
1490
|
*/
|
|
1491
1491
|
<A>(f: (a: A) => A) => (self: Ref<A>) => Effect.Effect<A>,
|
|
@@ -1517,7 +1517,7 @@ export const updateAndGet = dual<
|
|
|
1517
1517
|
* @see {@link update} for updating without returning the new value
|
|
1518
1518
|
* @see {@link getAndUpdate} for returning the previous value instead
|
|
1519
1519
|
*
|
|
1520
|
-
* @category
|
|
1520
|
+
* @category mutations
|
|
1521
1521
|
* @since 2.0.0
|
|
1522
1522
|
*/
|
|
1523
1523
|
<A>(self: Ref<A>, f: (a: A) => A) => Effect.Effect<A>
|
|
@@ -1715,7 +1715,7 @@ export const updateSome = dual<
|
|
|
1715
1715
|
* @see {@link updateSome} for conditional updates without returning a value
|
|
1716
1716
|
* @see {@link updateAndGet} for always updating and returning the new value
|
|
1717
1717
|
*
|
|
1718
|
-
* @category
|
|
1718
|
+
* @category mutations
|
|
1719
1719
|
* @since 2.0.0
|
|
1720
1720
|
*/
|
|
1721
1721
|
export const updateSomeAndGet = dual<
|
|
@@ -1759,7 +1759,7 @@ export const updateSomeAndGet = dual<
|
|
|
1759
1759
|
* @see {@link updateSome} for conditional updates without returning a value
|
|
1760
1760
|
* @see {@link updateAndGet} for always updating and returning the new value
|
|
1761
1761
|
*
|
|
1762
|
-
* @category
|
|
1762
|
+
* @category mutations
|
|
1763
1763
|
* @since 2.0.0
|
|
1764
1764
|
*/
|
|
1765
1765
|
<A>(pf: (a: A) => Option.Option<A>) => (self: Ref<A>) => Effect.Effect<A>,
|
|
@@ -1803,7 +1803,7 @@ export const updateSomeAndGet = dual<
|
|
|
1803
1803
|
* @see {@link updateSome} for conditional updates without returning a value
|
|
1804
1804
|
* @see {@link updateAndGet} for always updating and returning the new value
|
|
1805
1805
|
*
|
|
1806
|
-
* @category
|
|
1806
|
+
* @category mutations
|
|
1807
1807
|
* @since 2.0.0
|
|
1808
1808
|
*/
|
|
1809
1809
|
<A>(self: Ref<A>, pf: (a: A) => Option.Option<A>) => Effect.Effect<A>
|
package/src/RegExp.ts
CHANGED
|
@@ -102,7 +102,7 @@ export const isRegExp: (input: unknown) => input is RegExp = predicate.isRegExp
|
|
|
102
102
|
* assert.deepStrictEqual(RegExp.escape("a*b"), "a\\*b")
|
|
103
103
|
* ```
|
|
104
104
|
*
|
|
105
|
-
* @category
|
|
105
|
+
* @category RegExp
|
|
106
106
|
* @since 2.0.0
|
|
107
107
|
*/
|
|
108
108
|
export const escape = (string: string): string => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&")
|
package/src/Request.ts
CHANGED
|
@@ -169,7 +169,7 @@ export interface Constructor<R extends Request<any, any, any>, T extends keyof R
|
|
|
169
169
|
* type UserError = Request.Error<GetUser> // Error
|
|
170
170
|
* ```
|
|
171
171
|
*
|
|
172
|
-
* @category
|
|
172
|
+
* @category utility types
|
|
173
173
|
* @since 2.0.0
|
|
174
174
|
*/
|
|
175
175
|
export type Error<T extends Request<any, any, any>> = [T] extends [Request<infer _A, infer _E, infer _R>] ? _E : never
|
|
@@ -191,7 +191,7 @@ export type Error<T extends Request<any, any, any>> = [T] extends [Request<infer
|
|
|
191
191
|
* type UserSuccess = Request.Success<GetUser> // string
|
|
192
192
|
* ```
|
|
193
193
|
*
|
|
194
|
-
* @category
|
|
194
|
+
* @category utility types
|
|
195
195
|
* @since 2.0.0
|
|
196
196
|
*/
|
|
197
197
|
export type Success<T extends Request<any, any, any>> = [T] extends [Request<infer _A, infer _E, infer _R>] ? _A
|
|
@@ -200,7 +200,7 @@ export type Success<T extends Request<any, any, any>> = [T] extends [Request<inf
|
|
|
200
200
|
/**
|
|
201
201
|
* A utility type to extract the requirements type from a `Request`.
|
|
202
202
|
*
|
|
203
|
-
* @category
|
|
203
|
+
* @category utility types
|
|
204
204
|
* @since 4.0.0
|
|
205
205
|
*/
|
|
206
206
|
export type Services<T extends Request<any, any, any>> = [T] extends [Request<infer _A, infer _E, infer _R>] ? _R
|
|
@@ -223,7 +223,7 @@ export type Services<T extends Request<any, any, any>> = [T] extends [Request<in
|
|
|
223
223
|
* type UserResult = Request.Result<GetUser> // Exit.Exit<string, Error>
|
|
224
224
|
* ```
|
|
225
225
|
*
|
|
226
|
-
* @category
|
|
226
|
+
* @category utility types
|
|
227
227
|
* @since 2.0.0
|
|
228
228
|
*/
|
|
229
229
|
export type Result<T extends Request<any, any, any>> = T extends Request<infer A, infer E, infer _R> ? Exit.Exit<A, E>
|
package/src/RequestResolver.ts
CHANGED
|
@@ -1595,7 +1595,7 @@ export const withSpan: {
|
|
|
1595
1595
|
* @see {@link persisted} for storing persistable request results outside process memory
|
|
1596
1596
|
* @see {@link Cache.Cache} for operations available on the returned cache
|
|
1597
1597
|
*
|
|
1598
|
-
* @category
|
|
1598
|
+
* @category caching
|
|
1599
1599
|
* @since 4.0.0
|
|
1600
1600
|
*/
|
|
1601
1601
|
export const asCache: {
|
|
@@ -1623,7 +1623,7 @@ export const asCache: {
|
|
|
1623
1623
|
* @see {@link persisted} for storing persistable request results outside process memory
|
|
1624
1624
|
* @see {@link Cache.Cache} for operations available on the returned cache
|
|
1625
1625
|
*
|
|
1626
|
-
* @category
|
|
1626
|
+
* @category caching
|
|
1627
1627
|
* @since 4.0.0
|
|
1628
1628
|
*/
|
|
1629
1629
|
<
|
|
@@ -1669,7 +1669,7 @@ export const asCache: {
|
|
|
1669
1669
|
* @see {@link persisted} for storing persistable request results outside process memory
|
|
1670
1670
|
* @see {@link Cache.Cache} for operations available on the returned cache
|
|
1671
1671
|
*
|
|
1672
|
-
* @category
|
|
1672
|
+
* @category caching
|
|
1673
1673
|
* @since 4.0.0
|
|
1674
1674
|
*/
|
|
1675
1675
|
<
|
|
@@ -1738,7 +1738,7 @@ export const asCache: {
|
|
|
1738
1738
|
* @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls
|
|
1739
1739
|
* @see {@link persisted} for backing persistable requests with the configured persistence store
|
|
1740
1740
|
*
|
|
1741
|
-
* @category
|
|
1741
|
+
* @category caching
|
|
1742
1742
|
* @since 4.0.0
|
|
1743
1743
|
*/
|
|
1744
1744
|
export const withCache: {
|
|
@@ -1765,7 +1765,7 @@ export const withCache: {
|
|
|
1765
1765
|
* @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls
|
|
1766
1766
|
* @see {@link persisted} for backing persistable requests with the configured persistence store
|
|
1767
1767
|
*
|
|
1768
|
-
* @category
|
|
1768
|
+
* @category caching
|
|
1769
1769
|
* @since 4.0.0
|
|
1770
1770
|
*/
|
|
1771
1771
|
<A extends Request.Any>(
|
|
@@ -1797,7 +1797,7 @@ export const withCache: {
|
|
|
1797
1797
|
* @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls
|
|
1798
1798
|
* @see {@link persisted} for backing persistable requests with the configured persistence store
|
|
1799
1799
|
*
|
|
1800
|
-
* @category
|
|
1800
|
+
* @category caching
|
|
1801
1801
|
* @since 4.0.0
|
|
1802
1802
|
*/
|
|
1803
1803
|
<A extends Request.Any>(
|
|
@@ -1836,7 +1836,7 @@ export const withCache: {
|
|
|
1836
1836
|
* @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls
|
|
1837
1837
|
* @see {@link persisted} for backing persistable requests with the configured persistence store
|
|
1838
1838
|
*
|
|
1839
|
-
* @category
|
|
1839
|
+
* @category caching
|
|
1840
1840
|
* @since 4.0.0
|
|
1841
1841
|
*/
|
|
1842
1842
|
A, /**
|
|
@@ -1862,7 +1862,7 @@ export const withCache: {
|
|
|
1862
1862
|
* @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls
|
|
1863
1863
|
* @see {@link persisted} for backing persistable requests with the configured persistence store
|
|
1864
1864
|
*
|
|
1865
|
-
* @category
|
|
1865
|
+
* @category caching
|
|
1866
1866
|
* @since 4.0.0
|
|
1867
1867
|
*/
|
|
1868
1868
|
{
|
package/src/Resource.ts
CHANGED
|
@@ -202,7 +202,7 @@ export const get = <A, E>(self: Resource<A, E>): Effect.Effect<A, E> =>
|
|
|
202
202
|
* @see {@link manual} for resources refreshed only by caller action
|
|
203
203
|
* @see {@link auto} for schedule-driven automatic refreshes
|
|
204
204
|
*
|
|
205
|
-
* @category
|
|
205
|
+
* @category resource management
|
|
206
206
|
* @since 2.0.0
|
|
207
207
|
*/
|
|
208
208
|
export const refresh = <A, E>(self: Resource<A, E>): Effect.Effect<void, E> =>
|