effect 4.0.0-beta.43 → 4.0.0-beta.45
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/Cache.d.ts +12 -43
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +15 -42
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +21 -21
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +89 -10
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +42 -19
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +86 -46
- package/dist/Channel.js.map +1 -1
- package/dist/Clock.d.ts +2 -2
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js.map +1 -1
- package/dist/Config.d.ts +2 -2
- package/dist/ConfigProvider.d.ts +5 -5
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +5 -5
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +2 -2
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +1150 -0
- package/dist/Context.d.ts.map +1 -0
- package/dist/{ServiceMap.js → Context.js} +139 -139
- package/dist/Context.js.map +1 -0
- package/dist/DateTime.d.ts +2 -2
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +2 -2
- package/dist/DateTime.js.map +1 -1
- package/dist/Effect.d.ts +177 -177
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +81 -81
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +16 -0
- package/dist/Equal.js.map +1 -1
- package/dist/ErrorReporter.d.ts +3 -3
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +1 -1
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +6 -6
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +4 -4
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Fiber.d.ts +7 -7
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +2 -2
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +4 -4
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +2 -2
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +4 -4
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +2 -2
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +4 -4
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +3 -3
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +3 -3
- package/dist/FileSystem.js.map +1 -1
- package/dist/Hash.js +1 -1
- package/dist/Hash.js.map +1 -1
- package/dist/Layer.d.ts +286 -268
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +133 -134
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +18 -18
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +18 -15
- package/dist/LayerMap.js.map +1 -1
- package/dist/Logger.d.ts +3 -3
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +6 -6
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +18 -21
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Metric.d.ts +19 -19
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +21 -21
- package/dist/Metric.js.map +1 -1
- package/dist/Path.d.ts +2 -2
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +2 -2
- package/dist/Path.js.map +1 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +4 -4
- package/dist/Pool.js.map +1 -1
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +3 -3
- package/dist/PubSub.js.map +1 -1
- package/dist/Random.d.ts +2 -2
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +0 -23
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +2 -2
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +12 -12
- package/dist/RcMap.js.map +1 -1
- package/dist/Redactable.d.ts +139 -62
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +59 -55
- package/dist/Redactable.js.map +1 -1
- package/dist/References.d.ts +26 -14
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +0 -12
- package/dist/References.js.map +1 -1
- package/dist/Request.d.ts +5 -5
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +6 -7
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +0 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +3 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Schedule.d.ts +2 -2
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +2 -2
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +4 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +7 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +531 -214
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +304 -103
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +5 -15
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +49 -5
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +64 -5
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +145 -0
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +146 -0
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +2 -2
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +4 -4
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Semaphore.d.ts +1 -1
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +1 -3
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +6 -6
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +1 -1
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +2 -2
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +2 -2
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +187 -117
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +133 -57
- package/dist/Stream.js.map +1 -1
- package/dist/Terminal.d.ts +3 -3
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +2 -2
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +16 -16
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +11 -8
- package/dist/Tracer.js.map +1 -1
- package/dist/Unify.d.ts +8 -2
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js.map +1 -1
- package/dist/index.d.ts +81 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -15
- package/dist/index.js.map +1 -1
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +74 -74
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/layer.js +3 -3
- package/dist/internal/layer.js.map +1 -1
- package/dist/internal/random.js +2 -2
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js +9 -9
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/references.js +13 -13
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js +6 -6
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schedule.js +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/representation.js +11 -1
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.d.ts +10 -1
- package/dist/internal/schema/schema.d.ts.map +1 -1
- package/dist/internal/schema/schema.js +21 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +3 -3
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +19 -19
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +2 -1
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +4 -4
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +3 -3
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +6 -6
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +3 -3
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +2 -2
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +2 -2
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +2 -2
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +2 -2
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +54 -54
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +15 -8
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +22 -22
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +49 -46
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +3 -3
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +5 -5
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +6 -9
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +1 -1
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +6 -7
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +2 -2
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +2 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +35 -2
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +2 -2
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +2 -2
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +2 -2
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +16 -16
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +41 -13
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +3 -3
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +10 -10
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +2 -3
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +29 -8
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +8 -1
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +2 -2
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +2 -2
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +14 -14
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +11 -10
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +2 -3
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +2 -2
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +2 -2
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +8 -8
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/Param.d.ts +30 -2
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +17 -7
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Prompt.js +8 -2
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +5 -5
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +3 -3
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +94 -15
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +7 -7
- package/dist/unstable/cluster/ClusterSchema.d.ts +12 -9
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +9 -9
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +13 -14
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +8 -8
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +12 -12
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +2 -2
- package/dist/unstable/cluster/EntityProxy.js +3 -3
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +4 -4
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +2 -2
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +3 -3
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +4 -4
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +7 -4
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +5 -5
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +14 -14
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +8 -8
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +2 -2
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +5 -5
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +2 -2
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +2 -2
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +1 -1
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +12 -12
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +3 -3
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +3 -3
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +7 -7
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +35 -49
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +65 -67
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +2 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +21 -21
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +2 -2
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +5 -5
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +2 -2
- package/dist/unstable/cluster/Snowflake.d.ts +2 -2
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +2 -2
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +15 -14
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js +2 -2
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js +3 -3
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +2 -2
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +5 -5
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +0 -6
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +0 -5
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +0 -2
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +0 -2
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +26 -9
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +128 -69
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +91 -37
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +223 -149
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +11 -9
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +15 -17
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +228 -0
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogMessage.js +214 -0
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -0
- package/dist/unstable/eventlog/EventLogRemote.d.ts +111 -193
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +167 -322
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +26 -48
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +128 -199
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +60 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +166 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +183 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +461 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +117 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.js +284 -0
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogJournal.d.ts → SqlEventJournal.d.ts} +2 -2
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogJournal.js → SqlEventJournal.js} +20 -14
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogServer.d.ts → SqlEventLogServerEncrypted.d.ts} +5 -5
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/{SqlEventLogServer.js → SqlEventLogServerEncrypted.js} +65 -24
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +25 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +354 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -0
- package/dist/unstable/eventlog/index.d.ts +22 -2
- package/dist/unstable/eventlog/index.d.ts.map +1 -1
- package/dist/unstable/eventlog/index.js +22 -2
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts +2 -0
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.d.ts.map +1 -0
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js +89 -0
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -0
- package/dist/unstable/http/Etag.d.ts +2 -2
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +2 -2
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +6 -3
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +5 -5
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +5 -2
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +3 -3
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +8 -6
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +6 -6
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -2
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +4 -4
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +6 -6
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +24 -24
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +2 -2
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +2 -2
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +3 -3
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +26 -14
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +2 -2
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +2 -2
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +7 -7
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +29 -29
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +2 -2
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +2 -2
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +3 -3
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +3 -3
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +6 -6
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +2 -2
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +6 -6
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +6 -6
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +7 -7
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +9 -9
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +8 -8
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +0 -3
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +20 -20
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +7 -7
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +4 -4
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +8 -8
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +4 -4
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +6 -6
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +5 -5
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +9 -6
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +6 -6
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +15 -15
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +23 -23
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +5 -5
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +1 -1
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +2 -2
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +2 -2
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +4 -33
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +23 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +144 -2
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +1 -2
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +10 -11
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +4 -4
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +3 -3
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +4 -4
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +3 -3
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +6 -6
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +3 -3
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +3 -3
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +2 -2
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +45 -2
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +2 -2
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +36 -36
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +9 -9
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +4 -5
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +4 -4
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +3 -3
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +4 -5
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +5 -5
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +2 -2
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +6 -6
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +35 -14
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +30 -4
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +21 -21
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +73 -40
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
- package/dist/unstable/rpc/RpcGroup.d.ts +8 -8
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +20 -20
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +8 -8
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +5 -5
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +3 -3
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +3 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +2 -2
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +2 -2
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +2 -2
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +21 -20
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +2 -2
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +4 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +6 -3
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +46 -5
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +2 -4
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +1 -12
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +10 -10
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +9 -9
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +5 -2
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +2 -2
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +5 -5
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -7
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +5 -2
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +12 -12
- package/dist/unstable/sql/SqlModel.d.ts +8 -9
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +9 -35
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +11 -11
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +3 -3
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +7 -7
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +3 -3
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +6 -3
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +5 -5
- package/dist/unstable/workers/WorkerRunner.d.ts +2 -2
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +5 -2
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +7 -7
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +7 -7
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +0 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +3 -3
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +9 -9
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +18 -18
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +3 -3
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +5 -5
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +4 -4
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +1 -1
- package/src/Cache.ts +18 -46
- package/src/Cause.ts +21 -21
- package/src/Channel.ts +120 -79
- package/src/Clock.ts +2 -2
- package/src/Config.ts +2 -2
- package/src/ConfigProvider.ts +5 -5
- package/src/Console.ts +2 -2
- package/src/{ServiceMap.ts → Context.ts} +337 -340
- package/src/DateTime.ts +2 -2
- package/src/Effect.ts +182 -184
- package/src/Equal.ts +17 -0
- package/src/ErrorReporter.ts +3 -3
- package/src/ExecutionPlan.ts +8 -9
- package/src/Fiber.ts +7 -7
- package/src/FiberHandle.ts +5 -5
- package/src/FiberMap.ts +5 -5
- package/src/FiberSet.ts +5 -5
- package/src/FileSystem.ts +3 -3
- package/src/Hash.ts +2 -2
- package/src/Layer.ts +333 -307
- package/src/LayerMap.ts +27 -26
- package/src/Logger.ts +3 -3
- package/src/ManagedRuntime.ts +32 -32
- package/src/Metric.ts +58 -58
- package/src/Path.ts +2 -2
- package/src/Pool.ts +5 -5
- package/src/PubSub.ts +3 -3
- package/src/Random.ts +2 -2
- package/src/RcMap.ts +14 -14
- package/src/Redactable.ts +146 -72
- package/src/References.ts +14 -14
- package/src/Request.ts +5 -5
- package/src/RequestResolver.ts +6 -7
- package/src/Resource.ts +4 -4
- package/src/Schedule.ts +2 -2
- package/src/Scheduler.ts +4 -4
- package/src/Schema.ts +837 -397
- package/src/SchemaAST.ts +5 -14
- package/src/SchemaGetter.ts +69 -11
- package/src/SchemaTransformation.ts +166 -0
- package/src/Scope.ts +2 -2
- package/src/ScopedCache.ts +5 -5
- package/src/Semaphore.ts +2 -4
- package/src/Sink.ts +9 -9
- package/src/Stdio.ts +2 -2
- package/src/Stream.ts +234 -158
- package/src/Terminal.ts +3 -3
- package/src/Tracer.ts +17 -17
- package/src/Unify.ts +26 -2
- package/src/index.ts +82 -16
- package/src/internal/core.ts +7 -7
- package/src/internal/effect.ts +106 -106
- package/src/internal/layer.ts +7 -7
- package/src/internal/random.ts +2 -2
- package/src/internal/rcRef.ts +10 -10
- package/src/internal/references.ts +13 -13
- package/src/internal/request.ts +8 -8
- package/src/internal/schedule.ts +3 -1
- package/src/internal/schema/representation.ts +8 -1
- package/src/internal/schema/schema.ts +24 -1
- package/src/testing/TestSchema.ts +3 -3
- package/src/unstable/ai/AiError.ts +3 -2
- package/src/unstable/ai/Chat.ts +3 -3
- package/src/unstable/ai/EmbeddingModel.ts +3 -3
- package/src/unstable/ai/IdGenerator.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +2 -2
- package/src/unstable/ai/McpSchema.ts +11 -9
- package/src/unstable/ai/McpServer.ts +68 -66
- package/src/unstable/ai/Model.ts +8 -8
- package/src/unstable/ai/Prompt.ts +6 -12
- package/src/unstable/ai/Response.ts +6 -8
- package/src/unstable/ai/ResponseIdTracker.ts +2 -4
- package/src/unstable/ai/Telemetry.ts +2 -2
- package/src/unstable/ai/Tokenizer.ts +2 -2
- package/src/unstable/ai/Tool.ts +25 -25
- package/src/unstable/ai/Toolkit.ts +12 -12
- package/src/unstable/cli/Argument.ts +3 -4
- package/src/unstable/cli/CliError.ts +22 -9
- package/src/unstable/cli/CliOutput.ts +2 -2
- package/src/unstable/cli/Command.ts +36 -30
- package/src/unstable/cli/Flag.ts +3 -4
- package/src/unstable/cli/GlobalFlag.ts +3 -3
- package/src/unstable/cli/HelpDoc.ts +8 -8
- package/src/unstable/cli/Param.ts +39 -16
- package/src/unstable/cli/Prompt.ts +13 -6
- package/src/unstable/cli/internal/command.ts +7 -7
- package/src/unstable/cli/internal/parser.ts +130 -21
- package/src/unstable/cluster/ClusterSchema.ts +12 -12
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +14 -15
- package/src/unstable/cluster/Entity.ts +25 -25
- package/src/unstable/cluster/EntityProxy.ts +3 -3
- package/src/unstable/cluster/EntityProxyServer.ts +4 -4
- package/src/unstable/cluster/EntityResource.ts +2 -2
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +2 -2
- package/src/unstable/cluster/Message.ts +8 -8
- package/src/unstable/cluster/MessageStorage.ts +11 -11
- package/src/unstable/cluster/Reply.ts +7 -7
- package/src/unstable/cluster/RunnerHealth.ts +2 -2
- package/src/unstable/cluster/RunnerServer.ts +1 -1
- package/src/unstable/cluster/RunnerStorage.ts +9 -9
- package/src/unstable/cluster/Runners.ts +7 -7
- package/src/unstable/cluster/ShardId.ts +84 -74
- package/src/unstable/cluster/Sharding.ts +26 -26
- package/src/unstable/cluster/ShardingConfig.ts +5 -5
- package/src/unstable/cluster/Snowflake.ts +2 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +1 -1
- package/src/unstable/cluster/internal/entityManager.ts +27 -23
- package/src/unstable/cluster/internal/entityReaper.ts +2 -2
- package/src/unstable/cluster/internal/resourceMap.ts +3 -3
- package/src/unstable/devtools/DevToolsClient.ts +5 -5
- package/src/unstable/eventlog/Event.ts +0 -8
- package/src/unstable/eventlog/EventGroup.ts +0 -4
- package/src/unstable/eventlog/EventJournal.ts +146 -78
- package/src/unstable/eventlog/EventLog.ts +353 -232
- package/src/unstable/eventlog/EventLogEncryption.ts +18 -32
- package/src/unstable/eventlog/EventLogMessage.ts +277 -0
- package/src/unstable/eventlog/EventLogRemote.ts +263 -410
- package/src/unstable/eventlog/EventLogServer.ts +183 -275
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +206 -0
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +749 -0
- package/src/unstable/eventlog/EventLogSessionAuth.ts +437 -0
- package/src/unstable/eventlog/{SqlEventLogJournal.ts → SqlEventJournal.ts} +26 -18
- package/src/unstable/eventlog/{SqlEventLogServer.ts → SqlEventLogServerEncrypted.ts} +102 -40
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +500 -0
- package/src/unstable/eventlog/index.ts +27 -2
- package/src/unstable/eventlog/internal/identityRootSecretDerivation.ts +153 -0
- package/src/unstable/http/Etag.ts +2 -2
- package/src/unstable/http/FetchHttpClient.ts +5 -5
- package/src/unstable/http/Headers.ts +4 -4
- package/src/unstable/http/HttpClient.ts +9 -8
- package/src/unstable/http/HttpClientRequest.ts +5 -5
- package/src/unstable/http/HttpEffect.ts +35 -35
- package/src/unstable/http/HttpIncomingMessage.ts +2 -2
- package/src/unstable/http/HttpMiddleware.ts +28 -14
- package/src/unstable/http/HttpPlatform.ts +2 -2
- package/src/unstable/http/HttpRouter.ts +37 -37
- package/src/unstable/http/HttpServer.ts +2 -2
- package/src/unstable/http/HttpServerError.ts +4 -4
- package/src/unstable/http/HttpServerRequest.ts +7 -7
- package/src/unstable/http/HttpServerResponse.ts +8 -8
- package/src/unstable/http/Multipart.ts +8 -8
- package/src/unstable/httpapi/HttpApi.ts +18 -18
- package/src/unstable/httpapi/HttpApiBuilder.ts +20 -20
- package/src/unstable/httpapi/HttpApiClient.ts +4 -4
- package/src/unstable/httpapi/HttpApiEndpoint.ts +14 -14
- package/src/unstable/httpapi/HttpApiGroup.ts +16 -16
- package/src/unstable/httpapi/HttpApiMiddleware.ts +14 -14
- package/src/unstable/httpapi/HttpApiSecurity.ts +13 -13
- package/src/unstable/httpapi/OpenApi.ts +29 -31
- package/src/unstable/observability/OtlpExporter.ts +5 -5
- package/src/unstable/observability/OtlpMetrics.ts +1 -1
- package/src/unstable/observability/OtlpSerialization.ts +2 -2
- package/src/unstable/observability/OtlpTracer.ts +2 -2
- package/src/unstable/observability/PrometheusMetrics.ts +5 -5
- package/src/unstable/persistence/KeyValueStore.ts +226 -3
- package/src/unstable/persistence/PersistedCache.ts +20 -17
- package/src/unstable/persistence/PersistedQueue.ts +3 -3
- package/src/unstable/persistence/Persistence.ts +4 -4
- package/src/unstable/persistence/RateLimiter.ts +3 -3
- package/src/unstable/persistence/Redis.ts +2 -2
- package/src/unstable/process/ChildProcessSpawner.ts +46 -2
- package/src/unstable/reactivity/Atom.ts +79 -79
- package/src/unstable/reactivity/AtomHttpApi.ts +27 -12
- package/src/unstable/reactivity/AtomRegistry.ts +4 -4
- package/src/unstable/reactivity/AtomRpc.ts +20 -9
- package/src/unstable/reactivity/Reactivity.ts +6 -6
- package/src/unstable/rpc/Rpc.ts +59 -21
- package/src/unstable/rpc/RpcClient.ts +103 -54
- package/src/unstable/rpc/RpcGroup.ts +31 -31
- package/src/unstable/rpc/RpcMiddleware.ts +16 -16
- package/src/unstable/rpc/RpcSchema.ts +4 -4
- package/src/unstable/rpc/RpcSerialization.ts +2 -2
- package/src/unstable/rpc/RpcServer.ts +24 -22
- package/src/unstable/rpc/RpcWorker.ts +5 -5
- package/src/unstable/rpc/Utils.ts +63 -4
- package/src/unstable/schema/Model.ts +4 -6
- package/src/unstable/schema/VariantSchema.ts +4 -17
- package/src/unstable/socket/Socket.ts +9 -9
- package/src/unstable/socket/SocketServer.ts +2 -2
- package/src/unstable/sql/SqlClient.ts +11 -11
- package/src/unstable/sql/SqlConnection.ts +2 -2
- package/src/unstable/sql/SqlModel.ts +54 -82
- package/src/unstable/sql/SqlResolver.ts +11 -11
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +15 -17
- package/src/unstable/workers/Worker.ts +4 -4
- package/src/unstable/workers/WorkerRunner.ts +2 -2
- package/src/unstable/workflow/Activity.ts +14 -14
- package/src/unstable/workflow/DurableClock.ts +3 -3
- package/src/unstable/workflow/DurableDeferred.ts +8 -8
- package/src/unstable/workflow/Workflow.ts +23 -23
- package/src/unstable/workflow/WorkflowEngine.ts +6 -6
- package/src/unstable/workflow/WorkflowProxyServer.ts +4 -4
- package/dist/ServiceMap.d.ts +0 -1150
- package/dist/ServiceMap.d.ts.map +0 -1
- package/dist/ServiceMap.js.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogJournal.d.ts.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogJournal.js.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogServer.d.ts.map +0 -1
- package/dist/unstable/eventlog/SqlEventLogServer.js.map +0 -1
package/dist/Schema.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ import * as Exit_ from "./Exit.ts";
|
|
|
99
99
|
import type { Formatter } from "./Formatter.ts";
|
|
100
100
|
import * as HashMap_ from "./HashMap.ts";
|
|
101
101
|
import * as HashSet_ from "./HashSet.ts";
|
|
102
|
+
import { SchemaError } from "./internal/schema/schema.ts";
|
|
102
103
|
import * as JsonPatch from "./JsonPatch.ts";
|
|
103
104
|
import * as JsonSchema from "./JsonSchema.ts";
|
|
104
105
|
import * as Optic_ from "./Optic.ts";
|
|
@@ -145,13 +146,14 @@ export type Mutability = "readonly" | "mutable";
|
|
|
145
146
|
*/
|
|
146
147
|
export type ConstructorDefault = "no-default" | "with-default";
|
|
147
148
|
/**
|
|
148
|
-
* Options for `
|
|
149
|
+
* Options for `makeEffect`, `make`, and Class constructors.
|
|
149
150
|
*
|
|
150
151
|
* When to use:
|
|
151
152
|
* - Pass `disableChecks: true` to skip validation when you trust the data.
|
|
152
153
|
* - Pass `parseOptions` to control error reporting behavior.
|
|
153
154
|
*
|
|
154
|
-
* @see {@link Bottom.
|
|
155
|
+
* @see {@link Bottom.makeEffect}
|
|
156
|
+
* @see {@link Bottom.make}
|
|
155
157
|
*
|
|
156
158
|
* @since 4.0.0
|
|
157
159
|
*/
|
|
@@ -187,7 +189,6 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
|
|
|
187
189
|
readonly ast: Ast;
|
|
188
190
|
readonly "~rebuild.out": RebuildOut;
|
|
189
191
|
readonly "~type.parameters": TypeParameters;
|
|
190
|
-
readonly "~annotate.in": Annotations.Bottom<T, TypeParameters>;
|
|
191
192
|
readonly "Type": T;
|
|
192
193
|
readonly "Encoded": E;
|
|
193
194
|
readonly "DecodingServices": RD;
|
|
@@ -200,15 +201,16 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
|
|
|
200
201
|
readonly "~type.optionality": TypeOptionality;
|
|
201
202
|
readonly "~encoded.mutability": EncodedMutability;
|
|
202
203
|
readonly "~encoded.optionality": EncodedOptionality;
|
|
203
|
-
annotate(annotations: this["~
|
|
204
|
+
annotate(annotations: Annotations.Bottom<this["Type"], this["~type.parameters"]>): this["~rebuild.out"];
|
|
204
205
|
annotateKey(annotations: Annotations.Key<this["Type"]>): this["~rebuild.out"];
|
|
205
206
|
check(...checks: readonly [AST.Check<this["Type"]>, ...Array<AST.Check<this["Type"]>>]): this["~rebuild.out"];
|
|
206
207
|
rebuild(ast: this["ast"]): this["~rebuild.out"];
|
|
207
208
|
/**
|
|
208
209
|
* @throws {Error} The issue is contained in the error cause.
|
|
209
210
|
*/
|
|
210
|
-
|
|
211
|
+
make(input: this["~type.make.in"], options?: MakeOptions): this["Type"];
|
|
211
212
|
makeOption(input: this["~type.make.in"], options?: MakeOptions): Option_.Option<this["Type"]>;
|
|
213
|
+
makeEffect(input: this["~type.make.in"], options?: MakeOptions): Effect.Effect<this["Type"], SchemaError>;
|
|
212
214
|
}
|
|
213
215
|
/**
|
|
214
216
|
* The schema type returned by {@link declareConstructor}, tracking the decoded
|
|
@@ -219,7 +221,6 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
|
|
|
219
221
|
* @since 4.0.0
|
|
220
222
|
*/
|
|
221
223
|
export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<Top>, Iso = T> extends Bottom<T, E, TypeParameters[number]["DecodingServices"], TypeParameters[number]["EncodingServices"], AST.Declaration, declareConstructor<T, E, TypeParameters, Iso>, T, Iso, TypeParameters> {
|
|
222
|
-
readonly "~rebuild.out": this;
|
|
223
224
|
}
|
|
224
225
|
/**
|
|
225
226
|
* Creates a schema for a **parametric** type (a generic container such as
|
|
@@ -280,6 +281,7 @@ export declare function declareConstructor<T, E = T, Iso = T>(): <const TypePara
|
|
|
280
281
|
* @since 4.0.0
|
|
281
282
|
*/
|
|
282
283
|
export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [], Iso> {
|
|
284
|
+
readonly "~rebuild.out": declare<T, Iso>;
|
|
283
285
|
}
|
|
284
286
|
/**
|
|
285
287
|
* Creates a schema for a **non-parametric** opaque type using a type-guard
|
|
@@ -362,7 +364,7 @@ export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"]
|
|
|
362
364
|
* @category Annotations
|
|
363
365
|
* @since 4.0.0
|
|
364
366
|
*/
|
|
365
|
-
export declare function annotate<S extends Top>(annotations: S["~
|
|
367
|
+
export declare function annotate<S extends Top>(annotations: Annotations.Bottom<S["Type"], S["~type.parameters"]>): (self: S) => S["~rebuild.out"];
|
|
366
368
|
/**
|
|
367
369
|
* Adds key-level annotations to a schema field. This is the pipeable
|
|
368
370
|
* (curried) counterpart of the `.annotateKey` method.
|
|
@@ -655,7 +657,7 @@ export interface Encoder<out E, out RE = never> extends Codec<unknown, E, unknow
|
|
|
655
657
|
* @since 4.0.0
|
|
656
658
|
*/
|
|
657
659
|
export declare function revealCodec<T, E, RD, RE>(codec: Codec<T, E, RD, RE>): Codec<T, E, RD, RE>;
|
|
658
|
-
|
|
660
|
+
export {
|
|
659
661
|
/**
|
|
660
662
|
* Error thrown (or returned as the error channel value) when schema decoding
|
|
661
663
|
* or encoding fails.
|
|
@@ -684,15 +686,7 @@ declare const SchemaErrorTypeId = "~effect/Schema/SchemaError";
|
|
|
684
686
|
*
|
|
685
687
|
* @since 4.0.0
|
|
686
688
|
*/
|
|
687
|
-
|
|
688
|
-
readonly [SchemaErrorTypeId] = "~effect/Schema/SchemaError";
|
|
689
|
-
readonly _tag = "SchemaError";
|
|
690
|
-
readonly name: string;
|
|
691
|
-
readonly issue: Issue.Issue;
|
|
692
|
-
constructor(issue: Issue.Issue);
|
|
693
|
-
get message(): string;
|
|
694
|
-
toString(): string;
|
|
695
|
-
}
|
|
689
|
+
SchemaError };
|
|
696
690
|
/**
|
|
697
691
|
* Returns `true` if `u` is a {@link SchemaError}.
|
|
698
692
|
*
|
|
@@ -1124,6 +1118,29 @@ export declare const encodeSync: <S extends Encoder<unknown>>(schema: S) => (inp
|
|
|
1124
1118
|
* @since 4.0.0
|
|
1125
1119
|
*/
|
|
1126
1120
|
export declare const make: <S extends Top>(ast: S["ast"], options?: object) => S;
|
|
1121
|
+
/**
|
|
1122
|
+
* Transforms a schema into a class that can be extended with `extends`. The
|
|
1123
|
+
* resulting class inherits the full schema API (e.g. `annotate`) and can define
|
|
1124
|
+
* static methods that reference `this`.
|
|
1125
|
+
*
|
|
1126
|
+
* **Example** (Wrapping a primitive schema)
|
|
1127
|
+
*
|
|
1128
|
+
* ```ts
|
|
1129
|
+
* import { Schema } from "effect"
|
|
1130
|
+
*
|
|
1131
|
+
* class MyString extends Schema.asClass(Schema.String) {
|
|
1132
|
+
* static readonly decodeUnknownSync = Schema.decodeUnknownSync(this)
|
|
1133
|
+
* }
|
|
1134
|
+
*
|
|
1135
|
+
* console.log(MyString.decodeUnknownSync("a"))
|
|
1136
|
+
* // "a"
|
|
1137
|
+
* ```
|
|
1138
|
+
*
|
|
1139
|
+
* @since 4.0.0
|
|
1140
|
+
*/
|
|
1141
|
+
export declare function asClass<S extends Top>(schema: S): S & {
|
|
1142
|
+
new (_: never): {};
|
|
1143
|
+
};
|
|
1127
1144
|
/**
|
|
1128
1145
|
* Tests if a value is a `Schema`.
|
|
1129
1146
|
*
|
|
@@ -1132,14 +1149,13 @@ export declare const make: <S extends Top>(ast: S["ast"], options?: object) => S
|
|
|
1132
1149
|
*/
|
|
1133
1150
|
export declare function isSchema(u: unknown): u is Top;
|
|
1134
1151
|
/**
|
|
1135
|
-
*
|
|
1152
|
+
* Companion type for an exact optional struct key. The key may be absent, but
|
|
1136
1153
|
* when present must match the wrapped schema (no implicit `undefined`).
|
|
1137
1154
|
* Produced by {@link optionalKey}.
|
|
1138
1155
|
*
|
|
1139
1156
|
* @since 4.0.0
|
|
1140
1157
|
*/
|
|
1141
1158
|
export interface optionalKey<S extends Top> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], optionalKey<S>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], "optional", S["~type.constructor.default"], S["~encoded.mutability"], "optional"> {
|
|
1142
|
-
readonly "~rebuild.out": this;
|
|
1143
1159
|
readonly schema: S;
|
|
1144
1160
|
}
|
|
1145
1161
|
interface optionalKeyLambda extends Lambda {
|
|
@@ -1180,12 +1196,13 @@ interface requiredKeyLambda extends Lambda {
|
|
|
1180
1196
|
*/
|
|
1181
1197
|
export declare const requiredKey: requiredKeyLambda;
|
|
1182
1198
|
/**
|
|
1183
|
-
*
|
|
1199
|
+
* Companion type for an optional struct key that also accepts `undefined`.
|
|
1184
1200
|
* Equivalent to `optionalKey<UndefinedOr<S>>`. Produced by {@link optional}.
|
|
1185
1201
|
*
|
|
1186
1202
|
* @since 4.0.0
|
|
1187
1203
|
*/
|
|
1188
1204
|
export interface optional<S extends Top> extends optionalKey<UndefinedOr<S>> {
|
|
1205
|
+
readonly "~rebuild.out": optional<S>;
|
|
1189
1206
|
}
|
|
1190
1207
|
interface optionalLambda extends Lambda {
|
|
1191
1208
|
<S extends Top>(self: S): optional<S>;
|
|
@@ -1229,13 +1246,12 @@ interface requiredLambda extends Lambda {
|
|
|
1229
1246
|
*/
|
|
1230
1247
|
export declare const required: requiredLambda;
|
|
1231
1248
|
/**
|
|
1232
|
-
*
|
|
1249
|
+
* Companion type for a mutable struct key. The key's property is writable.
|
|
1233
1250
|
* Produced by {@link mutableKey}.
|
|
1234
1251
|
*
|
|
1235
1252
|
* @since 4.0.0
|
|
1236
1253
|
*/
|
|
1237
1254
|
export interface mutableKey<S extends Top> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], mutableKey<S>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], "mutable", S["~type.optionality"], S["~type.constructor.default"], "mutable", S["~encoded.optionality"]> {
|
|
1238
|
-
readonly "~rebuild.out": this;
|
|
1239
1255
|
readonly schema: S;
|
|
1240
1256
|
}
|
|
1241
1257
|
interface mutableKeyLambda extends Lambda {
|
|
@@ -1267,7 +1283,6 @@ export declare const readonlyKey: readonlyKeyLambda;
|
|
|
1267
1283
|
* @since 4.0.0
|
|
1268
1284
|
*/
|
|
1269
1285
|
export interface toType<S extends Top> extends Bottom<S["Type"], S["Type"], never, never, S["ast"], toType<S>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
1270
|
-
readonly "~rebuild.out": this;
|
|
1271
1286
|
}
|
|
1272
1287
|
interface toTypeLambda extends Lambda {
|
|
1273
1288
|
<S extends Top>(self: S): toType<S>;
|
|
@@ -1287,7 +1302,6 @@ export declare const toType: toTypeLambda;
|
|
|
1287
1302
|
* @since 4.0.0
|
|
1288
1303
|
*/
|
|
1289
1304
|
export interface toEncoded<S extends Top> extends Bottom<S["Encoded"], S["Encoded"], never, never, AST.AST, toEncoded<S>, S["Encoded"], S["Encoded"], ReadonlyArray<Top>, S["Encoded"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
1290
|
-
readonly "~rebuild.out": this;
|
|
1291
1305
|
}
|
|
1292
1306
|
interface toEncodedLambda extends Lambda {
|
|
1293
1307
|
<S extends Top>(self: S): toEncoded<S>;
|
|
@@ -1308,7 +1322,6 @@ declare const FlipTypeId = "~effect/Schema/flip";
|
|
|
1308
1322
|
* @since 4.0.0
|
|
1309
1323
|
*/
|
|
1310
1324
|
export interface flip<S extends Top> extends Bottom<S["Encoded"], S["Type"], S["EncodingServices"], S["DecodingServices"], AST.AST, flip<S>, S["Encoded"], S["Encoded"], ReadonlyArray<Top>, S["Encoded"], S["~encoded.mutability"], S["~encoded.optionality"], ConstructorDefault, S["~type.mutability"], S["~type.optionality"]> {
|
|
1311
|
-
readonly "~rebuild.out": this;
|
|
1312
1325
|
readonly [FlipTypeId]: typeof FlipTypeId;
|
|
1313
1326
|
readonly schema: S;
|
|
1314
1327
|
}
|
|
@@ -1336,7 +1349,6 @@ export declare function flip<S extends Top>(schema: S): S extends flip<infer F>
|
|
|
1336
1349
|
* @since 4.0.0
|
|
1337
1350
|
*/
|
|
1338
1351
|
export interface Literal<L extends AST.LiteralValue> extends Bottom<L, L, never, never, AST.Literal, Literal<L>> {
|
|
1339
|
-
readonly "~rebuild.out": this;
|
|
1340
1352
|
readonly literal: L;
|
|
1341
1353
|
transform<L2 extends AST.LiteralValue>(to: L2): decodeTo<Literal<L2>, Literal<L>>;
|
|
1342
1354
|
}
|
|
@@ -1395,7 +1407,6 @@ export declare namespace TemplateLiteral {
|
|
|
1395
1407
|
* @since 4.0.0
|
|
1396
1408
|
*/
|
|
1397
1409
|
export interface TemplateLiteral<Parts extends TemplateLiteral.Parts> extends Bottom<TemplateLiteral.Encoded<Parts>, TemplateLiteral.Encoded<Parts>, never, never, AST.TemplateLiteral, TemplateLiteral<Parts>> {
|
|
1398
|
-
readonly "~rebuild.out": this;
|
|
1399
1410
|
readonly parts: Parts;
|
|
1400
1411
|
}
|
|
1401
1412
|
/**
|
|
@@ -1436,7 +1447,6 @@ export declare namespace TemplateLiteralParser {
|
|
|
1436
1447
|
* @since 4.0.0
|
|
1437
1448
|
*/
|
|
1438
1449
|
export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> extends Bottom<TemplateLiteralParser.Type<Parts>, TemplateLiteral.Encoded<Parts>, never, never, AST.Arrays, TemplateLiteralParser<Parts>> {
|
|
1439
|
-
readonly "~rebuild.out": this;
|
|
1440
1450
|
readonly parts: Parts;
|
|
1441
1451
|
}
|
|
1442
1452
|
/**
|
|
@@ -1465,7 +1475,6 @@ export declare function TemplateLiteralParser<const Parts extends TemplateLitera
|
|
|
1465
1475
|
export interface Enum<A extends {
|
|
1466
1476
|
[x: string]: string | number;
|
|
1467
1477
|
}> extends Bottom<A[keyof A], A[keyof A], never, never, AST.Enum, Enum<A>> {
|
|
1468
|
-
readonly "~rebuild.out": this;
|
|
1469
1478
|
readonly enums: A;
|
|
1470
1479
|
}
|
|
1471
1480
|
/**
|
|
@@ -1496,7 +1505,6 @@ export declare function Enum<A extends {
|
|
|
1496
1505
|
* @since 4.0.0
|
|
1497
1506
|
*/
|
|
1498
1507
|
export interface Never extends Bottom<never, never, never, never, AST.Never, Never> {
|
|
1499
|
-
readonly "~rebuild.out": this;
|
|
1500
1508
|
}
|
|
1501
1509
|
/**
|
|
1502
1510
|
* Schema for the `never` type. Always fails validation — no value satisfies it.
|
|
@@ -1511,7 +1519,6 @@ export declare const Never: Never;
|
|
|
1511
1519
|
* @since 4.0.0
|
|
1512
1520
|
*/
|
|
1513
1521
|
export interface Any extends Bottom<any, any, never, never, AST.Any, Any> {
|
|
1514
|
-
readonly "~rebuild.out": this;
|
|
1515
1522
|
}
|
|
1516
1523
|
/**
|
|
1517
1524
|
* Schema for the `any` type. Accepts any value without validation.
|
|
@@ -1527,7 +1534,6 @@ export declare const Any: Any;
|
|
|
1527
1534
|
* @since 4.0.0
|
|
1528
1535
|
*/
|
|
1529
1536
|
export interface Unknown extends Bottom<unknown, unknown, never, never, AST.Unknown, Unknown> {
|
|
1530
|
-
readonly "~rebuild.out": this;
|
|
1531
1537
|
}
|
|
1532
1538
|
/**
|
|
1533
1539
|
* Schema for the `unknown` type. Accepts any value without validation.
|
|
@@ -1543,7 +1549,6 @@ export declare const Unknown: Unknown;
|
|
|
1543
1549
|
* @since 4.0.0
|
|
1544
1550
|
*/
|
|
1545
1551
|
export interface Null extends Bottom<null, null, never, never, AST.Null, Null> {
|
|
1546
|
-
readonly "~rebuild.out": this;
|
|
1547
1552
|
}
|
|
1548
1553
|
/**
|
|
1549
1554
|
* Schema for the `null` literal. Validates that the input is strictly `null`.
|
|
@@ -1559,7 +1564,6 @@ export declare const Null: Null;
|
|
|
1559
1564
|
* @since 4.0.0
|
|
1560
1565
|
*/
|
|
1561
1566
|
export interface Undefined extends Bottom<undefined, undefined, never, never, AST.Undefined, Undefined> {
|
|
1562
|
-
readonly "~rebuild.out": this;
|
|
1563
1567
|
}
|
|
1564
1568
|
/**
|
|
1565
1569
|
* Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
|
|
@@ -1575,7 +1579,6 @@ export declare const Undefined: Undefined;
|
|
|
1575
1579
|
* @since 4.0.0
|
|
1576
1580
|
*/
|
|
1577
1581
|
export interface String extends Bottom<string, string, never, never, AST.String, String> {
|
|
1578
|
-
readonly "~rebuild.out": this;
|
|
1579
1582
|
}
|
|
1580
1583
|
/**
|
|
1581
1584
|
* Schema for `string` values. Validates that the input is `typeof` `"string"`.
|
|
@@ -1590,7 +1593,6 @@ export declare const String: String;
|
|
|
1590
1593
|
* @since 4.0.0
|
|
1591
1594
|
*/
|
|
1592
1595
|
export interface Number extends Bottom<number, number, never, never, AST.Number, Number> {
|
|
1593
|
-
readonly "~rebuild.out": this;
|
|
1594
1596
|
}
|
|
1595
1597
|
/**
|
|
1596
1598
|
* Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
|
|
@@ -1611,7 +1613,6 @@ export declare const Number: Number;
|
|
|
1611
1613
|
* @since 4.0.0
|
|
1612
1614
|
*/
|
|
1613
1615
|
export interface Boolean extends Bottom<boolean, boolean, never, never, AST.Boolean, Boolean> {
|
|
1614
|
-
readonly "~rebuild.out": this;
|
|
1615
1616
|
}
|
|
1616
1617
|
/**
|
|
1617
1618
|
* Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
|
|
@@ -1627,7 +1628,6 @@ export declare const Boolean: Boolean;
|
|
|
1627
1628
|
* @since 4.0.0
|
|
1628
1629
|
*/
|
|
1629
1630
|
export interface Symbol extends Bottom<symbol, symbol, never, never, AST.Symbol, Symbol> {
|
|
1630
|
-
readonly "~rebuild.out": this;
|
|
1631
1631
|
}
|
|
1632
1632
|
/**
|
|
1633
1633
|
* Schema for `symbol` values. Validates that the input is `typeof` `"symbol"`.
|
|
@@ -1643,7 +1643,6 @@ export declare const Symbol: Symbol;
|
|
|
1643
1643
|
* @since 4.0.0
|
|
1644
1644
|
*/
|
|
1645
1645
|
export interface BigInt extends Bottom<bigint, bigint, never, never, AST.BigInt, BigInt> {
|
|
1646
|
-
readonly "~rebuild.out": this;
|
|
1647
1646
|
}
|
|
1648
1647
|
/**
|
|
1649
1648
|
* Schema for `bigint` values. Validates that the input is `typeof` `"bigint"`.
|
|
@@ -1658,7 +1657,6 @@ export declare const BigInt: BigInt;
|
|
|
1658
1657
|
* @since 4.0.0
|
|
1659
1658
|
*/
|
|
1660
1659
|
export interface Void extends Bottom<void, void, never, never, AST.Void, Void> {
|
|
1661
|
-
readonly "~rebuild.out": this;
|
|
1662
1660
|
}
|
|
1663
1661
|
/**
|
|
1664
1662
|
* Schema for the `void` type. Accepts `undefined` as the encoded value.
|
|
@@ -1673,7 +1671,6 @@ export declare const Void: Void;
|
|
|
1673
1671
|
* @since 4.0.0
|
|
1674
1672
|
*/
|
|
1675
1673
|
export interface ObjectKeyword extends Bottom<object, object, never, never, AST.ObjectKeyword, ObjectKeyword> {
|
|
1676
|
-
readonly "~rebuild.out": this;
|
|
1677
1674
|
}
|
|
1678
1675
|
/**
|
|
1679
1676
|
* Schema for the `object` type. Validates that the input is a non-null object or function
|
|
@@ -1689,7 +1686,6 @@ export declare const ObjectKeyword: ObjectKeyword;
|
|
|
1689
1686
|
* @since 4.0.0
|
|
1690
1687
|
*/
|
|
1691
1688
|
export interface UniqueSymbol<sym extends symbol> extends Bottom<sym, sym, never, never, AST.UniqueSymbol, UniqueSymbol<sym>> {
|
|
1692
|
-
readonly "~rebuild.out": this;
|
|
1693
1689
|
}
|
|
1694
1690
|
/**
|
|
1695
1691
|
* Creates a schema for a specific symbol. Only that exact symbol satisfies the schema.
|
|
@@ -1820,7 +1816,6 @@ export declare namespace Struct {
|
|
|
1820
1816
|
* @since 4.0.0
|
|
1821
1817
|
*/
|
|
1822
1818
|
export interface Struct<Fields extends Struct.Fields> extends Bottom<Struct.Type<Fields>, Struct.Encoded<Fields>, Struct.DecodingServices<Fields>, Struct.EncodingServices<Fields>, AST.Objects, Struct<Fields>, Struct.MakeIn<Fields>, Struct.Iso<Fields>> {
|
|
1823
|
-
readonly "~rebuild.out": this;
|
|
1824
1819
|
/**
|
|
1825
1820
|
* The field definitions of this struct. Spread them into a new struct to
|
|
1826
1821
|
* reuse fields across schemas.
|
|
@@ -1916,6 +1911,14 @@ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
|
|
|
1916
1911
|
* @since 4.0.0
|
|
1917
1912
|
*/
|
|
1918
1913
|
export declare function fieldsAssign<const NewFields extends Struct.Fields>(fields: NewFields): fieldsAssign<NewFields>;
|
|
1914
|
+
interface encodeKeys<S extends Top & {
|
|
1915
|
+
readonly fields: Struct.Fields;
|
|
1916
|
+
}, M extends {
|
|
1917
|
+
readonly [K in keyof S["fields"]]?: PropertyKey;
|
|
1918
|
+
}> extends decodeTo<S, Struct<{
|
|
1919
|
+
[K in keyof S["fields"] as K extends keyof M ? M[K] extends PropertyKey ? M[K] : K : K]: toEncoded<S["fields"][K]>;
|
|
1920
|
+
}>> {
|
|
1921
|
+
}
|
|
1919
1922
|
/**
|
|
1920
1923
|
* Renames struct keys in the encoded form without changing the decoded type.
|
|
1921
1924
|
*
|
|
@@ -1944,7 +1947,7 @@ export declare function encodeKeys<S extends Top & {
|
|
|
1944
1947
|
readonly fields: Struct.Fields;
|
|
1945
1948
|
}, const M extends {
|
|
1946
1949
|
readonly [K in keyof S["fields"]]?: PropertyKey;
|
|
1947
|
-
}>(mapping: M): (self: S) =>
|
|
1950
|
+
}>(mapping: M): (self: S) => encodeKeys<S, M>;
|
|
1948
1951
|
/**
|
|
1949
1952
|
* Adds derived fields to a struct schema during decoding.
|
|
1950
1953
|
*
|
|
@@ -2080,13 +2083,12 @@ export declare namespace Record {
|
|
|
2080
2083
|
};
|
|
2081
2084
|
}
|
|
2082
2085
|
/**
|
|
2083
|
-
*
|
|
2086
|
+
* Companion type for a key-value record (map) with a typed key and value schema.
|
|
2084
2087
|
* Produced by {@link Record}.
|
|
2085
2088
|
*
|
|
2086
2089
|
* @since 4.0.0
|
|
2087
2090
|
*/
|
|
2088
2091
|
export interface $Record<Key extends Record.Key, Value extends Top> extends Bottom<Record.Type<Key, Value>, Record.Encoded<Key, Value>, Record.DecodingServices<Key, Value>, Record.EncodingServices<Key, Value>, AST.Objects, $Record<Key, Value>, Simplify<Record.MakeIn<Key, Value>>, Record.Iso<Key, Value>> {
|
|
2089
|
-
readonly "~rebuild.out": this;
|
|
2090
2092
|
readonly key: Key;
|
|
2091
2093
|
readonly value: Value;
|
|
2092
2094
|
}
|
|
@@ -2175,13 +2177,12 @@ export declare namespace StructWithRest {
|
|
|
2175
2177
|
}>;
|
|
2176
2178
|
}
|
|
2177
2179
|
/**
|
|
2178
|
-
*
|
|
2180
|
+
* Companion type for a struct combined with one or more record schemas. Produced
|
|
2179
2181
|
* by {@link StructWithRest}.
|
|
2180
2182
|
*
|
|
2181
2183
|
* @since 4.0.0
|
|
2182
2184
|
*/
|
|
2183
2185
|
export interface StructWithRest<S extends StructWithRest.Objects, Records extends StructWithRest.Records> extends Bottom<Simplify<StructWithRest.Type<S, Records>>, Simplify<StructWithRest.Encoded<S, Records>>, StructWithRest.DecodingServices<S, Records>, StructWithRest.EncodingServices<S, Records>, AST.Objects, StructWithRest<S, Records>, Simplify<StructWithRest.MakeIn<S, Records>>, Simplify<StructWithRest.Iso<S, Records>>> {
|
|
2184
|
-
readonly "~rebuild.out": this;
|
|
2185
2186
|
readonly schema: S;
|
|
2186
2187
|
readonly records: Records;
|
|
2187
2188
|
}
|
|
@@ -2270,12 +2271,11 @@ export declare namespace Tuple {
|
|
|
2270
2271
|
type MakeIn<E extends Elements> = MakeIn_<E>;
|
|
2271
2272
|
}
|
|
2272
2273
|
/**
|
|
2273
|
-
*
|
|
2274
|
+
* Companion type for a fixed-length tuple. Produced by {@link Tuple}.
|
|
2274
2275
|
*
|
|
2275
2276
|
* @since 4.0.0
|
|
2276
2277
|
*/
|
|
2277
2278
|
export interface Tuple<Elements extends Tuple.Elements> extends Bottom<Tuple.Type<Elements>, Tuple.Encoded<Elements>, Tuple.DecodingServices<Elements>, Tuple.EncodingServices<Elements>, AST.Arrays, Tuple<Elements>, Tuple.MakeIn<Elements>, Tuple.Iso<Elements>> {
|
|
2278
|
-
readonly "~rebuild.out": this;
|
|
2279
2279
|
readonly elements: Elements;
|
|
2280
2280
|
/**
|
|
2281
2281
|
* Returns a new tuple with the elements modified by the provided function.
|
|
@@ -2381,13 +2381,12 @@ export declare namespace TupleWithRest {
|
|
|
2381
2381
|
] : M;
|
|
2382
2382
|
}
|
|
2383
2383
|
/**
|
|
2384
|
-
*
|
|
2384
|
+
* Companion type for a tuple with additional rest elements. Produced by
|
|
2385
2385
|
* {@link TupleWithRest}.
|
|
2386
2386
|
*
|
|
2387
2387
|
* @since 4.0.0
|
|
2388
2388
|
*/
|
|
2389
2389
|
export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends TupleWithRest.Rest> extends Bottom<TupleWithRest.Type<S["Type"], Rest>, TupleWithRest.Encoded<S["Encoded"], Rest>, S["DecodingServices"] | Rest[number]["DecodingServices"], S["EncodingServices"] | Rest[number]["EncodingServices"], AST.Arrays, TupleWithRest<S, Rest>, TupleWithRest.MakeIn<S["~type.make"], Rest>, TupleWithRest.Iso<S["Iso"], Rest>> {
|
|
2390
|
-
readonly "~rebuild.out": this;
|
|
2391
2390
|
readonly schema: S;
|
|
2392
2391
|
readonly rest: Rest;
|
|
2393
2392
|
}
|
|
@@ -2417,12 +2416,11 @@ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends T
|
|
|
2417
2416
|
*/
|
|
2418
2417
|
export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Rest extends TupleWithRest.Rest>(schema: S, rest: Rest): TupleWithRest<S, Rest>;
|
|
2419
2418
|
/**
|
|
2420
|
-
*
|
|
2419
|
+
* Companion type for a `ReadonlyArray`. Produced by {@link ArraySchema}.
|
|
2421
2420
|
*
|
|
2422
2421
|
* @since 4.0.0
|
|
2423
2422
|
*/
|
|
2424
2423
|
export interface $Array<S extends Top> extends Bottom<ReadonlyArray<S["Type"]>, ReadonlyArray<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"], AST.Arrays, $Array<S>, ReadonlyArray<S["~type.make"]>, ReadonlyArray<S["Iso"]>> {
|
|
2425
|
-
readonly "~rebuild.out": this;
|
|
2426
2424
|
readonly schema: S;
|
|
2427
2425
|
}
|
|
2428
2426
|
interface ArrayLambda extends Lambda {
|
|
@@ -2455,12 +2453,11 @@ export {
|
|
|
2455
2453
|
*/
|
|
2456
2454
|
ArraySchema as Array };
|
|
2457
2455
|
/**
|
|
2458
|
-
*
|
|
2456
|
+
* Companion type for a non-empty `ReadonlyArray`. Produced by {@link NonEmptyArray}.
|
|
2459
2457
|
*
|
|
2460
2458
|
* @since 4.0.0
|
|
2461
2459
|
*/
|
|
2462
2460
|
export interface NonEmptyArray<S extends Top> extends Bottom<readonly [S["Type"], ...Array<S["Type"]>], readonly [S["Encoded"], ...Array<S["Encoded"]>], S["DecodingServices"], S["EncodingServices"], AST.Arrays, NonEmptyArray<S>, readonly [S["~type.make"], ...Array<S["~type.make"]>], readonly [S["Iso"], ...Array<S["Iso"]>]> {
|
|
2463
|
-
readonly "~rebuild.out": this;
|
|
2464
2461
|
readonly schema: S;
|
|
2465
2462
|
}
|
|
2466
2463
|
interface NonEmptyArrayLambda extends Lambda {
|
|
@@ -2491,6 +2488,7 @@ export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
|
2491
2488
|
* @since 4.0.0
|
|
2492
2489
|
*/
|
|
2493
2490
|
export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>, Union<readonly [S, $Array<S>]>> {
|
|
2491
|
+
readonly "~rebuild.out": ArrayEnsure<S>;
|
|
2494
2492
|
}
|
|
2495
2493
|
/**
|
|
2496
2494
|
* Decodes a single value or an array of values into an array.
|
|
@@ -2508,11 +2506,12 @@ export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>,
|
|
|
2508
2506
|
*/
|
|
2509
2507
|
export declare function ArrayEnsure<S extends Top>(schema: S): ArrayEnsure<S>;
|
|
2510
2508
|
/**
|
|
2511
|
-
*
|
|
2509
|
+
* Companion type for an array with unique elements. Produced by {@link UniqueArray}.
|
|
2512
2510
|
*
|
|
2513
2511
|
* @since 4.0.0
|
|
2514
2512
|
*/
|
|
2515
2513
|
export interface UniqueArray<S extends Top> extends $Array<S> {
|
|
2514
|
+
readonly "~rebuild.out": UniqueArray<S>;
|
|
2516
2515
|
}
|
|
2517
2516
|
/**
|
|
2518
2517
|
* Returns a new array schema that ensures all elements are unique.
|
|
@@ -2533,7 +2532,6 @@ export declare function UniqueArray<S extends Top>(item: S): UniqueArray<S>;
|
|
|
2533
2532
|
export interface mutable<S extends Top & {
|
|
2534
2533
|
readonly "ast": AST.Arrays;
|
|
2535
2534
|
}> extends Bottom<Mutable<S["Type"]>, Mutable<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"], S["ast"], mutable<S>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
2536
|
-
readonly "~rebuild.out": this;
|
|
2537
2535
|
readonly schema: S;
|
|
2538
2536
|
}
|
|
2539
2537
|
interface mutableLambda extends Lambda {
|
|
@@ -2562,7 +2560,7 @@ interface mutableLambda extends Lambda {
|
|
|
2562
2560
|
*/
|
|
2563
2561
|
export declare const mutable: mutableLambda;
|
|
2564
2562
|
/**
|
|
2565
|
-
*
|
|
2563
|
+
* Companion type for a union of multiple schemas. Produced by {@link Union}.
|
|
2566
2564
|
*
|
|
2567
2565
|
* @since 4.0.0
|
|
2568
2566
|
*/
|
|
@@ -2581,7 +2579,6 @@ export interface Union<Members extends ReadonlyArray<Top>> extends Bottom<{
|
|
|
2581
2579
|
}[number], {
|
|
2582
2580
|
[K in keyof Members]: Members[K]["Iso"];
|
|
2583
2581
|
}[number]> {
|
|
2584
|
-
readonly "~rebuild.out": this;
|
|
2585
2582
|
readonly members: Members;
|
|
2586
2583
|
/**
|
|
2587
2584
|
* Returns a new union with the members modified by the provided function.
|
|
@@ -2633,7 +2630,6 @@ export declare function Union<const Members extends ReadonlyArray<Top>>(members:
|
|
|
2633
2630
|
* @since 4.0.0
|
|
2634
2631
|
*/
|
|
2635
2632
|
export interface Literals<L extends ReadonlyArray<AST.LiteralValue>> extends Bottom<L[number], L[number], never, never, AST.Union<AST.Literal>, Literals<L>> {
|
|
2636
|
-
readonly "~rebuild.out": this;
|
|
2637
2633
|
readonly literals: L;
|
|
2638
2634
|
readonly members: {
|
|
2639
2635
|
readonly [K in keyof L]: Literal<L[K]>;
|
|
@@ -2666,11 +2662,12 @@ export interface Literals<L extends ReadonlyArray<AST.LiteralValue>> extends Bot
|
|
|
2666
2662
|
*/
|
|
2667
2663
|
export declare function Literals<const L extends ReadonlyArray<AST.LiteralValue>>(literals: L): Literals<L>;
|
|
2668
2664
|
/**
|
|
2669
|
-
*
|
|
2665
|
+
* Companion type for `S | null`. Produced by {@link NullOr}.
|
|
2670
2666
|
*
|
|
2671
2667
|
* @since 4.0.0
|
|
2672
2668
|
*/
|
|
2673
2669
|
export interface NullOr<S extends Top> extends Union<readonly [S, Null]> {
|
|
2670
|
+
readonly "~rebuild.out": NullOr<S>;
|
|
2674
2671
|
}
|
|
2675
2672
|
interface NullOrLambda extends Lambda {
|
|
2676
2673
|
<S extends Top>(self: S): NullOr<S>;
|
|
@@ -2684,11 +2681,12 @@ interface NullOrLambda extends Lambda {
|
|
|
2684
2681
|
*/
|
|
2685
2682
|
export declare const NullOr: NullOrLambda;
|
|
2686
2683
|
/**
|
|
2687
|
-
*
|
|
2684
|
+
* Companion type for `S | undefined`. Produced by {@link UndefinedOr}.
|
|
2688
2685
|
*
|
|
2689
2686
|
* @since 4.0.0
|
|
2690
2687
|
*/
|
|
2691
2688
|
export interface UndefinedOr<S extends Top> extends Union<readonly [S, Undefined]> {
|
|
2689
|
+
readonly "~rebuild.out": UndefinedOr<S>;
|
|
2692
2690
|
}
|
|
2693
2691
|
interface UndefinedOrLambda extends Lambda {
|
|
2694
2692
|
<S extends Top>(self: S): UndefinedOr<S>;
|
|
@@ -2702,10 +2700,11 @@ interface UndefinedOrLambda extends Lambda {
|
|
|
2702
2700
|
*/
|
|
2703
2701
|
export declare const UndefinedOr: UndefinedOrLambda;
|
|
2704
2702
|
/**
|
|
2705
|
-
*
|
|
2703
|
+
* Companion type for `S | null | undefined`. Produced by {@link NullishOr}.
|
|
2706
2704
|
* @since 4.0.0
|
|
2707
2705
|
*/
|
|
2708
2706
|
export interface NullishOr<S extends Top> extends Union<readonly [S, Null, Undefined]> {
|
|
2707
|
+
readonly "~rebuild.out": NullishOr<S>;
|
|
2709
2708
|
}
|
|
2710
2709
|
interface NullishOrLambda extends Lambda {
|
|
2711
2710
|
<S extends Top>(self: S): NullishOr<S>;
|
|
@@ -2722,7 +2721,6 @@ export declare const NullishOr: NullishOrLambda;
|
|
|
2722
2721
|
* @since 4.0.0
|
|
2723
2722
|
*/
|
|
2724
2723
|
export interface suspend<S extends Top> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], AST.Suspend, suspend<S>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
2725
|
-
readonly "~rebuild.out": this;
|
|
2726
2724
|
}
|
|
2727
2725
|
/**
|
|
2728
2726
|
* Creates a suspended schema that defers evaluation until needed. This is
|
|
@@ -2772,7 +2770,6 @@ export declare function check<S extends Top>(...checks: readonly [AST.Check<S["T
|
|
|
2772
2770
|
* @since 4.0.0
|
|
2773
2771
|
*/
|
|
2774
2772
|
export interface refine<T extends S["Type"], S extends Top> extends Bottom<T, S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], refine<T, S>, S["~type.make.in"], T, S["~type.parameters"], T, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
2775
|
-
readonly "~rebuild.out": this;
|
|
2776
2773
|
readonly schema: S;
|
|
2777
2774
|
}
|
|
2778
2775
|
/**
|
|
@@ -2791,7 +2788,6 @@ type DistributeBrands<B> = UnionToIntersection<B extends infer U extends string
|
|
|
2791
2788
|
* @since 4.0.0
|
|
2792
2789
|
*/
|
|
2793
2790
|
export interface brand<S extends Top, B> extends Bottom<S["Type"] & DistributeBrands<B>, S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], brand<S, B>, S["~type.make.in"], S["Type"] & DistributeBrands<B>, S["~type.parameters"], S["Type"] & DistributeBrands<B>, S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
2794
|
-
readonly "~rebuild.out": this;
|
|
2795
2791
|
readonly schema: S;
|
|
2796
2792
|
readonly identifier: string;
|
|
2797
2793
|
}
|
|
@@ -2823,7 +2819,6 @@ export declare function fromBrand<A extends Brand.Brand<any>>(identifier: string
|
|
|
2823
2819
|
* @since 4.0.0
|
|
2824
2820
|
*/
|
|
2825
2821
|
export interface middlewareDecoding<S extends Top, RD> extends Bottom<S["Type"], S["Encoded"], RD, S["EncodingServices"], S["ast"], middlewareDecoding<S, RD>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
2826
|
-
readonly "~rebuild.out": this;
|
|
2827
2822
|
readonly schema: S;
|
|
2828
2823
|
}
|
|
2829
2824
|
/**
|
|
@@ -2859,7 +2854,6 @@ export declare function middlewareDecoding<S extends Top, RD>(decode: (effect: E
|
|
|
2859
2854
|
* @since 4.0.0
|
|
2860
2855
|
*/
|
|
2861
2856
|
export interface middlewareEncoding<S extends Top, RE> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], RE, S["ast"], middlewareEncoding<S, RE>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
2862
|
-
readonly "~rebuild.out": this;
|
|
2863
2857
|
readonly schema: S;
|
|
2864
2858
|
}
|
|
2865
2859
|
/**
|
|
@@ -2937,7 +2931,6 @@ export declare function catchEncodingWithContext<S extends Top, R = never>(f: (i
|
|
|
2937
2931
|
* @since 4.0.0
|
|
2938
2932
|
*/
|
|
2939
2933
|
export interface decodeTo<To extends Top, From extends Top, RD = never, RE = never> extends Bottom<To["Type"], From["Encoded"], To["DecodingServices"] | From["DecodingServices"] | RD, To["EncodingServices"] | From["EncodingServices"] | RE, To["ast"], decodeTo<To, From, RD, RE>, To["~type.make.in"], To["Iso"], To["~type.parameters"], To["~type.make"], To["~type.mutability"], To["~type.optionality"], To["~type.constructor.default"], From["~encoded.mutability"], From["~encoded.optionality"]> {
|
|
2940
|
-
readonly "~rebuild.out": this;
|
|
2941
2934
|
readonly from: From;
|
|
2942
2935
|
readonly to: To;
|
|
2943
2936
|
}
|
|
@@ -3110,39 +3103,33 @@ export interface WithoutConstructorDefault {
|
|
|
3110
3103
|
* @since 4.0.0
|
|
3111
3104
|
*/
|
|
3112
3105
|
export interface withConstructorDefault<S extends Top & WithoutConstructorDefault> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], withConstructorDefault<S>, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], "with-default", S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
3113
|
-
readonly "~rebuild.out": this;
|
|
3114
3106
|
readonly schema: S;
|
|
3115
3107
|
}
|
|
3116
3108
|
/**
|
|
3117
3109
|
* Attaches a constructor default value to a schema field.
|
|
3118
3110
|
*
|
|
3119
|
-
*
|
|
3120
|
-
*
|
|
3121
|
-
* Return `Option.some(value)` to supply a default, or `Option.none()` to leave the
|
|
3122
|
-
* field required. An `Effect` may be returned for async or service-dependent defaults.
|
|
3123
|
-
*
|
|
3124
|
-
* Constructor defaults are applied only during `makeUnsafe` / `make`, not during
|
|
3125
|
-
* decoding or encoding.
|
|
3111
|
+
* Constructor defaults are applied only during `make*`, not during decoding or
|
|
3112
|
+
* encoding.
|
|
3126
3113
|
*
|
|
3127
3114
|
* **Example** (Optional field with a static default)
|
|
3128
3115
|
*
|
|
3129
3116
|
* ```ts
|
|
3130
|
-
* import {
|
|
3117
|
+
* import { Effect, Schema } from "effect"
|
|
3131
3118
|
*
|
|
3132
3119
|
* const MySchema = Schema.Struct({
|
|
3133
3120
|
* name: Schema.String.pipe(
|
|
3134
3121
|
* Schema.optionalKey,
|
|
3135
|
-
* Schema.withConstructorDefault(
|
|
3122
|
+
* Schema.withConstructorDefault(Effect.succeed("anonymous"))
|
|
3136
3123
|
* )
|
|
3137
3124
|
* })
|
|
3138
3125
|
*
|
|
3139
|
-
* const value = MySchema.
|
|
3126
|
+
* const value = MySchema.make({})
|
|
3140
3127
|
* // value: { name: "anonymous" }
|
|
3141
3128
|
* ```
|
|
3142
3129
|
*
|
|
3143
3130
|
* @since 4.0.0
|
|
3144
3131
|
*/
|
|
3145
|
-
export declare function withConstructorDefault<S extends Top & WithoutConstructorDefault>(defaultValue:
|
|
3132
|
+
export declare function withConstructorDefault<S extends Top & WithoutConstructorDefault>(defaultValue: Effect.Effect<S["~type.make.in"]>): (schema: S) => withConstructorDefault<S>;
|
|
3146
3133
|
/**
|
|
3147
3134
|
* The type produced by {@link withDecodingDefaultKey} — a schema that decodes from an `optionalKey` encoded source.
|
|
3148
3135
|
*
|
|
@@ -3150,6 +3137,7 @@ export declare function withConstructorDefault<S extends Top & WithoutConstructo
|
|
|
3150
3137
|
* @since 4.0.0
|
|
3151
3138
|
*/
|
|
3152
3139
|
export interface withDecodingDefaultKey<S extends Top> extends decodeTo<S, optionalKey<toEncoded<S>>> {
|
|
3140
|
+
readonly "~rebuild.out": withDecodingDefaultKey<S>;
|
|
3153
3141
|
}
|
|
3154
3142
|
/**
|
|
3155
3143
|
* Options for {@link withDecodingDefaultKey} and {@link withDecodingDefault}.
|
|
@@ -3180,10 +3168,10 @@ export type DecodingDefaultOptions = {
|
|
|
3180
3168
|
* **Example** (Default for a missing struct key)
|
|
3181
3169
|
*
|
|
3182
3170
|
* ```ts
|
|
3183
|
-
* import { Schema } from "effect"
|
|
3171
|
+
* import { Effect, Schema } from "effect"
|
|
3184
3172
|
*
|
|
3185
3173
|
* const MySchema = Schema.Struct({
|
|
3186
|
-
* name: Schema.String.pipe(Schema.withDecodingDefaultKey((
|
|
3174
|
+
* name: Schema.String.pipe(Schema.withDecodingDefaultKey(Effect.succeed("anonymous")))
|
|
3187
3175
|
* })
|
|
3188
3176
|
*
|
|
3189
3177
|
* const result = Schema.decodeUnknownSync(MySchema)({})
|
|
@@ -3193,7 +3181,7 @@ export type DecodingDefaultOptions = {
|
|
|
3193
3181
|
* @see {@link withDecodingDefault} for the `optional` (value-level) variant
|
|
3194
3182
|
* @since 4.0.0
|
|
3195
3183
|
*/
|
|
3196
|
-
export declare function withDecodingDefaultKey<S extends Top>(defaultValue:
|
|
3184
|
+
export declare function withDecodingDefaultKey<S extends Top>(defaultValue: Effect.Effect<S["Encoded"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultKey<S>;
|
|
3197
3185
|
/**
|
|
3198
3186
|
* The type produced by {@link withDecodingDefault} — a schema that decodes from an `optional` encoded source.
|
|
3199
3187
|
*
|
|
@@ -3201,6 +3189,7 @@ export declare function withDecodingDefaultKey<S extends Top>(defaultValue: () =
|
|
|
3201
3189
|
* @since 4.0.0
|
|
3202
3190
|
*/
|
|
3203
3191
|
export interface withDecodingDefault<S extends Top> extends decodeTo<S, optional<toEncoded<S>>> {
|
|
3192
|
+
readonly "~rebuild.out": withDecodingDefault<S>;
|
|
3204
3193
|
}
|
|
3205
3194
|
/**
|
|
3206
3195
|
* **Options**
|
|
@@ -3222,10 +3211,10 @@ export interface withDecodingDefault<S extends Top> extends decodeTo<S, optional
|
|
|
3222
3211
|
* **Example** (Default for an optional field value)
|
|
3223
3212
|
*
|
|
3224
3213
|
* ```ts
|
|
3225
|
-
* import { Schema } from "effect"
|
|
3214
|
+
* import { Effect, Schema } from "effect"
|
|
3226
3215
|
*
|
|
3227
3216
|
* const MySchema = Schema.Struct({
|
|
3228
|
-
* name: Schema.String.pipe(Schema.optional, Schema.withDecodingDefault((
|
|
3217
|
+
* name: Schema.String.pipe(Schema.optional, Schema.withDecodingDefault(Effect.succeed("anonymous")))
|
|
3229
3218
|
* })
|
|
3230
3219
|
*
|
|
3231
3220
|
* const result = Schema.decodeUnknownSync(MySchema)({ name: undefined })
|
|
@@ -3235,7 +3224,7 @@ export interface withDecodingDefault<S extends Top> extends decodeTo<S, optional
|
|
|
3235
3224
|
* @see {@link withDecodingDefaultKey} for the key-level variant
|
|
3236
3225
|
* @since 4.0.0
|
|
3237
3226
|
*/
|
|
3238
|
-
export declare function withDecodingDefault<S extends Top>(defaultValue:
|
|
3227
|
+
export declare function withDecodingDefault<S extends Top>(defaultValue: Effect.Effect<S["Encoded"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefault<S>;
|
|
3239
3228
|
/**
|
|
3240
3229
|
* The type produced by {@link tag} — a literal schema with a constructor default.
|
|
3241
3230
|
*
|
|
@@ -3248,7 +3237,7 @@ export interface tag<Tag extends AST.LiteralValue> extends withConstructorDefaul
|
|
|
3248
3237
|
}
|
|
3249
3238
|
/**
|
|
3250
3239
|
* Combines a {@link Literal} schema with {@link withConstructorDefault}, making it ideal
|
|
3251
|
-
* for discriminator fields in tagged unions. When constructing via `
|
|
3240
|
+
* for discriminator fields in tagged unions. When constructing via `make`, the
|
|
3252
3241
|
* `_tag` field can be omitted and will be filled automatically.
|
|
3253
3242
|
*
|
|
3254
3243
|
* **Example** (Discriminated union tag)
|
|
@@ -3258,8 +3247,8 @@ export interface tag<Tag extends AST.LiteralValue> extends withConstructorDefaul
|
|
|
3258
3247
|
*
|
|
3259
3248
|
* const A = Schema.Struct({ _tag: Schema.tag("A"), value: Schema.Number })
|
|
3260
3249
|
*
|
|
3261
|
-
* // _tag is optional in
|
|
3262
|
-
* const a = A.
|
|
3250
|
+
* // _tag is optional in make, auto-filled to "A"
|
|
3251
|
+
* const a = A.make({ value: 42 })
|
|
3263
3252
|
* // a: { _tag: "A", value: 42 }
|
|
3264
3253
|
* ```
|
|
3265
3254
|
*
|
|
@@ -3306,7 +3295,7 @@ export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fie
|
|
|
3306
3295
|
* to identify the specific variant of the object, which is especially useful
|
|
3307
3296
|
* when working with union types.
|
|
3308
3297
|
*
|
|
3309
|
-
* When using the `
|
|
3298
|
+
* When using the `make` method, the `_tag` field is optional and will be
|
|
3310
3299
|
* added automatically. However, when decoding or encoding, the `_tag` field
|
|
3311
3300
|
* must be present in the input.
|
|
3312
3301
|
*
|
|
@@ -3433,7 +3422,6 @@ export interface TaggedUnion<Cases extends Record<string, Top>> extends Bottom<{
|
|
|
3433
3422
|
}[keyof Cases], AST.Union<AST.Objects>, TaggedUnion<Cases>, {
|
|
3434
3423
|
[K in keyof Cases]: Cases[K]["~type.make"];
|
|
3435
3424
|
}[keyof Cases]> {
|
|
3436
|
-
readonly "~rebuild.out": this;
|
|
3437
3425
|
readonly cases: Cases;
|
|
3438
3426
|
readonly isAnyOf: <const Keys>(keys: ReadonlyArray<Keys>) => (value: Cases[keyof Cases]["Type"]) => value is Extract<Cases[keyof Cases]["Type"], {
|
|
3439
3427
|
_tag: Keys;
|
|
@@ -3491,26 +3479,29 @@ export interface Opaque<Self, S extends Top, Brand> extends Bottom<Self, S["Enco
|
|
|
3491
3479
|
new (_: never): S["Type"] & Brand;
|
|
3492
3480
|
}
|
|
3493
3481
|
/**
|
|
3494
|
-
* Wraps a schema so that its decoded `Type` becomes a nominally distinct type `Self`.
|
|
3495
|
-
* Useful for creating opaque types that are structurally identical to a base
|
|
3482
|
+
* Wraps a struct schema so that its decoded `Type` becomes a nominally distinct type `Self`.
|
|
3483
|
+
* Useful for creating opaque types that are structurally identical to a base struct
|
|
3496
3484
|
* but type-incompatible with it.
|
|
3497
3485
|
*
|
|
3498
|
-
* **Example** (Opaque
|
|
3486
|
+
* **Example** (Opaque struct)
|
|
3499
3487
|
*
|
|
3500
3488
|
* ```ts
|
|
3501
3489
|
* import { Schema } from "effect"
|
|
3502
3490
|
*
|
|
3503
|
-
*
|
|
3504
|
-
*
|
|
3491
|
+
* class Person extends Schema.Opaque<Person>()(
|
|
3492
|
+
* Schema.Struct({
|
|
3493
|
+
* name: Schema.String
|
|
3494
|
+
* })
|
|
3495
|
+
* ) {}
|
|
3505
3496
|
*
|
|
3506
|
-
* // Decoded value is
|
|
3507
|
-
* const
|
|
3508
|
-
* //
|
|
3497
|
+
* // Decoded value is Person, not { name: string }
|
|
3498
|
+
* const person = Schema.decodeUnknownSync(Person)({ name: "Alice" })
|
|
3499
|
+
* // person: Person
|
|
3509
3500
|
* ```
|
|
3510
3501
|
*
|
|
3511
3502
|
* @since 4.0.0
|
|
3512
3503
|
*/
|
|
3513
|
-
export declare function Opaque<Self, Brand = {}>(): <S extends Top>(schema: S) => Opaque<Self, S, Brand> & Omit<S,
|
|
3504
|
+
export declare function Opaque<Self, Brand = {}>(): <S extends Top>(schema: S) => Opaque<Self, S, Brand> & Omit<S, keyof Top>;
|
|
3514
3505
|
/**
|
|
3515
3506
|
* The type produced by {@link instanceOf} — a declaration schema that validates class instances.
|
|
3516
3507
|
*
|
|
@@ -3518,7 +3509,7 @@ export declare function Opaque<Self, Brand = {}>(): <S extends Top>(schema: S) =
|
|
|
3518
3509
|
* @since 4.0.0
|
|
3519
3510
|
*/
|
|
3520
3511
|
export interface instanceOf<T, Iso = T> extends declare<T, Iso> {
|
|
3521
|
-
readonly "~rebuild.out":
|
|
3512
|
+
readonly "~rebuild.out": instanceOf<T, Iso>;
|
|
3522
3513
|
}
|
|
3523
3514
|
/**
|
|
3524
3515
|
* Creates a schema that validates values using `instanceof`.
|
|
@@ -4580,19 +4571,39 @@ export declare function isPropertyNames(keySchema: Top, annotations?: Annotation
|
|
|
4580
4571
|
* @since 4.0.0
|
|
4581
4572
|
*/
|
|
4582
4573
|
export declare function isUnique<T>(annotations?: Annotations.Filter): AST.Filter<readonly T[]>;
|
|
4574
|
+
/**
|
|
4575
|
+
* Companion type for {@link NonEmptyString}.
|
|
4576
|
+
*
|
|
4577
|
+
* @category String
|
|
4578
|
+
* @since 4.0.0
|
|
4579
|
+
*/
|
|
4580
|
+
export interface NonEmptyString extends String {
|
|
4581
|
+
readonly "~rebuild.out": NonEmptyString;
|
|
4582
|
+
}
|
|
4583
4583
|
/**
|
|
4584
4584
|
* A schema for non-empty strings. Validates that a string has at least one
|
|
4585
4585
|
* character.
|
|
4586
4586
|
*
|
|
4587
|
+
* @category String
|
|
4588
|
+
* @since 4.0.0
|
|
4589
|
+
*/
|
|
4590
|
+
export declare const NonEmptyString: NonEmptyString;
|
|
4591
|
+
/**
|
|
4592
|
+
* Companion type for {@link Char}.
|
|
4593
|
+
*
|
|
4594
|
+
* @category String
|
|
4587
4595
|
* @since 4.0.0
|
|
4588
4596
|
*/
|
|
4589
|
-
export
|
|
4597
|
+
export interface Char extends String {
|
|
4598
|
+
readonly "~rebuild.out": Char;
|
|
4599
|
+
}
|
|
4590
4600
|
/**
|
|
4591
4601
|
* A schema representing a single character.
|
|
4592
4602
|
*
|
|
4603
|
+
* @category String
|
|
4593
4604
|
* @since 4.0.0
|
|
4594
4605
|
*/
|
|
4595
|
-
export declare const Char:
|
|
4606
|
+
export declare const Char: Char;
|
|
4596
4607
|
/**
|
|
4597
4608
|
* Schema for the `Option<A>` type, representing an optional value that is
|
|
4598
4609
|
* either `None` or `Some<A>`.
|
|
@@ -4615,6 +4626,7 @@ export declare const Char: String;
|
|
|
4615
4626
|
* @since 4.0.0
|
|
4616
4627
|
*/
|
|
4617
4628
|
export interface Option<A extends Top> extends declareConstructor<Option_.Option<A["Type"]>, Option_.Option<A["Encoded"]>, readonly [A], OptionIso<A>> {
|
|
4629
|
+
readonly "~rebuild.out": Option<A>;
|
|
4618
4630
|
readonly value: A;
|
|
4619
4631
|
}
|
|
4620
4632
|
/**
|
|
@@ -4635,12 +4647,13 @@ export type OptionIso<A extends Top> = {
|
|
|
4635
4647
|
*/
|
|
4636
4648
|
export declare function Option<A extends Top>(value: A): Option<A>;
|
|
4637
4649
|
/**
|
|
4638
|
-
*
|
|
4650
|
+
* Companion type for {@link OptionFromNullOr}.
|
|
4639
4651
|
*
|
|
4640
4652
|
* @category Option
|
|
4641
4653
|
* @since 4.0.0
|
|
4642
4654
|
*/
|
|
4643
4655
|
export interface OptionFromNullOr<S extends Top> extends decodeTo<Option<toType<S>>, NullOr<S>> {
|
|
4656
|
+
readonly "~rebuild.out": OptionFromNullOr<S>;
|
|
4644
4657
|
}
|
|
4645
4658
|
/**
|
|
4646
4659
|
* Decodes a nullable, required value `T` to a required `Option<T>` value.
|
|
@@ -4658,12 +4671,13 @@ export interface OptionFromNullOr<S extends Top> extends decodeTo<Option<toType<
|
|
|
4658
4671
|
*/
|
|
4659
4672
|
export declare function OptionFromNullOr<S extends Top>(schema: S): OptionFromNullOr<S>;
|
|
4660
4673
|
/**
|
|
4661
|
-
*
|
|
4674
|
+
* Companion type for {@link OptionFromUndefinedOr}.
|
|
4662
4675
|
*
|
|
4663
4676
|
* @category Option
|
|
4664
4677
|
* @since 4.0.0
|
|
4665
4678
|
*/
|
|
4666
4679
|
export interface OptionFromUndefinedOr<S extends Top> extends decodeTo<Option<toType<S>>, UndefinedOr<S>> {
|
|
4680
|
+
readonly "~rebuild.out": OptionFromUndefinedOr<S>;
|
|
4667
4681
|
}
|
|
4668
4682
|
/**
|
|
4669
4683
|
* Decodes an undefined-or value `T` to a required `Option<T>` value.
|
|
@@ -4681,12 +4695,13 @@ export interface OptionFromUndefinedOr<S extends Top> extends decodeTo<Option<to
|
|
|
4681
4695
|
*/
|
|
4682
4696
|
export declare function OptionFromUndefinedOr<S extends Top>(schema: S): OptionFromUndefinedOr<S>;
|
|
4683
4697
|
/**
|
|
4684
|
-
*
|
|
4698
|
+
* Companion type for {@link OptionFromNullishOr}.
|
|
4685
4699
|
*
|
|
4686
4700
|
* @category Option
|
|
4687
4701
|
* @since 4.0.0
|
|
4688
4702
|
*/
|
|
4689
4703
|
export interface OptionFromNullishOr<S extends Top> extends decodeTo<Option<toType<S>>, NullishOr<S>> {
|
|
4704
|
+
readonly "~rebuild.out": OptionFromNullishOr<S>;
|
|
4690
4705
|
}
|
|
4691
4706
|
/**
|
|
4692
4707
|
* Decodes a nullish value `T` to a required `Option<T>` value.
|
|
@@ -4706,12 +4721,13 @@ export declare function OptionFromNullishOr<S extends Top>(schema: S, options?:
|
|
|
4706
4721
|
onNoneEncoding: null | undefined;
|
|
4707
4722
|
}): OptionFromNullishOr<S>;
|
|
4708
4723
|
/**
|
|
4709
|
-
*
|
|
4724
|
+
* Companion type for {@link OptionFromOptionalKey}.
|
|
4710
4725
|
*
|
|
4711
4726
|
* @category Option
|
|
4712
4727
|
* @since 4.0.0
|
|
4713
4728
|
*/
|
|
4714
4729
|
export interface OptionFromOptionalKey<S extends Top> extends decodeTo<Option<toType<S>>, optionalKey<S>> {
|
|
4730
|
+
readonly "~rebuild.out": OptionFromOptionalKey<S>;
|
|
4715
4731
|
}
|
|
4716
4732
|
/**
|
|
4717
4733
|
* Decodes an optional value `A` to a required `Option<A>` value.
|
|
@@ -4729,12 +4745,13 @@ export interface OptionFromOptionalKey<S extends Top> extends decodeTo<Option<to
|
|
|
4729
4745
|
*/
|
|
4730
4746
|
export declare function OptionFromOptionalKey<S extends Top>(schema: S): OptionFromOptionalKey<S>;
|
|
4731
4747
|
/**
|
|
4732
|
-
*
|
|
4748
|
+
* Companion type for {@link OptionFromOptional}.
|
|
4733
4749
|
*
|
|
4734
4750
|
* @category Option
|
|
4735
4751
|
* @since 4.0.0
|
|
4736
4752
|
*/
|
|
4737
4753
|
export interface OptionFromOptional<S extends Top> extends decodeTo<Option<toType<S>>, optional<S>> {
|
|
4754
|
+
readonly "~rebuild.out": OptionFromOptional<S>;
|
|
4738
4755
|
}
|
|
4739
4756
|
/**
|
|
4740
4757
|
* Decodes an optional or `undefined` value `A` to an required `Option<A>`
|
|
@@ -4754,12 +4771,13 @@ export interface OptionFromOptional<S extends Top> extends decodeTo<Option<toTyp
|
|
|
4754
4771
|
*/
|
|
4755
4772
|
export declare function OptionFromOptional<S extends Top>(schema: S): OptionFromOptional<S>;
|
|
4756
4773
|
/**
|
|
4757
|
-
*
|
|
4774
|
+
* Companion type for {@link OptionFromOptionalNullOr}.
|
|
4758
4775
|
*
|
|
4759
4776
|
* @category Option
|
|
4760
4777
|
* @since 4.0.0
|
|
4761
4778
|
*/
|
|
4762
4779
|
export interface OptionFromOptionalNullOr<S extends Top> extends decodeTo<Option<toType<S>>, optional<NullOr<S>>> {
|
|
4780
|
+
readonly "~rebuild.out": OptionFromOptionalNullOr<S>;
|
|
4763
4781
|
}
|
|
4764
4782
|
/**
|
|
4765
4783
|
* Decodes an optional or `null` or `undefined` value `A` to a required `Option<A>`
|
|
@@ -4791,6 +4809,7 @@ export declare function OptionFromOptionalNullOr<S extends Top>(schema: S, optio
|
|
|
4791
4809
|
* @since 4.0.0
|
|
4792
4810
|
*/
|
|
4793
4811
|
export interface Result<A extends Top, E extends Top> extends declareConstructor<Result_.Result<A["Type"], E["Type"]>, Result_.Result<A["Encoded"], E["Encoded"]>, readonly [A, E], ResultIso<A, E>> {
|
|
4812
|
+
readonly "~rebuild.out": Result<A, E>;
|
|
4794
4813
|
readonly success: A;
|
|
4795
4814
|
readonly failure: E;
|
|
4796
4815
|
}
|
|
@@ -4820,6 +4839,7 @@ export declare function Result<A extends Top, E extends Top>(success: A, failure
|
|
|
4820
4839
|
* @since 4.0.0
|
|
4821
4840
|
*/
|
|
4822
4841
|
export interface Redacted<S extends Top> extends declareConstructor<Redacted_.Redacted<S["Type"]>, Redacted_.Redacted<S["Encoded"]>, readonly [S]> {
|
|
4842
|
+
readonly "~rebuild.out": Redacted<S>;
|
|
4823
4843
|
readonly value: S;
|
|
4824
4844
|
}
|
|
4825
4845
|
/**
|
|
@@ -4849,12 +4869,13 @@ export declare function Redacted<S extends Top>(value: S, options?: {
|
|
|
4849
4869
|
readonly label?: string | undefined;
|
|
4850
4870
|
}): Redacted<S>;
|
|
4851
4871
|
/**
|
|
4852
|
-
*
|
|
4872
|
+
* Companion type for {@link RedactedFromValue}.
|
|
4853
4873
|
*
|
|
4854
4874
|
* @category Redacted
|
|
4855
4875
|
* @since 4.0.0
|
|
4856
4876
|
*/
|
|
4857
4877
|
export interface RedactedFromValue<S extends Top> extends decodeTo<Redacted<toType<S>>, middlewareDecoding<S, S["DecodingServices"]>> {
|
|
4878
|
+
readonly "~rebuild.out": RedactedFromValue<S>;
|
|
4858
4879
|
}
|
|
4859
4880
|
/**
|
|
4860
4881
|
* Middleware that wraps decoded errors in `Redacted`, preventing sensitive
|
|
@@ -4884,6 +4905,7 @@ export declare function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
|
4884
4905
|
* @since 4.0.0
|
|
4885
4906
|
*/
|
|
4886
4907
|
export interface CauseReason<E extends Top, D extends Top> extends declareConstructor<Cause_.Reason<E["Type"]>, Cause_.Reason<E["Encoded"]>, readonly [E, D], CauseReasonIso<E, D>> {
|
|
4908
|
+
readonly "~rebuild.out": CauseReason<E, D>;
|
|
4887
4909
|
readonly error: E;
|
|
4888
4910
|
readonly defect: D;
|
|
4889
4911
|
}
|
|
@@ -4916,6 +4938,7 @@ export declare function CauseReason<E extends Top, D extends Top>(error: E, defe
|
|
|
4916
4938
|
* @since 4.0.0
|
|
4917
4939
|
*/
|
|
4918
4940
|
export interface Cause<E extends Top, D extends Top> extends declareConstructor<Cause_.Cause<E["Type"]>, Cause_.Cause<E["Encoded"]>, readonly [E, D], CauseIso<E, D>> {
|
|
4941
|
+
readonly "~rebuild.out": Cause<E, D>;
|
|
4919
4942
|
readonly error: E;
|
|
4920
4943
|
readonly defect: D;
|
|
4921
4944
|
}
|
|
@@ -4932,12 +4955,13 @@ export type CauseIso<E extends Top, D extends Top> = ReadonlyArray<CauseReasonIs
|
|
|
4932
4955
|
*/
|
|
4933
4956
|
export declare function Cause<E extends Top, D extends Top>(error: E, defect: D): Cause<E, D>;
|
|
4934
4957
|
/**
|
|
4935
|
-
*
|
|
4958
|
+
* Companion type for {@link Error}.
|
|
4936
4959
|
*
|
|
4937
|
-
* @category
|
|
4960
|
+
* @category Error
|
|
4938
4961
|
* @since 4.0.0
|
|
4939
4962
|
*/
|
|
4940
4963
|
export interface Error extends instanceOf<globalThis.Error> {
|
|
4964
|
+
readonly "~rebuild.out": Error;
|
|
4941
4965
|
}
|
|
4942
4966
|
/**
|
|
4943
4967
|
* A schema that represents `Error` objects.
|
|
@@ -4960,9 +4984,9 @@ export declare const Error: Error;
|
|
|
4960
4984
|
*/
|
|
4961
4985
|
export declare const ErrorWithStack: Error;
|
|
4962
4986
|
/**
|
|
4963
|
-
*
|
|
4987
|
+
* Companion type for {@link Defect}.
|
|
4964
4988
|
*
|
|
4965
|
-
* @category
|
|
4989
|
+
* @category Defect
|
|
4966
4990
|
* @since 4.0.0
|
|
4967
4991
|
*/
|
|
4968
4992
|
export interface Defect extends Union<readonly [
|
|
@@ -4973,6 +4997,7 @@ export interface Defect extends Union<readonly [
|
|
|
4973
4997
|
}>>,
|
|
4974
4998
|
decodeTo<Unknown, Any>
|
|
4975
4999
|
]> {
|
|
5000
|
+
readonly "~rebuild.out": Defect;
|
|
4976
5001
|
}
|
|
4977
5002
|
/**
|
|
4978
5003
|
* A schema that represents defects.
|
|
@@ -4985,7 +5010,7 @@ export declare const Defect: Defect;
|
|
|
4985
5010
|
* A schema that represents defects, that also includes stack traces in the
|
|
4986
5011
|
* encoded form.
|
|
4987
5012
|
*
|
|
4988
|
-
* @category
|
|
5013
|
+
* @category Defect
|
|
4989
5014
|
* @since 4.0.0
|
|
4990
5015
|
*/
|
|
4991
5016
|
export declare const DefectWithStack: Defect;
|
|
@@ -4997,6 +5022,7 @@ export declare const DefectWithStack: Defect;
|
|
|
4997
5022
|
* @since 4.0.0
|
|
4998
5023
|
*/
|
|
4999
5024
|
export interface Exit<A extends Top, E extends Top, D extends Top> extends declareConstructor<Exit_.Exit<A["Type"], E["Type"]>, Exit_.Exit<A["Encoded"], E["Encoded"]>, readonly [A, E, D], ExitIso<A, E, D>> {
|
|
5025
|
+
readonly "~rebuild.out": Exit<A, E, D>;
|
|
5000
5026
|
readonly value: A;
|
|
5001
5027
|
readonly error: E;
|
|
5002
5028
|
readonly defect: D;
|
|
@@ -5020,12 +5046,13 @@ export type ExitIso<A extends Top, E extends Top, D extends Top> = {
|
|
|
5020
5046
|
*/
|
|
5021
5047
|
export declare function Exit<A extends Top, E extends Top, D extends Top>(value: A, error: E, defect: D): Exit<A, E, D>;
|
|
5022
5048
|
/**
|
|
5023
|
-
*
|
|
5049
|
+
* Companion type for {@link ReadonlyMap}.
|
|
5024
5050
|
*
|
|
5025
5051
|
* @category ReadonlyMap
|
|
5026
5052
|
* @since 4.0.0
|
|
5027
5053
|
*/
|
|
5028
5054
|
export interface $ReadonlyMap<Key extends Top, Value extends Top> extends declareConstructor<globalThis.ReadonlyMap<Key["Type"], Value["Type"]>, globalThis.ReadonlyMap<Key["Encoded"], Value["Encoded"]>, readonly [Key, Value], ReadonlyMapIso<Key, Value>> {
|
|
5055
|
+
readonly "~rebuild.out": $ReadonlyMap<Key, Value>;
|
|
5029
5056
|
readonly key: Key;
|
|
5030
5057
|
readonly value: Value;
|
|
5031
5058
|
}
|
|
@@ -5050,6 +5077,7 @@ export declare function ReadonlyMap<Key extends Top, Value extends Top>(key: Key
|
|
|
5050
5077
|
* @since 4.0.0
|
|
5051
5078
|
*/
|
|
5052
5079
|
export interface HashMap<Key extends Top, Value extends Top> extends declareConstructor<HashMap_.HashMap<Key["Type"], Value["Type"]>, HashMap_.HashMap<Key["Encoded"], Value["Encoded"]>, readonly [Key, Value], HashMapIso<Key, Value>> {
|
|
5080
|
+
readonly "~rebuild.out": HashMap<Key, Value>;
|
|
5053
5081
|
readonly key: Key;
|
|
5054
5082
|
readonly value: Value;
|
|
5055
5083
|
}
|
|
@@ -5067,12 +5095,13 @@ export type HashMapIso<Key extends Top, Value extends Top> = ReadonlyArray<reado
|
|
|
5067
5095
|
*/
|
|
5068
5096
|
export declare function HashMap<Key extends Top, Value extends Top>(key: Key, value: Value): HashMap<Key, Value>;
|
|
5069
5097
|
/**
|
|
5070
|
-
*
|
|
5098
|
+
* Companion type for {@link ReadonlySet}.
|
|
5071
5099
|
*
|
|
5072
5100
|
* @category ReadonlySet
|
|
5073
5101
|
* @since 4.0.0
|
|
5074
5102
|
*/
|
|
5075
5103
|
export interface $ReadonlySet<Value extends Top> extends declareConstructor<globalThis.ReadonlySet<Value["Type"]>, globalThis.ReadonlySet<Value["Encoded"]>, readonly [Value], ReadonlySetIso<Value>> {
|
|
5104
|
+
readonly "~rebuild.out": $ReadonlySet<Value>;
|
|
5076
5105
|
readonly value: Value;
|
|
5077
5106
|
}
|
|
5078
5107
|
/**
|
|
@@ -5093,6 +5122,7 @@ export declare function ReadonlySet<Value extends Top>(value: Value): $ReadonlyS
|
|
|
5093
5122
|
* @since 4.0.0
|
|
5094
5123
|
*/
|
|
5095
5124
|
export interface HashSet<Value extends Top> extends declareConstructor<HashSet_.HashSet<Value["Type"]>, HashSet_.HashSet<Value["Encoded"]>, readonly [Value], HashSetIso<Value>> {
|
|
5125
|
+
readonly "~rebuild.out": HashSet<Value>;
|
|
5096
5126
|
readonly value: Value;
|
|
5097
5127
|
}
|
|
5098
5128
|
/**
|
|
@@ -5116,6 +5146,7 @@ export declare function HashSet<Value extends Top>(value: Value): HashSet<Value>
|
|
|
5116
5146
|
* @since 4.0.0
|
|
5117
5147
|
*/
|
|
5118
5148
|
export interface Chunk<Value extends Top> extends declareConstructor<Chunk_.Chunk<Value["Type"]>, Chunk_.Chunk<Value["Encoded"]>, readonly [Value], ChunkIso<Value>> {
|
|
5149
|
+
readonly "~rebuild.out": Chunk<Value>;
|
|
5119
5150
|
readonly value: Value;
|
|
5120
5151
|
}
|
|
5121
5152
|
/**
|
|
@@ -5132,29 +5163,31 @@ export type ChunkIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
|
5132
5163
|
*/
|
|
5133
5164
|
export declare function Chunk<Value extends Top>(value: Value): Chunk<Value>;
|
|
5134
5165
|
/**
|
|
5135
|
-
*
|
|
5166
|
+
* Companion type for {@link RegExp}.
|
|
5136
5167
|
*
|
|
5137
|
-
* @category
|
|
5168
|
+
* @category RegExp
|
|
5138
5169
|
* @since 4.0.0
|
|
5139
5170
|
*/
|
|
5140
5171
|
export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
5172
|
+
readonly "~rebuild.out": RegExp;
|
|
5141
5173
|
}
|
|
5142
5174
|
/**
|
|
5143
5175
|
* Schema for JavaScript `RegExp` objects.
|
|
5144
5176
|
*
|
|
5145
5177
|
* The default JSON serializer encodes a `RegExp` as `{ source, flags }`.
|
|
5146
5178
|
*
|
|
5147
|
-
* @category
|
|
5179
|
+
* @category RegExp
|
|
5148
5180
|
* @since 4.0.0
|
|
5149
5181
|
*/
|
|
5150
5182
|
export declare const RegExp: RegExp;
|
|
5151
5183
|
/**
|
|
5152
|
-
*
|
|
5184
|
+
* Companion type for {@link URL}.
|
|
5153
5185
|
*
|
|
5154
5186
|
* @category URL
|
|
5155
5187
|
* @since 4.0.0
|
|
5156
5188
|
*/
|
|
5157
5189
|
export interface URL extends instanceOf<globalThis.URL> {
|
|
5190
|
+
readonly "~rebuild.out": URL;
|
|
5158
5191
|
}
|
|
5159
5192
|
/**
|
|
5160
5193
|
* A schema for JavaScript `URL` objects.
|
|
@@ -5168,12 +5201,13 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
5168
5201
|
*/
|
|
5169
5202
|
export declare const URL: URL;
|
|
5170
5203
|
/**
|
|
5171
|
-
*
|
|
5204
|
+
* Companion type for {@link URLFromString}.
|
|
5172
5205
|
*
|
|
5173
5206
|
* @category URL
|
|
5174
5207
|
* @since 4.0.0
|
|
5175
5208
|
*/
|
|
5176
5209
|
export interface URLFromString extends decodeTo<URL, String> {
|
|
5210
|
+
readonly "~rebuild.out": URLFromString;
|
|
5177
5211
|
}
|
|
5178
5212
|
/**
|
|
5179
5213
|
* A transformation schema that decodes a `string` into a `URL`.
|
|
@@ -5189,12 +5223,13 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
5189
5223
|
*/
|
|
5190
5224
|
export declare const URLFromString: URLFromString;
|
|
5191
5225
|
/**
|
|
5192
|
-
*
|
|
5226
|
+
* Companion type for {@link Date}.
|
|
5193
5227
|
*
|
|
5194
|
-
* @category
|
|
5228
|
+
* @category Date
|
|
5195
5229
|
* @since 4.0.0
|
|
5196
5230
|
*/
|
|
5197
5231
|
export interface Date extends instanceOf<globalThis.Date> {
|
|
5232
|
+
readonly "~rebuild.out": Date;
|
|
5198
5233
|
}
|
|
5199
5234
|
/**
|
|
5200
5235
|
* A schema for JavaScript `Date` objects.
|
|
@@ -5212,17 +5247,40 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
5212
5247
|
* // => Date { 2024-01-01T00:00:00.000Z }
|
|
5213
5248
|
* ```
|
|
5214
5249
|
*
|
|
5215
|
-
* @category
|
|
5250
|
+
* @category Date
|
|
5216
5251
|
* @since 4.0.0
|
|
5217
5252
|
*/
|
|
5218
5253
|
export declare const Date: Date;
|
|
5219
5254
|
/**
|
|
5220
|
-
*
|
|
5255
|
+
* Companion type for {@link DateFromString}.
|
|
5221
5256
|
*
|
|
5222
|
-
* @category
|
|
5257
|
+
* @category Date
|
|
5258
|
+
* @since 4.0.0
|
|
5259
|
+
*/
|
|
5260
|
+
export interface DateFromString extends decodeTo<Date, String> {
|
|
5261
|
+
readonly "~rebuild.out": DateFromString;
|
|
5262
|
+
}
|
|
5263
|
+
/**
|
|
5264
|
+
* A transformation schema that parses an ISO 8601 string into a `Date`.
|
|
5265
|
+
*
|
|
5266
|
+
* Decoding:
|
|
5267
|
+
* - A `string` is decoded as a `Date`.
|
|
5268
|
+
*
|
|
5269
|
+
* Encoding:
|
|
5270
|
+
* - A `Date` is encoded as a `string`.
|
|
5271
|
+
*
|
|
5272
|
+
* @category Date
|
|
5273
|
+
* @since 4.0.0
|
|
5274
|
+
*/
|
|
5275
|
+
export declare const DateFromString: DateFromString;
|
|
5276
|
+
/**
|
|
5277
|
+
* Companion type for {@link DateValid}.
|
|
5278
|
+
*
|
|
5279
|
+
* @category Date
|
|
5223
5280
|
* @since 4.0.0
|
|
5224
5281
|
*/
|
|
5225
5282
|
export interface DateValid extends Date {
|
|
5283
|
+
readonly "~rebuild.out": DateValid;
|
|
5226
5284
|
}
|
|
5227
5285
|
/**
|
|
5228
5286
|
* A schema for **valid** JavaScript `Date` objects.
|
|
@@ -5230,16 +5288,18 @@ export interface DateValid extends Date {
|
|
|
5230
5288
|
* This schema accepts `Date` instances but rejects invalid dates (such as `new
|
|
5231
5289
|
* Date("invalid")`).
|
|
5232
5290
|
*
|
|
5291
|
+
* @category Date
|
|
5233
5292
|
* @since 4.0.0
|
|
5234
5293
|
*/
|
|
5235
|
-
export declare const DateValid:
|
|
5294
|
+
export declare const DateValid: DateValid;
|
|
5236
5295
|
/**
|
|
5237
|
-
*
|
|
5296
|
+
* Companion type for {@link Duration}.
|
|
5238
5297
|
*
|
|
5239
5298
|
* @category Duration
|
|
5240
5299
|
* @since 4.0.0
|
|
5241
5300
|
*/
|
|
5242
5301
|
export interface Duration extends declare<Duration_.Duration> {
|
|
5302
|
+
readonly "~rebuild.out": Duration;
|
|
5243
5303
|
}
|
|
5244
5304
|
/**
|
|
5245
5305
|
* A schema for `Duration` values.
|
|
@@ -5263,12 +5323,13 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
5263
5323
|
*/
|
|
5264
5324
|
export declare const Duration: Duration;
|
|
5265
5325
|
/**
|
|
5266
|
-
*
|
|
5326
|
+
* Companion type for {@link DurationFromNanos}.
|
|
5267
5327
|
*
|
|
5268
5328
|
* @category Duration
|
|
5269
5329
|
* @since 4.0.0
|
|
5270
5330
|
*/
|
|
5271
5331
|
export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
5332
|
+
readonly "~rebuild.out": DurationFromNanos;
|
|
5272
5333
|
}
|
|
5273
5334
|
/**
|
|
5274
5335
|
* A transformation schema that decodes a non-negative `bigint` into a
|
|
@@ -5285,12 +5346,13 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
5285
5346
|
*/
|
|
5286
5347
|
export declare const DurationFromNanos: DurationFromNanos;
|
|
5287
5348
|
/**
|
|
5288
|
-
*
|
|
5349
|
+
* Companion type for {@link DurationFromMillis}.
|
|
5289
5350
|
*
|
|
5290
5351
|
* @category Duration
|
|
5291
5352
|
* @since 4.0.0
|
|
5292
5353
|
*/
|
|
5293
5354
|
export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
5355
|
+
readonly "~rebuild.out": DurationFromMillis;
|
|
5294
5356
|
}
|
|
5295
5357
|
/**
|
|
5296
5358
|
* A transformation schema that decodes a non-negative (possibly infinite)
|
|
@@ -5310,12 +5372,13 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
5310
5372
|
*/
|
|
5311
5373
|
export declare const DurationFromMillis: DurationFromMillis;
|
|
5312
5374
|
/**
|
|
5313
|
-
*
|
|
5375
|
+
* Companion type for {@link BigDecimal}.
|
|
5314
5376
|
*
|
|
5315
|
-
* @category
|
|
5377
|
+
* @category BigDecimal
|
|
5316
5378
|
* @since 4.0.0
|
|
5317
5379
|
*/
|
|
5318
5380
|
export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
5381
|
+
readonly "~rebuild.out": BigDecimal;
|
|
5319
5382
|
}
|
|
5320
5383
|
/**
|
|
5321
5384
|
* A schema for `BigDecimal` values.
|
|
@@ -5324,16 +5387,40 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
5324
5387
|
*
|
|
5325
5388
|
* - encodes `BigDecimal` as a `string`
|
|
5326
5389
|
*
|
|
5390
|
+
* @category BigDecimal
|
|
5327
5391
|
* @since 4.0.0
|
|
5328
5392
|
*/
|
|
5329
5393
|
export declare const BigDecimal: BigDecimal;
|
|
5330
5394
|
/**
|
|
5331
|
-
*
|
|
5395
|
+
* Companion type for {@link BigDecimalFromString}.
|
|
5396
|
+
*
|
|
5397
|
+
* @category BigDecimal
|
|
5398
|
+
* @since 4.0.0
|
|
5399
|
+
*/
|
|
5400
|
+
export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
5401
|
+
readonly "~rebuild.out": BigDecimalFromString;
|
|
5402
|
+
}
|
|
5403
|
+
/**
|
|
5404
|
+
* A transformation schema that parses a string into a `BigDecimal`.
|
|
5405
|
+
*
|
|
5406
|
+
* Decoding:
|
|
5407
|
+
* - A `string` is decoded as a `BigDecimal`.
|
|
5408
|
+
*
|
|
5409
|
+
* Encoding:
|
|
5410
|
+
* - A `BigDecimal` is encoded as a `string`.
|
|
5411
|
+
*
|
|
5412
|
+
* @category BigDecimal
|
|
5413
|
+
* @since 4.0.0
|
|
5414
|
+
*/
|
|
5415
|
+
export declare const BigDecimalFromString: BigDecimalFromString;
|
|
5416
|
+
/**
|
|
5417
|
+
* Companion type for {@link UnknownFromJsonString}.
|
|
5332
5418
|
*
|
|
5333
5419
|
* @category JSON
|
|
5334
5420
|
* @since 4.0.0
|
|
5335
5421
|
*/
|
|
5336
5422
|
export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
5423
|
+
readonly "~rebuild.out": UnknownFromJsonString;
|
|
5337
5424
|
}
|
|
5338
5425
|
/**
|
|
5339
5426
|
* A transformation schema that decodes a JSON-encoded string into an `unknown` value.
|
|
@@ -5355,16 +5442,18 @@ export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
|
5355
5442
|
* // => { a: 1, b: 2 }
|
|
5356
5443
|
* ```
|
|
5357
5444
|
*
|
|
5445
|
+
* @category JSON
|
|
5358
5446
|
* @since 4.0.0
|
|
5359
5447
|
*/
|
|
5360
|
-
export declare const UnknownFromJsonString:
|
|
5448
|
+
export declare const UnknownFromJsonString: UnknownFromJsonString;
|
|
5361
5449
|
/**
|
|
5362
|
-
*
|
|
5450
|
+
* Companion type for {@link fromJsonString}.
|
|
5363
5451
|
*
|
|
5364
5452
|
* @category JSON
|
|
5365
5453
|
* @since 4.0.0
|
|
5366
5454
|
*/
|
|
5367
5455
|
export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
5456
|
+
readonly "~rebuild.out": fromJsonString<S>;
|
|
5368
5457
|
}
|
|
5369
5458
|
/**
|
|
5370
5459
|
* Returns a schema that decodes a JSON string and then decodes the parsed value
|
|
@@ -5427,16 +5516,18 @@ export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
|
5427
5516
|
* // }
|
|
5428
5517
|
* ```
|
|
5429
5518
|
*
|
|
5519
|
+
* @category JSON
|
|
5430
5520
|
* @since 4.0.0
|
|
5431
5521
|
*/
|
|
5432
5522
|
export declare function fromJsonString<S extends Top>(schema: S): fromJsonString<S>;
|
|
5433
5523
|
/**
|
|
5434
|
-
*
|
|
5524
|
+
* Companion type for {@link File}.
|
|
5435
5525
|
*
|
|
5436
|
-
* @category
|
|
5526
|
+
* @category File
|
|
5437
5527
|
* @since 4.0.0
|
|
5438
5528
|
*/
|
|
5439
5529
|
export interface File extends instanceOf<globalThis.File> {
|
|
5530
|
+
readonly "~rebuild.out": File;
|
|
5440
5531
|
}
|
|
5441
5532
|
/**
|
|
5442
5533
|
* Schema for JavaScript `File` objects.
|
|
@@ -5444,17 +5535,18 @@ export interface File extends instanceOf<globalThis.File> {
|
|
|
5444
5535
|
* The default JSON serializer encodes a `File` as `{ data, type, name, lastModified }`
|
|
5445
5536
|
* where `data` is base64-encoded.
|
|
5446
5537
|
*
|
|
5447
|
-
* @category
|
|
5538
|
+
* @category File
|
|
5448
5539
|
* @since 4.0.0
|
|
5449
5540
|
*/
|
|
5450
5541
|
export declare const File: File;
|
|
5451
5542
|
/**
|
|
5452
|
-
*
|
|
5543
|
+
* Companion type for {@link FormData}.
|
|
5453
5544
|
*
|
|
5454
|
-
* @category
|
|
5545
|
+
* @category FormData
|
|
5455
5546
|
* @since 4.0.0
|
|
5456
5547
|
*/
|
|
5457
5548
|
export interface FormData extends instanceOf<globalThis.FormData> {
|
|
5549
|
+
readonly "~rebuild.out": FormData;
|
|
5458
5550
|
}
|
|
5459
5551
|
/**
|
|
5460
5552
|
* Schema for JavaScript `FormData` objects.
|
|
@@ -5462,17 +5554,18 @@ export interface FormData extends instanceOf<globalThis.FormData> {
|
|
|
5462
5554
|
* The default JSON serializer encodes a `FormData` as an array of `[key, entry]`
|
|
5463
5555
|
* pairs where each entry is tagged as `"String"` or `"File"`.
|
|
5464
5556
|
*
|
|
5465
|
-
* @category
|
|
5557
|
+
* @category FormData
|
|
5466
5558
|
* @since 4.0.0
|
|
5467
5559
|
*/
|
|
5468
5560
|
export declare const FormData: FormData;
|
|
5469
5561
|
/**
|
|
5470
|
-
*
|
|
5562
|
+
* Companion type for {@link fromFormData}.
|
|
5471
5563
|
*
|
|
5472
|
-
* @category
|
|
5564
|
+
* @category FormData
|
|
5473
5565
|
* @since 4.0.0
|
|
5474
5566
|
*/
|
|
5475
5567
|
export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
5568
|
+
readonly "~rebuild.out": fromFormData<S>;
|
|
5476
5569
|
}
|
|
5477
5570
|
/**
|
|
5478
5571
|
* `Schema.fromFormData` returns a schema that reads a `FormData` instance,
|
|
@@ -5559,29 +5652,31 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
5559
5652
|
*/
|
|
5560
5653
|
export declare function fromFormData<S extends Top>(schema: S): fromFormData<S>;
|
|
5561
5654
|
/**
|
|
5562
|
-
*
|
|
5655
|
+
* Companion type for {@link URLSearchParams}.
|
|
5563
5656
|
*
|
|
5564
|
-
* @category
|
|
5657
|
+
* @category URLSearchParams
|
|
5565
5658
|
* @since 4.0.0
|
|
5566
5659
|
*/
|
|
5567
5660
|
export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams> {
|
|
5661
|
+
readonly "~rebuild.out": URLSearchParams;
|
|
5568
5662
|
}
|
|
5569
5663
|
/**
|
|
5570
5664
|
* Schema for JavaScript `URLSearchParams` objects.
|
|
5571
5665
|
*
|
|
5572
5666
|
* The default JSON serializer encodes a `URLSearchParams` as a query string.
|
|
5573
5667
|
*
|
|
5574
|
-
* @category
|
|
5668
|
+
* @category URLSearchParams
|
|
5575
5669
|
* @since 4.0.0
|
|
5576
5670
|
*/
|
|
5577
5671
|
export declare const URLSearchParams: URLSearchParams;
|
|
5578
5672
|
/**
|
|
5579
|
-
*
|
|
5673
|
+
* Companion type for {@link fromURLSearchParams}.
|
|
5580
5674
|
*
|
|
5581
|
-
* @category
|
|
5675
|
+
* @category URLSearchParams
|
|
5582
5676
|
* @since 4.0.0
|
|
5583
5677
|
*/
|
|
5584
5678
|
export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearchParams> {
|
|
5679
|
+
readonly "~rebuild.out": fromURLSearchParams<S>;
|
|
5585
5680
|
}
|
|
5586
5681
|
/**
|
|
5587
5682
|
* `Schema.fromURLSearchParams` returns a schema that reads a `URLSearchParams`
|
|
@@ -5659,40 +5754,45 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
5659
5754
|
*/
|
|
5660
5755
|
export declare function fromURLSearchParams<S extends Top>(schema: S): fromURLSearchParams<S>;
|
|
5661
5756
|
/**
|
|
5662
|
-
*
|
|
5757
|
+
* Companion type for {@link Finite}.
|
|
5663
5758
|
*
|
|
5664
|
-
* @category
|
|
5759
|
+
* @category Number
|
|
5665
5760
|
* @since 4.0.0
|
|
5666
5761
|
*/
|
|
5667
5762
|
export interface Finite extends Number {
|
|
5763
|
+
readonly "~rebuild.out": Finite;
|
|
5668
5764
|
}
|
|
5669
5765
|
/**
|
|
5670
5766
|
* A schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
5671
5767
|
*
|
|
5768
|
+
* @category Number
|
|
5672
5769
|
* @since 4.0.0
|
|
5673
5770
|
*/
|
|
5674
5771
|
export declare const Finite: Finite;
|
|
5675
5772
|
/**
|
|
5676
|
-
*
|
|
5773
|
+
* Companion type for {@link Int}.
|
|
5677
5774
|
*
|
|
5678
|
-
* @category
|
|
5775
|
+
* @category Number
|
|
5679
5776
|
* @since 4.0.0
|
|
5680
5777
|
*/
|
|
5681
5778
|
export interface Int extends Number {
|
|
5779
|
+
readonly "~rebuild.out": Int;
|
|
5682
5780
|
}
|
|
5683
5781
|
/**
|
|
5684
5782
|
* A schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
5685
5783
|
*
|
|
5784
|
+
* @category Number
|
|
5686
5785
|
* @since 4.0.0
|
|
5687
5786
|
*/
|
|
5688
5787
|
export declare const Int: Int;
|
|
5689
5788
|
/**
|
|
5690
|
-
*
|
|
5789
|
+
* Companion type for {@link NumberFromString}.
|
|
5691
5790
|
*
|
|
5692
|
-
* @category
|
|
5791
|
+
* @category Number
|
|
5693
5792
|
* @since 4.0.0
|
|
5694
5793
|
*/
|
|
5695
5794
|
export interface NumberFromString extends decodeTo<Finite, String> {
|
|
5795
|
+
readonly "~rebuild.out": NumberFromString;
|
|
5696
5796
|
}
|
|
5697
5797
|
/**
|
|
5698
5798
|
* A transformation schema that parses a string into a number.
|
|
@@ -5703,16 +5803,18 @@ export interface NumberFromString extends decodeTo<Finite, String> {
|
|
|
5703
5803
|
* Encoding:
|
|
5704
5804
|
* - A number is encoded as a `string`.
|
|
5705
5805
|
*
|
|
5806
|
+
* @category Number
|
|
5706
5807
|
* @since 4.0.0
|
|
5707
5808
|
*/
|
|
5708
5809
|
export declare const NumberFromString: NumberFromString;
|
|
5709
5810
|
/**
|
|
5710
|
-
*
|
|
5811
|
+
* Companion type for {@link FiniteFromString}.
|
|
5711
5812
|
*
|
|
5712
|
-
* @category
|
|
5813
|
+
* @category Number
|
|
5713
5814
|
* @since 4.0.0
|
|
5714
5815
|
*/
|
|
5715
5816
|
export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
5817
|
+
readonly "~rebuild.out": FiniteFromString;
|
|
5716
5818
|
}
|
|
5717
5819
|
/**
|
|
5718
5820
|
* A transformation schema that parses a string into a finite number.
|
|
@@ -5724,30 +5826,56 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
5724
5826
|
* Encoding:
|
|
5725
5827
|
* - A finite number is encoded as a `string`.
|
|
5726
5828
|
*
|
|
5829
|
+
* @category Number
|
|
5727
5830
|
* @since 4.0.0
|
|
5728
5831
|
*/
|
|
5729
5832
|
export declare const FiniteFromString: FiniteFromString;
|
|
5730
5833
|
/**
|
|
5731
|
-
*
|
|
5834
|
+
* Companion type for {@link BigIntFromString}.
|
|
5732
5835
|
*
|
|
5733
|
-
* @category
|
|
5836
|
+
* @category BigInt
|
|
5837
|
+
* @since 4.0.0
|
|
5838
|
+
*/
|
|
5839
|
+
export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
5840
|
+
readonly "~rebuild.out": BigIntFromString;
|
|
5841
|
+
}
|
|
5842
|
+
/**
|
|
5843
|
+
* A transformation schema that parses a string into a `bigint`.
|
|
5844
|
+
*
|
|
5845
|
+
* Decoding:
|
|
5846
|
+
* - A `string` is decoded as a `bigint`.
|
|
5847
|
+
*
|
|
5848
|
+
* Encoding:
|
|
5849
|
+
* - A `bigint` is encoded as a `string`.
|
|
5850
|
+
*
|
|
5851
|
+
* @category BigInt
|
|
5852
|
+
* @since 4.0.0
|
|
5853
|
+
*/
|
|
5854
|
+
export declare const BigIntFromString: BigIntFromString;
|
|
5855
|
+
/**
|
|
5856
|
+
* Companion type for {@link Trimmed}.
|
|
5857
|
+
*
|
|
5858
|
+
* @category String
|
|
5734
5859
|
* @since 4.0.0
|
|
5735
5860
|
*/
|
|
5736
5861
|
export interface Trimmed extends String {
|
|
5862
|
+
readonly "~rebuild.out": Trimmed;
|
|
5737
5863
|
}
|
|
5738
5864
|
/**
|
|
5739
5865
|
* A schema for strings that contains no leading or trailing whitespaces.
|
|
5740
5866
|
*
|
|
5867
|
+
* @category String
|
|
5741
5868
|
* @since 4.0.0
|
|
5742
5869
|
*/
|
|
5743
5870
|
export declare const Trimmed: Trimmed;
|
|
5744
5871
|
/**
|
|
5745
|
-
*
|
|
5872
|
+
* Companion type for {@link Trim}.
|
|
5746
5873
|
*
|
|
5747
|
-
* @category
|
|
5874
|
+
* @category String
|
|
5748
5875
|
* @since 4.0.0
|
|
5749
5876
|
*/
|
|
5750
5877
|
export interface Trim extends decodeTo<Trimmed, String> {
|
|
5878
|
+
readonly "~rebuild.out": Trim;
|
|
5751
5879
|
}
|
|
5752
5880
|
/**
|
|
5753
5881
|
* A transformation schema that trims whitespace from a string.
|
|
@@ -5758,17 +5886,126 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
5758
5886
|
* Encoding:
|
|
5759
5887
|
* - The trimmed string is encoded as is.
|
|
5760
5888
|
*
|
|
5889
|
+
* @category String
|
|
5761
5890
|
* @since 4.0.0
|
|
5762
5891
|
*/
|
|
5763
5892
|
export declare const Trim: Trim;
|
|
5893
|
+
/**
|
|
5894
|
+
* Companion type for {@link StringFromBase64}.
|
|
5895
|
+
*
|
|
5896
|
+
* @category String
|
|
5897
|
+
* @since 4.0.0
|
|
5898
|
+
*/
|
|
5899
|
+
export interface StringFromBase64 extends decodeTo<String, String> {
|
|
5900
|
+
readonly "~rebuild.out": StringFromBase64;
|
|
5901
|
+
}
|
|
5902
|
+
/**
|
|
5903
|
+
* Decodes a base64 (RFC4648) encoded string into a UTF-8 string.
|
|
5904
|
+
*
|
|
5905
|
+
* Decoding:
|
|
5906
|
+
* - A **valid** base64 encoded string is decoded as a UTF-8 `string`.
|
|
5907
|
+
*
|
|
5908
|
+
* Encoding:
|
|
5909
|
+
* - A `string` is encoded as a base64-encoded string.
|
|
5910
|
+
*
|
|
5911
|
+
* @category String
|
|
5912
|
+
* @since 4.0.0
|
|
5913
|
+
*/
|
|
5914
|
+
export declare const StringFromBase64: StringFromBase64;
|
|
5915
|
+
/**
|
|
5916
|
+
* Companion type for {@link StringFromBase64Url}.
|
|
5917
|
+
*
|
|
5918
|
+
* @category String
|
|
5919
|
+
* @since 4.0.0
|
|
5920
|
+
*/
|
|
5921
|
+
export interface StringFromBase64Url extends decodeTo<String, String> {
|
|
5922
|
+
readonly "~rebuild.out": StringFromBase64Url;
|
|
5923
|
+
}
|
|
5924
|
+
/**
|
|
5925
|
+
* Decodes a base64 (URL) encoded string into a UTF-8 string.
|
|
5926
|
+
*
|
|
5927
|
+
* Decoding:
|
|
5928
|
+
* - A **valid** base64 (URL) encoded string is decoded as a UTF-8 `string`.
|
|
5929
|
+
*
|
|
5930
|
+
* Encoding:
|
|
5931
|
+
* - A `string` is encoded as a base64 (URL) encoded string.
|
|
5932
|
+
*
|
|
5933
|
+
* @category String
|
|
5934
|
+
* @since 4.0.0
|
|
5935
|
+
*/
|
|
5936
|
+
export declare const StringFromBase64Url: StringFromBase64Url;
|
|
5937
|
+
/**
|
|
5938
|
+
* Companion type for {@link StringFromHex}.
|
|
5939
|
+
*
|
|
5940
|
+
* @category String
|
|
5941
|
+
* @since 4.0.0
|
|
5942
|
+
*/
|
|
5943
|
+
export interface StringFromHex extends decodeTo<String, String> {
|
|
5944
|
+
readonly "~rebuild.out": StringFromHex;
|
|
5945
|
+
}
|
|
5946
|
+
/**
|
|
5947
|
+
* Decodes a hex encoded string into a UTF-8 string.
|
|
5948
|
+
*
|
|
5949
|
+
* Decoding:
|
|
5950
|
+
* - A **valid** hex encoded string is decoded as a UTF-8 `string`.
|
|
5951
|
+
*
|
|
5952
|
+
* Encoding:
|
|
5953
|
+
* - A `string` is encoded as a hex string.
|
|
5954
|
+
*
|
|
5955
|
+
* @category String
|
|
5956
|
+
* @since 4.0.0
|
|
5957
|
+
*/
|
|
5958
|
+
export declare const StringFromHex: StringFromHex;
|
|
5959
|
+
/**
|
|
5960
|
+
* Companion type for {@link StringFromUriComponent}.
|
|
5961
|
+
*
|
|
5962
|
+
* @category String
|
|
5963
|
+
* @since 4.0.0
|
|
5964
|
+
*/
|
|
5965
|
+
export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
5966
|
+
readonly "~rebuild.out": StringFromUriComponent;
|
|
5967
|
+
}
|
|
5968
|
+
/**
|
|
5969
|
+
* Decodes a URI component encoded string into a UTF-8 string.
|
|
5970
|
+
* Can be used to store data in a URL.
|
|
5971
|
+
*
|
|
5972
|
+
* Decoding:
|
|
5973
|
+
* - A **valid** URI component encoded string is decoded as a UTF-8 `string`.
|
|
5974
|
+
*
|
|
5975
|
+
* Encoding:
|
|
5976
|
+
* - A `string` is encoded as a URI component encoded string.
|
|
5977
|
+
*
|
|
5978
|
+
* **Example**
|
|
5979
|
+
*
|
|
5980
|
+
* ```ts
|
|
5981
|
+
* import { Schema } from "effect"
|
|
5982
|
+
*
|
|
5983
|
+
* const PaginationSchema = Schema.Struct({
|
|
5984
|
+
* maxItemPerPage: Schema.Number,
|
|
5985
|
+
* page: Schema.Number
|
|
5986
|
+
* })
|
|
5987
|
+
*
|
|
5988
|
+
* const UrlSchema = Schema.StringFromUriComponent.pipe(
|
|
5989
|
+
* Schema.decodeTo(Schema.fromJsonString(PaginationSchema))
|
|
5990
|
+
* )
|
|
5991
|
+
*
|
|
5992
|
+
* console.log(Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 }))
|
|
5993
|
+
* // %7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D
|
|
5994
|
+
* ```
|
|
5995
|
+
*
|
|
5996
|
+
* @category String
|
|
5997
|
+
* @since 4.0.0
|
|
5998
|
+
*/
|
|
5999
|
+
export declare const StringFromUriComponent: StringFromUriComponent;
|
|
5764
6000
|
/**
|
|
5765
6001
|
* A union schema for JavaScript property keys: `number | symbol | string`.
|
|
5766
6002
|
*
|
|
5767
|
-
* @category
|
|
6003
|
+
* @category PropertyKey
|
|
5768
6004
|
* @since 4.0.0
|
|
5769
6005
|
*/
|
|
5770
6006
|
export declare const PropertyKey: Union<readonly [Finite, Symbol, String]>;
|
|
5771
6007
|
/**
|
|
6008
|
+
* @category StandardSchema
|
|
5772
6009
|
* @since 4.0.0
|
|
5773
6010
|
*/
|
|
5774
6011
|
export declare const StandardSchemaV1FailureResult: Struct<{
|
|
@@ -5780,12 +6017,13 @@ export declare const StandardSchemaV1FailureResult: Struct<{
|
|
|
5780
6017
|
}>>;
|
|
5781
6018
|
}>;
|
|
5782
6019
|
/**
|
|
5783
|
-
*
|
|
6020
|
+
* Companion type for {@link BooleanFromBit}.
|
|
5784
6021
|
*
|
|
5785
|
-
* @category
|
|
6022
|
+
* @category Boolean
|
|
5786
6023
|
* @since 4.0.0
|
|
5787
6024
|
*/
|
|
5788
6025
|
export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0, 1]>> {
|
|
6026
|
+
readonly "~rebuild.out": BooleanFromBit;
|
|
5789
6027
|
}
|
|
5790
6028
|
/**
|
|
5791
6029
|
* A boolean parsed from 0 or 1.
|
|
@@ -5795,12 +6033,13 @@ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0,
|
|
|
5795
6033
|
*/
|
|
5796
6034
|
export declare const BooleanFromBit: BooleanFromBit;
|
|
5797
6035
|
/**
|
|
5798
|
-
*
|
|
6036
|
+
* Companion type for {@link Uint8Array}.
|
|
5799
6037
|
*
|
|
5800
|
-
* @category
|
|
6038
|
+
* @category Uint8Array
|
|
5801
6039
|
* @since 4.0.0
|
|
5802
6040
|
*/
|
|
5803
6041
|
export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBufferLike>> {
|
|
6042
|
+
readonly "~rebuild.out": Uint8Array;
|
|
5804
6043
|
}
|
|
5805
6044
|
/**
|
|
5806
6045
|
* A schema for JavaScript `Uint8Array` objects.
|
|
@@ -5814,12 +6053,13 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
5814
6053
|
*/
|
|
5815
6054
|
export declare const Uint8Array: Uint8Array;
|
|
5816
6055
|
/**
|
|
5817
|
-
*
|
|
6056
|
+
* Companion type for {@link Uint8ArrayFromBase64}.
|
|
5818
6057
|
*
|
|
5819
|
-
* @category
|
|
6058
|
+
* @category Uint8Array
|
|
5820
6059
|
* @since 4.0.0
|
|
5821
6060
|
*/
|
|
5822
6061
|
export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
6062
|
+
readonly "~rebuild.out": Uint8ArrayFromBase64;
|
|
5823
6063
|
}
|
|
5824
6064
|
/**
|
|
5825
6065
|
* A transformation schema that decodes a base64 encoded string into a
|
|
@@ -5836,12 +6076,13 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
5836
6076
|
*/
|
|
5837
6077
|
export declare const Uint8ArrayFromBase64: Uint8ArrayFromBase64;
|
|
5838
6078
|
/**
|
|
5839
|
-
*
|
|
6079
|
+
* Companion type for {@link Uint8ArrayFromBase64Url}.
|
|
5840
6080
|
*
|
|
5841
|
-
* @category
|
|
6081
|
+
* @category Uint8Array
|
|
5842
6082
|
* @since 4.0.0
|
|
5843
6083
|
*/
|
|
5844
6084
|
export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
6085
|
+
readonly "~rebuild.out": Uint8ArrayFromBase64Url;
|
|
5845
6086
|
}
|
|
5846
6087
|
/**
|
|
5847
6088
|
* A transformation schema that decodes a base64 (URL) encoded string into a
|
|
@@ -5858,12 +6099,13 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
5858
6099
|
*/
|
|
5859
6100
|
export declare const Uint8ArrayFromBase64Url: Uint8ArrayFromBase64Url;
|
|
5860
6101
|
/**
|
|
5861
|
-
*
|
|
6102
|
+
* Companion type for {@link Uint8ArrayFromHex}.
|
|
5862
6103
|
*
|
|
5863
|
-
* @category
|
|
6104
|
+
* @category Uint8Array
|
|
5864
6105
|
* @since 4.0.0
|
|
5865
6106
|
*/
|
|
5866
6107
|
export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
6108
|
+
readonly "~rebuild.out": Uint8ArrayFromHex;
|
|
5867
6109
|
}
|
|
5868
6110
|
/**
|
|
5869
6111
|
* A transformation schema that decodes a hex encoded string into a
|
|
@@ -5880,12 +6122,13 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
5880
6122
|
*/
|
|
5881
6123
|
export declare const Uint8ArrayFromHex: Uint8ArrayFromHex;
|
|
5882
6124
|
/**
|
|
5883
|
-
*
|
|
6125
|
+
* Companion type for {@link DateTimeUtc}.
|
|
5884
6126
|
*
|
|
5885
6127
|
* @category DateTime
|
|
5886
6128
|
* @since 4.0.0
|
|
5887
6129
|
*/
|
|
5888
6130
|
export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
6131
|
+
readonly "~rebuild.out": DateTimeUtc;
|
|
5889
6132
|
}
|
|
5890
6133
|
/**
|
|
5891
6134
|
* A schema for `DateTime.Utc` values.
|
|
@@ -5899,12 +6142,13 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
5899
6142
|
*/
|
|
5900
6143
|
export declare const DateTimeUtc: DateTimeUtc;
|
|
5901
6144
|
/**
|
|
5902
|
-
*
|
|
6145
|
+
* Companion type for {@link DateTimeUtcFromDate}.
|
|
5903
6146
|
*
|
|
5904
6147
|
* @category DateTime
|
|
5905
6148
|
* @since 4.0.0
|
|
5906
6149
|
*/
|
|
5907
6150
|
export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
6151
|
+
readonly "~rebuild.out": DateTimeUtcFromDate;
|
|
5908
6152
|
}
|
|
5909
6153
|
/**
|
|
5910
6154
|
* A transformation schema that decodes a `Date` into a `DateTime.Utc`.
|
|
@@ -5920,12 +6164,13 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
5920
6164
|
*/
|
|
5921
6165
|
export declare const DateTimeUtcFromDate: DateTimeUtcFromDate;
|
|
5922
6166
|
/**
|
|
5923
|
-
*
|
|
6167
|
+
* Companion type for {@link DateTimeUtcFromString}.
|
|
5924
6168
|
*
|
|
5925
6169
|
* @category DateTime
|
|
5926
6170
|
* @since 4.0.0
|
|
5927
6171
|
*/
|
|
5928
6172
|
export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
6173
|
+
readonly "~rebuild.out": DateTimeUtcFromString;
|
|
5929
6174
|
}
|
|
5930
6175
|
/**
|
|
5931
6176
|
* A transformation schema that decodes a string into a `DateTime.Utc`.
|
|
@@ -5943,12 +6188,13 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
5943
6188
|
*/
|
|
5944
6189
|
export declare const DateTimeUtcFromString: DateTimeUtcFromString;
|
|
5945
6190
|
/**
|
|
5946
|
-
*
|
|
6191
|
+
* Companion type for {@link DateTimeUtcFromMillis}.
|
|
5947
6192
|
*
|
|
5948
6193
|
* @category DateTime
|
|
5949
6194
|
* @since 4.0.0
|
|
5950
6195
|
*/
|
|
5951
6196
|
export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>, Number> {
|
|
6197
|
+
readonly "~rebuild.out": DateTimeUtcFromMillis;
|
|
5952
6198
|
}
|
|
5953
6199
|
/**
|
|
5954
6200
|
* A transformation schema that decodes a number into a `DateTime.Utc`.
|
|
@@ -5964,12 +6210,13 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
5964
6210
|
*/
|
|
5965
6211
|
export declare const DateTimeUtcFromMillis: DateTimeUtcFromMillis;
|
|
5966
6212
|
/**
|
|
5967
|
-
*
|
|
6213
|
+
* Companion type for {@link TimeZoneOffset}.
|
|
5968
6214
|
*
|
|
5969
6215
|
* @category DateTime
|
|
5970
6216
|
* @since 4.0.0
|
|
5971
6217
|
*/
|
|
5972
6218
|
export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
6219
|
+
readonly "~rebuild.out": TimeZoneOffset;
|
|
5973
6220
|
}
|
|
5974
6221
|
/**
|
|
5975
6222
|
* A schema for `DateTime.TimeZone.Offset` values.
|
|
@@ -5983,12 +6230,13 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
5983
6230
|
*/
|
|
5984
6231
|
export declare const TimeZoneOffset: TimeZoneOffset;
|
|
5985
6232
|
/**
|
|
5986
|
-
*
|
|
6233
|
+
* Companion type for {@link TimeZoneNamed}.
|
|
5987
6234
|
*
|
|
5988
6235
|
* @category DateTime
|
|
5989
6236
|
* @since 4.0.0
|
|
5990
6237
|
*/
|
|
5991
6238
|
export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
6239
|
+
readonly "~rebuild.out": TimeZoneNamed;
|
|
5992
6240
|
}
|
|
5993
6241
|
/**
|
|
5994
6242
|
* A schema for `DateTime.TimeZone.Named` values.
|
|
@@ -6002,12 +6250,35 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
6002
6250
|
*/
|
|
6003
6251
|
export declare const TimeZoneNamed: TimeZoneNamed;
|
|
6004
6252
|
/**
|
|
6005
|
-
*
|
|
6253
|
+
* Companion type for {@link TimeZoneNamedFromString}.
|
|
6254
|
+
*
|
|
6255
|
+
* @category DateTime
|
|
6256
|
+
* @since 4.0.0
|
|
6257
|
+
*/
|
|
6258
|
+
export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String> {
|
|
6259
|
+
readonly "~rebuild.out": TimeZoneNamedFromString;
|
|
6260
|
+
}
|
|
6261
|
+
/**
|
|
6262
|
+
* A transformation schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
6263
|
+
*
|
|
6264
|
+
* Decoding:
|
|
6265
|
+
* - A `string` is decoded as a `DateTime.TimeZone.Named`.
|
|
6266
|
+
*
|
|
6267
|
+
* Encoding:
|
|
6268
|
+
* - A `DateTime.TimeZone.Named` is encoded as a `string`.
|
|
6269
|
+
*
|
|
6270
|
+
* @category DateTime
|
|
6271
|
+
* @since 4.0.0
|
|
6272
|
+
*/
|
|
6273
|
+
export declare const TimeZoneNamedFromString: TimeZoneNamedFromString;
|
|
6274
|
+
/**
|
|
6275
|
+
* Companion type for {@link TimeZone}.
|
|
6006
6276
|
*
|
|
6007
6277
|
* @category DateTime
|
|
6008
6278
|
* @since 4.0.0
|
|
6009
6279
|
*/
|
|
6010
6280
|
export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
6281
|
+
readonly "~rebuild.out": TimeZone;
|
|
6011
6282
|
}
|
|
6012
6283
|
/**
|
|
6013
6284
|
* A schema for `DateTime.TimeZone` values.
|
|
@@ -6022,12 +6293,35 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
6022
6293
|
*/
|
|
6023
6294
|
export declare const TimeZone: TimeZone;
|
|
6024
6295
|
/**
|
|
6025
|
-
*
|
|
6296
|
+
* Companion type for {@link TimeZoneFromString}.
|
|
6297
|
+
*
|
|
6298
|
+
* @category DateTime
|
|
6299
|
+
* @since 4.0.0
|
|
6300
|
+
*/
|
|
6301
|
+
export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
6302
|
+
readonly "~rebuild.out": TimeZoneFromString;
|
|
6303
|
+
}
|
|
6304
|
+
/**
|
|
6305
|
+
* A transformation schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
6306
|
+
*
|
|
6307
|
+
* Decoding:
|
|
6308
|
+
* - A `string` (IANA identifier or offset like `+03:00`) is decoded as a `DateTime.TimeZone`.
|
|
6309
|
+
*
|
|
6310
|
+
* Encoding:
|
|
6311
|
+
* - A `DateTime.TimeZone` is encoded as a `string`.
|
|
6312
|
+
*
|
|
6313
|
+
* @category DateTime
|
|
6314
|
+
* @since 4.0.0
|
|
6315
|
+
*/
|
|
6316
|
+
export declare const TimeZoneFromString: TimeZoneFromString;
|
|
6317
|
+
/**
|
|
6318
|
+
* Companion type for {@link DateTimeZoned}.
|
|
6026
6319
|
*
|
|
6027
6320
|
* @category DateTime
|
|
6028
6321
|
* @since 4.0.0
|
|
6029
6322
|
*/
|
|
6030
6323
|
export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
6324
|
+
readonly "~rebuild.out": DateTimeZoned;
|
|
6031
6325
|
}
|
|
6032
6326
|
/**
|
|
6033
6327
|
* A schema for `DateTime.Zoned` values.
|
|
@@ -6041,6 +6335,28 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
6041
6335
|
* @since 4.0.0
|
|
6042
6336
|
*/
|
|
6043
6337
|
export declare const DateTimeZoned: DateTimeZoned;
|
|
6338
|
+
/**
|
|
6339
|
+
* Companion type for {@link DateTimeZonedFromString}.
|
|
6340
|
+
*
|
|
6341
|
+
* @category DateTime
|
|
6342
|
+
* @since 4.0.0
|
|
6343
|
+
*/
|
|
6344
|
+
export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String> {
|
|
6345
|
+
readonly "~rebuild.out": DateTimeZonedFromString;
|
|
6346
|
+
}
|
|
6347
|
+
/**
|
|
6348
|
+
* A transformation schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
6349
|
+
*
|
|
6350
|
+
* Decoding:
|
|
6351
|
+
* - A `string` (e.g. `2024-01-01T00:00:00.000+00:00[Europe/London]`) is decoded as a `DateTime.Zoned`.
|
|
6352
|
+
*
|
|
6353
|
+
* Encoding:
|
|
6354
|
+
* - A `DateTime.Zoned` is encoded as a `string`.
|
|
6355
|
+
*
|
|
6356
|
+
* @category DateTime
|
|
6357
|
+
* @since 4.0.0
|
|
6358
|
+
*/
|
|
6359
|
+
export declare const DateTimeZonedFromString: DateTimeZonedFromString;
|
|
6044
6360
|
/**
|
|
6045
6361
|
* Interface for schema-backed classes created with {@link Class}.
|
|
6046
6362
|
*
|
|
@@ -6075,20 +6391,10 @@ export interface Class<Self, S extends Top & {
|
|
|
6075
6391
|
mapFields<To extends Struct.Fields>(f: (fields: S["fields"]) => To, options?: {
|
|
6076
6392
|
readonly unsafePreserveChecks?: boolean | undefined;
|
|
6077
6393
|
} | undefined): Struct<Simplify<Readonly<To>>>;
|
|
6394
|
+
extend<Extended = never, Static = {}, Brand = {}>(identifier: string): <NewFields extends Struct.Fields>(fields: NewFields, annotations?: Annotations.Declaration<Extended, readonly [Struct<Simplify<Assign<S["fields"], NewFields>>>]>) => [Extended] extends [never] ? MissingSelfGeneric<"Base.extend"> : InheritStaticMembers<Class<Extended, Struct<Simplify<Assign<S["fields"], NewFields>>>, Self & Brand>, Static>;
|
|
6078
6395
|
}
|
|
6079
|
-
type
|
|
6080
|
-
|
|
6081
|
-
* A {@link Class} that additionally exposes an `extend` method, allowing
|
|
6082
|
-
* subclasses to be derived with extra fields while inheriting all parent
|
|
6083
|
-
* fields and validation.
|
|
6084
|
-
*
|
|
6085
|
-
* @since 4.0.0
|
|
6086
|
-
*/
|
|
6087
|
-
export interface ExtendableClass<Self, S extends Top & {
|
|
6088
|
-
readonly fields: Struct.Fields;
|
|
6089
|
-
}, Inherited> extends Class<Self, S, Inherited> {
|
|
6090
|
-
extend<Extended, Static = {}, Brand = {}>(identifier: string): <NewFields extends Struct.Fields>(fields: NewFields, annotations?: Annotations.Declaration<Extended, readonly [Struct<Simplify<Assign<S["fields"], NewFields>>>]>) => AddStaticMembers<ExtendableClass<Extended, Struct<Simplify<Assign<S["fields"], NewFields>>>, Self & Brand>, Static>;
|
|
6091
|
-
}
|
|
6396
|
+
type InheritStaticMembers<C, Static> = C & Pick<Static, Exclude<keyof Static, keyof C>>;
|
|
6397
|
+
type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use \`class Self extends ${Usage}<Self>(...)\``;
|
|
6092
6398
|
/**
|
|
6093
6399
|
* Creates a schema-backed class whose constructor validates input against a
|
|
6094
6400
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
@@ -6178,7 +6484,7 @@ export declare const Class: {
|
|
|
6178
6484
|
* @category Constructors
|
|
6179
6485
|
* @since 4.0.0
|
|
6180
6486
|
*/
|
|
6181
|
-
<Self, Brand = {}>(identifier: string): {
|
|
6487
|
+
<Self = never, Brand = {}>(identifier: string): {
|
|
6182
6488
|
/**
|
|
6183
6489
|
* Creates a schema-backed class whose constructor validates input against a
|
|
6184
6490
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
@@ -6223,7 +6529,7 @@ export declare const Class: {
|
|
|
6223
6529
|
* @category Constructors
|
|
6224
6530
|
* @since 4.0.0
|
|
6225
6531
|
*/
|
|
6226
|
-
<const Fields extends Struct.Fields>(fields: Fields, annotations?: Annotations.Declaration<Self, readonly [Struct<Fields>]>):
|
|
6532
|
+
<const Fields extends Struct.Fields>(fields: Fields, annotations?: Annotations.Declaration<Self, readonly [Struct<Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.Class"> : Class<Self, Struct<Fields>, Brand>;
|
|
6227
6533
|
/**
|
|
6228
6534
|
* Creates a schema-backed class whose constructor validates input against a
|
|
6229
6535
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
@@ -6268,7 +6574,7 @@ export declare const Class: {
|
|
|
6268
6574
|
* @category Constructors
|
|
6269
6575
|
* @since 4.0.0
|
|
6270
6576
|
*/
|
|
6271
|
-
<S extends Struct<Struct.Fields>>(schema: S, annotations?: Annotations.Declaration<Self, readonly [S]>):
|
|
6577
|
+
<S extends Struct<Struct.Fields>>(schema: S, annotations?: Annotations.Declaration<Self, readonly [S]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.Class"> : Class<Self, S, Brand>;
|
|
6272
6578
|
};
|
|
6273
6579
|
};
|
|
6274
6580
|
/**
|
|
@@ -6322,7 +6628,7 @@ export declare const TaggedClass: {
|
|
|
6322
6628
|
* @category Constructors
|
|
6323
6629
|
* @since 4.0.0
|
|
6324
6630
|
*/
|
|
6325
|
-
<Self, Brand = {}>(identifier?: string): {
|
|
6631
|
+
<Self = never, Brand = {}>(identifier?: string): {
|
|
6326
6632
|
/**
|
|
6327
6633
|
* Like {@link Class} but automatically adds a `_tag` literal field set to the
|
|
6328
6634
|
* given `tag` value. This makes instances compatible with tagged union
|
|
@@ -6348,7 +6654,7 @@ export declare const TaggedClass: {
|
|
|
6348
6654
|
* @category Constructors
|
|
6349
6655
|
* @since 4.0.0
|
|
6350
6656
|
*/
|
|
6351
|
-
<Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>):
|
|
6657
|
+
<Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedClass"> : Class<Self, TaggedStruct<Tag, Fields>, Brand>;
|
|
6352
6658
|
/**
|
|
6353
6659
|
* Like {@link Class} but automatically adds a `_tag` literal field set to the
|
|
6354
6660
|
* given `tag` value. This makes instances compatible with tagged union
|
|
@@ -6376,21 +6682,21 @@ export declare const TaggedClass: {
|
|
|
6376
6682
|
*/
|
|
6377
6683
|
<Tag extends string, S extends Struct<Struct.Fields>>(tag: Tag, schema: S, annotations?: Annotations.Declaration<Self, readonly [Struct<Simplify<{
|
|
6378
6684
|
readonly _tag: tag<Tag>;
|
|
6379
|
-
} & S["fields"]>>]>):
|
|
6685
|
+
} & S["fields"]>>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedClass"> : Class<Self, Struct<Simplify<{
|
|
6380
6686
|
readonly _tag: tag<Tag>;
|
|
6381
6687
|
} & S["fields"]>>, Brand>;
|
|
6382
6688
|
};
|
|
6383
6689
|
};
|
|
6384
6690
|
/**
|
|
6385
6691
|
* Interface for schema-backed error classes created with {@link ErrorClass}.
|
|
6386
|
-
* Extends {@link
|
|
6692
|
+
* Extends {@link Class} and is also a `YieldableError`, so instances
|
|
6387
6693
|
* can be yielded inside `Effect.gen` as failures.
|
|
6388
6694
|
*
|
|
6389
6695
|
* @since 4.0.0
|
|
6390
6696
|
*/
|
|
6391
6697
|
export interface ErrorClass<Self, S extends Top & {
|
|
6392
6698
|
readonly fields: Struct.Fields;
|
|
6393
|
-
}, Inherited> extends
|
|
6699
|
+
}, Inherited> extends Class<Self, S, Inherited> {
|
|
6394
6700
|
}
|
|
6395
6701
|
/**
|
|
6396
6702
|
* Creates a schema-backed error class that can be used as a typed,
|
|
@@ -6439,7 +6745,7 @@ export declare const ErrorClass: {
|
|
|
6439
6745
|
* @category Constructors
|
|
6440
6746
|
* @since 4.0.0
|
|
6441
6747
|
*/
|
|
6442
|
-
<Self, Brand = {}>(identifier: string): {
|
|
6748
|
+
<Self = never, Brand = {}>(identifier: string): {
|
|
6443
6749
|
/**
|
|
6444
6750
|
* Creates a schema-backed error class that can be used as a typed,
|
|
6445
6751
|
* yieldable error in Effect programs. Combines {@link Class} validation with
|
|
@@ -6463,7 +6769,7 @@ export declare const ErrorClass: {
|
|
|
6463
6769
|
* @category Constructors
|
|
6464
6770
|
* @since 4.0.0
|
|
6465
6771
|
*/
|
|
6466
|
-
<const Fields extends Struct.Fields>(fields: Fields, annotations?: Annotations.Declaration<Self, readonly [Struct<Fields>]>): ErrorClass<Self, Struct<Fields>, Cause_.YieldableError & Brand>;
|
|
6772
|
+
<const Fields extends Struct.Fields>(fields: Fields, annotations?: Annotations.Declaration<Self, readonly [Struct<Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.ErrorClass"> : Class<Self, Struct<Fields>, Cause_.YieldableError & Brand>;
|
|
6467
6773
|
/**
|
|
6468
6774
|
* Creates a schema-backed error class that can be used as a typed,
|
|
6469
6775
|
* yieldable error in Effect programs. Combines {@link Class} validation with
|
|
@@ -6487,7 +6793,7 @@ export declare const ErrorClass: {
|
|
|
6487
6793
|
* @category Constructors
|
|
6488
6794
|
* @since 4.0.0
|
|
6489
6795
|
*/
|
|
6490
|
-
<S extends Struct<Struct.Fields>>(schema: S, annotations?: Annotations.Declaration<Self, readonly [S]>): ErrorClass<Self, S, Cause_.YieldableError & Brand>;
|
|
6796
|
+
<S extends Struct<Struct.Fields>>(schema: S, annotations?: Annotations.Declaration<Self, readonly [S]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.ErrorClass"> : Class<Self, S, Cause_.YieldableError & Brand>;
|
|
6491
6797
|
};
|
|
6492
6798
|
};
|
|
6493
6799
|
/**
|
|
@@ -6535,7 +6841,7 @@ export declare const TaggedErrorClass: {
|
|
|
6535
6841
|
* @category Constructors
|
|
6536
6842
|
* @since 4.0.0
|
|
6537
6843
|
*/
|
|
6538
|
-
<Self, Brand = {}>(identifier?: string): {
|
|
6844
|
+
<Self = never, Brand = {}>(identifier?: string): {
|
|
6539
6845
|
/**
|
|
6540
6846
|
* Like {@link ErrorClass} but automatically adds a `_tag` literal field. The
|
|
6541
6847
|
* resulting class is both a schema-validated, yieldable error and a tagged
|
|
@@ -6558,7 +6864,7 @@ export declare const TaggedErrorClass: {
|
|
|
6558
6864
|
* @category Constructors
|
|
6559
6865
|
* @since 4.0.0
|
|
6560
6866
|
*/
|
|
6561
|
-
<Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>):
|
|
6867
|
+
<Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedErrorClass"> : Class<Self, TaggedStruct<Tag, Fields>, Cause_.YieldableError & Brand>;
|
|
6562
6868
|
/**
|
|
6563
6869
|
* Like {@link ErrorClass} but automatically adds a `_tag` literal field. The
|
|
6564
6870
|
* resulting class is both a schema-validated, yieldable error and a tagged
|
|
@@ -6583,7 +6889,7 @@ export declare const TaggedErrorClass: {
|
|
|
6583
6889
|
*/
|
|
6584
6890
|
<Tag extends string, S extends Struct<Struct.Fields>>(tag: Tag, schema: S, annotations?: Annotations.Declaration<Self, readonly [Struct<Simplify<{
|
|
6585
6891
|
readonly _tag: tag<Tag>;
|
|
6586
|
-
} & S["fields"]>>]>):
|
|
6892
|
+
} & S["fields"]>>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedErrorClass"> : Class<Self, Struct<Simplify<{
|
|
6587
6893
|
readonly _tag: tag<Tag>;
|
|
6588
6894
|
} & S["fields"]>>, Cause_.YieldableError & Brand>;
|
|
6589
6895
|
};
|
|
@@ -6820,7 +7126,6 @@ export declare function toIsoFocus<S extends Top>(_: S): Optic_.Iso<S["Iso"], S[
|
|
|
6820
7126
|
* @since 4.0.0
|
|
6821
7127
|
*/
|
|
6822
7128
|
export interface overrideToCodecIso<S extends Top, Iso> extends Bottom<S["Type"], S["Encoded"], S["DecodingServices"], S["EncodingServices"], S["ast"], overrideToCodecIso<S, Iso>, S["~type.make.in"], Iso, S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
6823
|
-
readonly "~rebuild.out": this;
|
|
6824
7129
|
readonly schema: S;
|
|
6825
7130
|
}
|
|
6826
7131
|
/**
|
|
@@ -6944,18 +7249,30 @@ export interface MutableJsonObject {
|
|
|
6944
7249
|
*/
|
|
6945
7250
|
export declare const MutableJson: Codec<MutableJson>;
|
|
6946
7251
|
/**
|
|
6947
|
-
*
|
|
7252
|
+
* Resolves the typed annotations from a schema. The term "resolve" (rather
|
|
7253
|
+
* than "get") reflects the lookup strategy: if the schema has checks, the
|
|
7254
|
+
* annotations are taken from the last check; otherwise they are taken from
|
|
7255
|
+
* the base schema instance.
|
|
7256
|
+
*
|
|
7257
|
+
* @category Schema Resolvers
|
|
7258
|
+
* @since 4.0.0
|
|
7259
|
+
*/
|
|
7260
|
+
export declare function resolveAnnotations<S extends Top>(schema: S): Annotations.Bottom<S["Type"], S["~type.parameters"]> | undefined;
|
|
7261
|
+
/**
|
|
7262
|
+
* Resolves the context (key-level) annotations from a schema. Context
|
|
7263
|
+
* annotations are those attached via `annotateKey` and live on the AST's
|
|
7264
|
+
* `context` rather than on the schema node itself.
|
|
6948
7265
|
*
|
|
6949
7266
|
* @category Schema Resolvers
|
|
6950
7267
|
* @since 4.0.0
|
|
6951
7268
|
*/
|
|
6952
|
-
export declare function
|
|
7269
|
+
export declare function resolveAnnotationsKey<S extends Top>(schema: S): Annotations.Key<S["Type"]> | undefined;
|
|
6953
7270
|
/**
|
|
6954
7271
|
* The `Annotations` namespace groups all annotation interfaces used to attach
|
|
6955
7272
|
* metadata to schemas. Annotations control documentation, validation messages,
|
|
6956
7273
|
* JSON Schema generation, equivalence, arbitrary generation, and more.
|
|
6957
7274
|
*
|
|
6958
|
-
* Use {@link
|
|
7275
|
+
* Use {@link resolveAnnotations} to read the annotations attached to a schema at
|
|
6959
7276
|
* runtime.
|
|
6960
7277
|
*
|
|
6961
7278
|
* @since 4.0.0
|
|
@@ -6990,7 +7307,7 @@ export declare namespace Annotations {
|
|
|
6990
7307
|
* const schema = Schema.String.annotate({ version: [1, 2, 0] })
|
|
6991
7308
|
*
|
|
6992
7309
|
* // const version: readonly [major: number, minor: number, patch: number] | undefined
|
|
6993
|
-
* const version = Schema.
|
|
7310
|
+
* const version = Schema.resolveAnnotations(schema)?.["version"]
|
|
6994
7311
|
*
|
|
6995
7312
|
* if (version) {
|
|
6996
7313
|
* // Access individual parts of the version
|