effect 4.0.0-beta.71 → 4.0.0-beta.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Array.d.ts +65 -111
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +28 -44
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +66 -58
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +30 -26
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +21 -19
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +17 -15
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +15 -17
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +13 -13
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +2 -3
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +2 -3
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +9 -9
- package/dist/Cache.js +3 -3
- package/dist/Cause.d.ts +35 -39
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +31 -33
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +141 -99
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +56 -42
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +3 -3
- package/dist/ChannelSchema.js +1 -1
- package/dist/Chunk.d.ts +67 -54
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +33 -22
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +3 -3
- package/dist/Clock.js +1 -1
- package/dist/Combiner.d.ts +6 -10
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +6 -10
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +9 -10
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +7 -8
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +4 -4
- package/dist/ConfigProvider.js +4 -4
- package/dist/Console.d.ts +11 -7
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +11 -7
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +35 -35
- package/dist/Context.js +13 -13
- package/dist/Cron.d.ts +7 -6
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +7 -6
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +1 -1
- package/dist/Crypto.js +1 -1
- package/dist/Data.d.ts +26 -32
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +9 -8
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +164 -122
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +86 -66
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +6 -6
- package/dist/Deferred.js +4 -4
- package/dist/Duration.d.ts +39 -39
- package/dist/Duration.js +21 -21
- package/dist/Effect.d.ts +220 -309
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +115 -140
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +2 -2
- package/dist/Effectable.js +2 -2
- package/dist/Encoding.d.ts +13 -10
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +12 -9
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +3 -4
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +2 -3
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +5 -19
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +5 -14
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +14 -13
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +10 -9
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +7 -2
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +7 -2
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +25 -23
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +13 -13
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +4 -4
- package/dist/Fiber.js +2 -2
- package/dist/FiberHandle.d.ts +6 -6
- package/dist/FiberHandle.js +4 -4
- package/dist/FiberMap.d.ts +18 -18
- package/dist/FiberMap.js +8 -8
- package/dist/FiberSet.d.ts +21 -13
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +17 -9
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +13 -9
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +11 -7
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +2 -2
- package/dist/Filter.js +2 -2
- package/dist/Formatter.d.ts +1 -3
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +1 -3
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +12 -12
- package/dist/Function.js +12 -12
- package/dist/Graph.d.ts +22 -22
- package/dist/Graph.js +12 -12
- package/dist/HKT.d.ts +5 -4
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +3 -3
- package/dist/Hash.js +3 -3
- package/dist/HashMap.d.ts +33 -35
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +11 -13
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +7 -9
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +3 -5
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +16 -16
- package/dist/HashSet.js +6 -6
- package/dist/Inspectable.d.ts +4 -4
- package/dist/Inspectable.js +4 -4
- package/dist/Iterable.d.ts +82 -56
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +28 -20
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +1 -1
- package/dist/JsonPatch.js +1 -1
- package/dist/JsonPointer.d.ts +3 -3
- package/dist/JsonPointer.js +3 -3
- package/dist/JsonSchema.d.ts +13 -23
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +13 -23
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +2 -2
- package/dist/Latch.js +2 -2
- package/dist/Layer.d.ts +47 -27
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +23 -15
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +1 -2
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +1 -2
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +3 -3
- package/dist/LogLevel.js +3 -3
- package/dist/Logger.d.ts +2 -2
- package/dist/Logger.js +2 -2
- package/dist/ManagedRuntime.d.ts +1 -1
- package/dist/ManagedRuntime.js +1 -1
- package/dist/Match.d.ts +32 -37
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +32 -37
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +35 -21
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +34 -20
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +13 -19
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +5 -7
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +4 -4
- package/dist/MutableHashSet.js +2 -2
- package/dist/MutableList.d.ts +16 -6
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +15 -5
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +5 -4
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +3 -2
- package/dist/MutableRef.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +3 -3
- package/dist/NonEmptyIterable.js +1 -1
- package/dist/Number.d.ts +20 -18
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +16 -14
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +11 -18
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +7 -14
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +21 -24
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +9 -10
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +11 -38
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +11 -33
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +5 -5
- package/dist/Ordering.js +3 -3
- package/dist/PartitionedSemaphore.d.ts +4 -8
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +3 -7
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +4 -7
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +3 -6
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +2 -2
- package/dist/Pipeable.js +2 -2
- package/dist/PlatformError.d.ts +1 -1
- package/dist/PlatformError.js +1 -1
- package/dist/Predicate.d.ts +2 -81
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +2 -47
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +3 -3
- package/dist/PrimaryKey.js +1 -1
- package/dist/PubSub.d.ts +147 -46
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +93 -32
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +1 -1
- package/dist/Pull.js +1 -1
- package/dist/Queue.d.ts +40 -24
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +36 -20
- package/dist/Queue.js.map +1 -1
- package/dist/RcMap.d.ts +3 -3
- package/dist/RcMap.js +1 -1
- package/dist/Record.d.ts +79 -52
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +33 -22
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +7 -7
- package/dist/Redactable.js +7 -7
- package/dist/Reducer.d.ts +0 -2
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +0 -2
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +12 -12
- package/dist/Ref.js +10 -10
- package/dist/References.d.ts +20 -20
- package/dist/References.js +20 -20
- package/dist/RegExp.d.ts +2 -2
- package/dist/RegExp.js +2 -2
- package/dist/Request.d.ts +3 -3
- package/dist/Request.js +3 -3
- package/dist/RequestResolver.d.ts +11 -14
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +5 -6
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Result.d.ts +52 -34
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +44 -20
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +1 -1
- package/dist/Runtime.js +1 -1
- package/dist/Schedule.d.ts +20 -24
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +12 -12
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +3 -3
- package/dist/Scheduler.js +3 -3
- package/dist/Schema.d.ts +480 -210
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +410 -172
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +40 -32
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +40 -32
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +4 -6
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +4 -6
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +35 -47
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +31 -42
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +16 -12
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +16 -12
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +47 -62
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +44 -58
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +16 -18
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +13 -15
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +51 -14
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +29 -8
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +12 -12
- package/dist/ScopedCache.js +4 -4
- package/dist/ScopedRef.d.ts +2 -2
- package/dist/ScopedRef.js +2 -2
- package/dist/Semaphore.d.ts +1 -1
- package/dist/Semaphore.js +1 -1
- package/dist/Sink.d.ts +36 -41
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +21 -24
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +5 -4
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +4 -3
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +264 -165
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +103 -62
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +48 -47
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +32 -29
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +35 -100
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +13 -38
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +268 -91
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +90 -31
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +1 -1
- package/dist/Symbol.js +1 -1
- package/dist/SynchronizedRef.d.ts +27 -27
- package/dist/SynchronizedRef.js +9 -9
- package/dist/Terminal.d.ts +8 -3
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +8 -3
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +25 -7
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +25 -7
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +21 -23
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +7 -7
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +26 -73
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +10 -31
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +2 -2
- package/dist/TxChunk.js +2 -2
- package/dist/TxHashMap.d.ts +20 -20
- package/dist/TxHashMap.js +8 -8
- package/dist/TxHashSet.d.ts +14 -14
- package/dist/TxHashSet.js +6 -6
- package/dist/TxPriorityQueue.d.ts +14 -6
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +12 -4
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +4 -4
- package/dist/TxPubSub.js +4 -4
- package/dist/TxQueue.d.ts +10 -10
- package/dist/TxQueue.js +10 -10
- package/dist/TxReentrantLock.d.ts +48 -12
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +38 -10
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +1 -1
- package/dist/TxRef.js +1 -1
- package/dist/TxSubscriptionRef.d.ts +1 -1
- package/dist/TxSubscriptionRef.js +1 -1
- package/dist/Types.d.ts +8 -7
- package/dist/Types.d.ts.map +1 -1
- package/dist/Unify.d.ts +19 -19
- package/dist/Utils.d.ts +1 -2
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +1 -2
- package/dist/Utils.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +3 -11
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +3 -11
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +10 -5
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +10 -5
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +20 -5
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +20 -5
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +5 -4
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +4 -3
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +7 -2
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +7 -2
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +10 -5
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +10 -5
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +291 -169
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +270 -147
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +49 -13
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +21 -9
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +1 -1
- package/dist/unstable/ai/Prompt.js +1 -1
- package/dist/unstable/ai/Response.d.ts +1 -1
- package/dist/unstable/ai/Response.js +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +7 -2
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +7 -2
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +3 -3
- package/dist/unstable/ai/Tool.js +3 -3
- package/dist/unstable/cli/CliError.d.ts +3 -3
- package/dist/unstable/cli/CliError.js +3 -3
- package/dist/unstable/cli/CliOutput.d.ts +1 -1
- package/dist/unstable/cli/Command.d.ts +3 -3
- package/dist/unstable/cli/Command.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +9 -9
- package/dist/unstable/cli/Flag.js +3 -3
- package/dist/unstable/cli/GlobalFlag.d.ts +13 -6
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +13 -6
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +2 -2
- package/dist/unstable/cli/Param.js +2 -2
- package/dist/unstable/cli/Primitive.d.ts +1 -1
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Prompt.d.ts +11 -6
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +26 -9
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +5 -5
- package/dist/unstable/cluster/ClusterMetrics.js +5 -5
- package/dist/unstable/cluster/ClusterSchema.d.ts +11 -2
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +11 -2
- 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 +49 -10
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +6 -1
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +6 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +15 -5
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +15 -5
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +5 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +4 -5
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +11 -11
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +11 -11
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +16 -8
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +16 -8
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +10 -10
- package/dist/unstable/cluster/Message.js +10 -10
- package/dist/unstable/cluster/MessageStorage.d.ts +7 -7
- package/dist/unstable/cluster/MessageStorage.js +6 -6
- package/dist/unstable/cluster/Reply.d.ts +18 -8
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +18 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/Runner.js +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +7 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +7 -1
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +4 -4
- package/dist/unstable/cluster/RunnerHealth.js +4 -4
- package/dist/unstable/cluster/RunnerServer.d.ts +4 -3
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +4 -3
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +2 -2
- package/dist/unstable/cluster/ShardId.js +2 -2
- package/dist/unstable/cluster/Sharding.d.ts +8 -3
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +8 -3
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +3 -3
- package/dist/unstable/cluster/ShardingConfig.js +3 -3
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +1 -2
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +1 -2
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +1 -1
- package/dist/unstable/cluster/SingleRunner.js +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +6 -5
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +6 -5
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +6 -1
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +6 -1
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +1 -1
- package/dist/unstable/cluster/TestRunner.js +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +2 -1
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +3 -3
- package/dist/unstable/encoding/Sse.js +3 -3
- package/dist/unstable/eventlog/EventGroup.d.ts +1 -1
- package/dist/unstable/eventlog/EventGroup.js +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +7 -7
- package/dist/unstable/eventlog/EventJournal.js +5 -5
- package/dist/unstable/eventlog/EventLog.d.ts +11 -10
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +9 -8
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +28 -28
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +27 -27
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +14 -4
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +14 -4
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +7 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +7 -2
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +7 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +7 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +37 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +37 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +33 -7
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +33 -7
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +40 -39
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +18 -17
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +6 -1
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +6 -1
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +8 -7
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +6 -5
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +6 -2
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +6 -2
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +29 -9
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +15 -5
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +15 -14
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +12 -11
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +1 -1
- package/dist/unstable/http/HttpClientRequest.js +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +3 -3
- package/dist/unstable/http/HttpEffect.js +3 -3
- package/dist/unstable/http/HttpMethod.d.ts +16 -5
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +16 -5
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +18 -13
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +14 -9
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +4 -4
- package/dist/unstable/http/HttpServer.js +4 -4
- package/dist/unstable/http/HttpServerError.d.ts +9 -9
- package/dist/unstable/http/HttpServerError.js +7 -7
- package/dist/unstable/http/HttpServerRequest.d.ts +20 -5
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +20 -5
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +24 -24
- package/dist/unstable/http/HttpServerResponse.js +8 -8
- package/dist/unstable/http/HttpTraceContext.d.ts +4 -4
- package/dist/unstable/http/HttpTraceContext.js +4 -4
- package/dist/unstable/http/Multipart.d.ts +2 -2
- package/dist/unstable/http/Multipart.js +2 -2
- package/dist/unstable/http/Url.d.ts +14 -17
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +5 -6
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +10 -10
- package/dist/unstable/http/UrlParams.js +6 -6
- package/dist/unstable/httpapi/HttpApi.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApi.js +2 -2
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApiBuilder.js +2 -2
- package/dist/unstable/httpapi/HttpApiError.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiError.js +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +4 -7
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +3 -6
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +7 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +7 -1
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +1 -1
- package/dist/unstable/observability/OtlpLogger.js +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +2 -2
- package/dist/unstable/observability/PrometheusMetrics.js +2 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts +8 -3
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +6 -1
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +8 -3
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +8 -3
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +10 -5
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +9 -4
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +20 -10
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +19 -9
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +14 -14
- package/dist/unstable/process/ChildProcess.js +7 -7
- package/dist/unstable/process/ChildProcessSpawner.d.ts +2 -2
- package/dist/unstable/process/ChildProcessSpawner.js +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts +36 -5
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +14 -3
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +45 -13
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +34 -10
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +7 -2
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +7 -2
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -1
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +6 -1
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +6 -1
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +6 -1
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +18 -14
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +15 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +27 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +27 -12
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
- package/dist/unstable/rpc/RpcClientError.js +2 -2
- package/dist/unstable/rpc/RpcMessage.d.ts +5 -5
- package/dist/unstable/rpc/RpcMessage.js +4 -4
- package/dist/unstable/rpc/RpcSchema.d.ts +1 -1
- package/dist/unstable/rpc/RpcSchema.js +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +19 -12
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +19 -12
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +22 -17
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +22 -17
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +32 -33
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +25 -26
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -1
- package/dist/unstable/schema/VariantSchema.js +1 -1
- package/dist/unstable/socket/Socket.d.ts +8 -2
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +8 -2
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +2 -2
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +7 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -2
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/SqlError.d.ts +2 -2
- package/dist/unstable/sql/SqlError.js +2 -2
- package/dist/unstable/sql/SqlResolver.d.ts +3 -3
- package/dist/unstable/sql/SqlResolver.js +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +19 -4
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +19 -4
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +3 -6
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +3 -6
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +1 -1
- package/dist/unstable/workers/Worker.js +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +2 -2
- package/dist/unstable/workflow/DurableClock.js +2 -2
- package/dist/unstable/workflow/DurableDeferred.d.ts +12 -12
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableQueue.d.ts +3 -3
- package/dist/unstable/workflow/DurableQueue.js +3 -3
- package/dist/unstable/workflow/Workflow.d.ts +22 -23
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +17 -18
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +26 -8
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +25 -7
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +65 -113
- package/src/BigDecimal.ts +66 -58
- package/src/BigInt.ts +21 -19
- package/src/Boolean.ts +15 -17
- package/src/Brand.ts +2 -3
- package/src/Cache.ts +9 -9
- package/src/Cause.ts +35 -39
- package/src/Channel.ts +149 -107
- package/src/ChannelSchema.ts +3 -3
- package/src/Chunk.ts +67 -54
- package/src/Clock.ts +3 -3
- package/src/Combiner.ts +6 -10
- package/src/Config.ts +9 -10
- package/src/ConfigProvider.ts +4 -4
- package/src/Console.ts +11 -7
- package/src/Context.ts +36 -36
- package/src/Cron.ts +7 -6
- package/src/Crypto.ts +1 -1
- package/src/Data.ts +26 -32
- package/src/DateTime.ts +164 -122
- package/src/Deferred.ts +6 -6
- package/src/Duration.ts +39 -39
- package/src/Effect.ts +220 -309
- package/src/Effectable.ts +2 -2
- package/src/Encoding.ts +13 -10
- package/src/Equal.ts +3 -4
- package/src/Equivalence.ts +5 -19
- package/src/ErrorReporter.ts +14 -13
- package/src/ExecutionPlan.ts +7 -2
- package/src/Exit.ts +25 -23
- package/src/Fiber.ts +4 -4
- package/src/FiberHandle.ts +6 -6
- package/src/FiberMap.ts +20 -20
- package/src/FiberSet.ts +21 -13
- package/src/FileSystem.ts +13 -9
- package/src/Filter.ts +2 -2
- package/src/Formatter.ts +1 -3
- package/src/Function.ts +12 -12
- package/src/Graph.ts +22 -22
- package/src/HKT.ts +5 -4
- package/src/Hash.ts +3 -3
- package/src/HashMap.ts +33 -35
- package/src/HashRing.ts +7 -9
- package/src/HashSet.ts +16 -16
- package/src/Inspectable.ts +4 -4
- package/src/Iterable.ts +82 -56
- package/src/JsonPatch.ts +1 -1
- package/src/JsonPointer.ts +3 -3
- package/src/JsonSchema.ts +13 -23
- package/src/Latch.ts +2 -2
- package/src/Layer.ts +47 -27
- package/src/LayerMap.ts +1 -2
- package/src/LogLevel.ts +3 -3
- package/src/Logger.ts +6 -6
- package/src/ManagedRuntime.ts +1 -1
- package/src/Match.ts +32 -37
- package/src/Metric.ts +35 -21
- package/src/MutableHashMap.ts +21 -31
- package/src/MutableHashSet.ts +4 -4
- package/src/MutableList.ts +16 -6
- package/src/MutableRef.ts +5 -4
- package/src/NonEmptyIterable.ts +3 -3
- package/src/Number.ts +20 -18
- package/src/Optic.ts +11 -18
- package/src/Option.ts +21 -24
- package/src/Order.ts +11 -38
- package/src/Ordering.ts +5 -5
- package/src/PartitionedSemaphore.ts +4 -8
- package/src/Path.ts +4 -7
- package/src/Pipeable.ts +2 -2
- package/src/PlatformError.ts +1 -1
- package/src/Predicate.ts +2 -81
- package/src/PrimaryKey.ts +3 -3
- package/src/PubSub.ts +147 -46
- package/src/Pull.ts +1 -1
- package/src/Queue.ts +40 -24
- package/src/RcMap.ts +3 -3
- package/src/Record.ts +79 -52
- package/src/Redactable.ts +7 -7
- package/src/Reducer.ts +0 -2
- package/src/Ref.ts +32 -32
- package/src/References.ts +20 -20
- package/src/RegExp.ts +2 -2
- package/src/Request.ts +3 -3
- package/src/RequestResolver.ts +11 -14
- package/src/Result.ts +52 -34
- package/src/Runtime.ts +1 -1
- package/src/Schedule.ts +28 -36
- package/src/Scheduler.ts +3 -3
- package/src/Schema.ts +480 -210
- package/src/SchemaAST.ts +40 -32
- package/src/SchemaGetter.ts +4 -6
- package/src/SchemaIssue.ts +35 -47
- package/src/SchemaParser.ts +16 -12
- package/src/SchemaRepresentation.ts +47 -62
- package/src/SchemaTransformation.ts +16 -18
- package/src/Scope.ts +51 -14
- package/src/ScopedCache.ts +14 -14
- package/src/ScopedRef.ts +2 -2
- package/src/Semaphore.ts +1 -1
- package/src/Sink.ts +36 -41
- package/src/Stdio.ts +5 -4
- package/src/Stream.ts +275 -176
- package/src/String.ts +50 -49
- package/src/Struct.ts +35 -100
- package/src/SubscriptionRef.ts +268 -91
- package/src/Symbol.ts +1 -1
- package/src/SynchronizedRef.ts +27 -27
- package/src/Terminal.ts +8 -3
- package/src/Tracer.ts +25 -7
- package/src/Trie.ts +21 -23
- package/src/Tuple.ts +26 -73
- package/src/TxChunk.ts +2 -2
- package/src/TxHashMap.ts +22 -22
- package/src/TxHashSet.ts +22 -22
- package/src/TxPriorityQueue.ts +14 -6
- package/src/TxPubSub.ts +4 -4
- package/src/TxQueue.ts +10 -10
- package/src/TxReentrantLock.ts +48 -12
- package/src/TxRef.ts +1 -1
- package/src/TxSubscriptionRef.ts +1 -1
- package/src/Types.ts +8 -7
- package/src/Unify.ts +19 -19
- package/src/Utils.ts +1 -2
- package/src/testing/TestSchema.ts +3 -11
- package/src/unstable/ai/AiError.ts +10 -5
- package/src/unstable/ai/Chat.ts +20 -5
- package/src/unstable/ai/EmbeddingModel.ts +5 -4
- package/src/unstable/ai/IdGenerator.ts +7 -2
- package/src/unstable/ai/LanguageModel.ts +10 -5
- package/src/unstable/ai/McpSchema.ts +291 -169
- package/src/unstable/ai/McpServer.ts +49 -13
- package/src/unstable/ai/Prompt.ts +1 -1
- package/src/unstable/ai/Response.ts +1 -1
- package/src/unstable/ai/Tokenizer.ts +7 -2
- package/src/unstable/ai/Tool.ts +3 -3
- package/src/unstable/cli/CliError.ts +3 -3
- package/src/unstable/cli/CliOutput.ts +1 -1
- package/src/unstable/cli/Command.ts +3 -3
- package/src/unstable/cli/Flag.ts +9 -9
- package/src/unstable/cli/GlobalFlag.ts +13 -6
- package/src/unstable/cli/Param.ts +2 -2
- package/src/unstable/cli/Primitive.ts +1 -1
- package/src/unstable/cli/Prompt.ts +37 -13
- package/src/unstable/cli/internal/parser.ts +1 -1
- package/src/unstable/cluster/ClusterMetrics.ts +5 -5
- package/src/unstable/cluster/ClusterSchema.ts +11 -2
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +63 -11
- package/src/unstable/cluster/DeliverAt.ts +6 -1
- package/src/unstable/cluster/Entity.ts +15 -5
- package/src/unstable/cluster/EntityResource.ts +5 -6
- package/src/unstable/cluster/Envelope.ts +11 -11
- package/src/unstable/cluster/HttpRunner.ts +16 -8
- package/src/unstable/cluster/Message.ts +10 -10
- package/src/unstable/cluster/MessageStorage.ts +7 -7
- package/src/unstable/cluster/Reply.ts +18 -8
- package/src/unstable/cluster/Runner.ts +1 -1
- package/src/unstable/cluster/RunnerAddress.ts +7 -1
- package/src/unstable/cluster/RunnerHealth.ts +4 -4
- package/src/unstable/cluster/RunnerServer.ts +4 -3
- package/src/unstable/cluster/Runners.ts +1 -1
- package/src/unstable/cluster/ShardId.ts +2 -2
- package/src/unstable/cluster/Sharding.ts +8 -3
- package/src/unstable/cluster/ShardingConfig.ts +3 -3
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +1 -2
- package/src/unstable/cluster/SingleRunner.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +6 -5
- package/src/unstable/cluster/SocketRunner.ts +6 -1
- package/src/unstable/cluster/TestRunner.ts +1 -1
- package/src/unstable/encoding/Msgpack.ts +2 -1
- package/src/unstable/encoding/Sse.ts +3 -3
- package/src/unstable/eventlog/EventGroup.ts +1 -1
- package/src/unstable/eventlog/EventJournal.ts +7 -7
- package/src/unstable/eventlog/EventLog.ts +11 -10
- package/src/unstable/eventlog/EventLogEncryption.ts +8 -3
- package/src/unstable/eventlog/EventLogMessage.ts +28 -28
- package/src/unstable/eventlog/EventLogRemote.ts +14 -4
- package/src/unstable/eventlog/EventLogServer.ts +7 -2
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +7 -2
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +37 -7
- package/src/unstable/eventlog/EventLogSessionAuth.ts +33 -7
- package/src/unstable/http/Cookies.ts +40 -39
- package/src/unstable/http/FetchHttpClient.ts +6 -1
- package/src/unstable/http/Headers.ts +10 -9
- package/src/unstable/http/HttpBody.ts +6 -2
- package/src/unstable/http/HttpClient.ts +29 -9
- package/src/unstable/http/HttpClientError.ts +15 -14
- package/src/unstable/http/HttpClientRequest.ts +1 -1
- package/src/unstable/http/HttpEffect.ts +3 -3
- package/src/unstable/http/HttpMethod.ts +16 -5
- package/src/unstable/http/HttpRouter.ts +18 -13
- package/src/unstable/http/HttpServer.ts +4 -4
- package/src/unstable/http/HttpServerError.ts +9 -9
- package/src/unstable/http/HttpServerRequest.ts +20 -5
- package/src/unstable/http/HttpServerResponse.ts +24 -24
- package/src/unstable/http/HttpTraceContext.ts +4 -4
- package/src/unstable/http/Multipart.ts +2 -2
- package/src/unstable/http/Url.ts +14 -17
- package/src/unstable/http/UrlParams.ts +10 -10
- package/src/unstable/httpapi/HttpApi.ts +2 -2
- package/src/unstable/httpapi/HttpApiBuilder.ts +3 -3
- package/src/unstable/httpapi/HttpApiError.ts +2 -2
- package/src/unstable/httpapi/HttpApiSchema.ts +4 -7
- package/src/unstable/httpapi/HttpApiTest.ts +1 -1
- package/src/unstable/httpapi/OpenApi.ts +7 -1
- package/src/unstable/observability/OtlpLogger.ts +1 -1
- package/src/unstable/observability/PrometheusMetrics.ts +2 -2
- package/src/unstable/persistence/KeyValueStore.ts +8 -3
- package/src/unstable/persistence/Persistable.ts +8 -3
- package/src/unstable/persistence/PersistedQueue.ts +10 -5
- package/src/unstable/persistence/RateLimiter.ts +20 -10
- package/src/unstable/process/ChildProcess.ts +14 -14
- package/src/unstable/process/ChildProcessSpawner.ts +2 -2
- package/src/unstable/reactivity/AsyncResult.ts +58 -7
- package/src/unstable/reactivity/Atom.ts +53 -13
- package/src/unstable/reactivity/AtomRegistry.ts +7 -2
- package/src/unstable/reactivity/Hydration.ts +6 -1
- package/src/unstable/reactivity/Reactivity.ts +6 -1
- package/src/unstable/rpc/Rpc.ts +18 -14
- package/src/unstable/rpc/RpcClient.ts +27 -12
- package/src/unstable/rpc/RpcClientError.ts +2 -2
- package/src/unstable/rpc/RpcMessage.ts +5 -5
- package/src/unstable/rpc/RpcSchema.ts +1 -1
- package/src/unstable/rpc/RpcSerialization.ts +19 -12
- package/src/unstable/rpc/RpcServer.ts +22 -17
- package/src/unstable/schema/Model.ts +32 -33
- package/src/unstable/schema/VariantSchema.ts +1 -1
- package/src/unstable/socket/Socket.ts +8 -2
- package/src/unstable/socket/SocketServer.ts +2 -2
- package/src/unstable/sql/SqlClient.ts +7 -2
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/SqlError.ts +2 -2
- package/src/unstable/sql/SqlResolver.ts +3 -3
- package/src/unstable/sql/SqlSchema.ts +19 -4
- package/src/unstable/workers/Transferable.ts +3 -6
- package/src/unstable/workers/Worker.ts +1 -1
- package/src/unstable/workers/WorkerError.ts +1 -1
- package/src/unstable/workflow/DurableClock.ts +2 -2
- package/src/unstable/workflow/DurableDeferred.ts +12 -12
- package/src/unstable/workflow/DurableQueue.ts +3 -3
- package/src/unstable/workflow/Workflow.ts +22 -23
- package/src/unstable/workflow/WorkflowEngine.ts +26 -8
package/dist/Schema.d.ts
CHANGED
|
@@ -369,7 +369,7 @@ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [
|
|
|
369
369
|
*/
|
|
370
370
|
export declare function declare<T, Iso = T>(is: (u: unknown) => u is T, annotations?: Annotations.Declaration<T> | undefined): declare<T, Iso>;
|
|
371
371
|
/**
|
|
372
|
-
*
|
|
372
|
+
* Returns a schema widened to the fully-parameterized {@link Bottom} interface,
|
|
373
373
|
* making all 14 type parameters visible to TypeScript.
|
|
374
374
|
*
|
|
375
375
|
* **Details**
|
|
@@ -742,8 +742,8 @@ export interface Encoder<out E, out RE = never> extends Codec<unknown, E, unknow
|
|
|
742
742
|
readonly "Rebuild": Encoder<E, RE>;
|
|
743
743
|
}
|
|
744
744
|
/**
|
|
745
|
-
*
|
|
746
|
-
*
|
|
745
|
+
* Returns a codec widened to the full {@link Codec} interface, prompting
|
|
746
|
+
* TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`).
|
|
747
747
|
*
|
|
748
748
|
* **Details**
|
|
749
749
|
*
|
|
@@ -890,7 +890,7 @@ export declare function toStandardSchemaV1<S extends Decoder<unknown>>(self: S,
|
|
|
890
890
|
readonly parseOptions?: AST.ParseOptions | undefined;
|
|
891
891
|
}): StandardSchemaV1<S["Encoded"], S["Type"]> & S;
|
|
892
892
|
/**
|
|
893
|
-
*
|
|
893
|
+
* Converts a schema to an experimental Standard JSON Schema V1 representation.
|
|
894
894
|
*
|
|
895
895
|
* **Details**
|
|
896
896
|
*
|
|
@@ -936,11 +936,15 @@ export declare const is: typeof Parser.is;
|
|
|
936
936
|
* Creates an assertion function that throws an error if the input doesn't match
|
|
937
937
|
* the schema.
|
|
938
938
|
*
|
|
939
|
+
* **When to use**
|
|
940
|
+
*
|
|
941
|
+
* Use to validate unknown input at runtime while narrowing the value with a
|
|
942
|
+
* TypeScript `asserts` predicate.
|
|
943
|
+
*
|
|
939
944
|
* **Details**
|
|
940
945
|
*
|
|
941
|
-
*
|
|
942
|
-
*
|
|
943
|
-
* throws an error if it fails.
|
|
946
|
+
* The input is narrowed if the assertion succeeds. If validation fails, the
|
|
947
|
+
* assertion throws.
|
|
944
948
|
*
|
|
945
949
|
* **Example** (Basic Usage)
|
|
946
950
|
*
|
|
@@ -968,9 +972,16 @@ export declare const is: typeof Parser.is;
|
|
|
968
972
|
export declare const asserts: <S extends Top, I>(schema: S, input: I) => asserts input is I & S["Type"];
|
|
969
973
|
/**
|
|
970
974
|
* Decodes an `unknown` input against a schema, returning an `Effect` that
|
|
971
|
-
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
972
|
-
*
|
|
973
|
-
*
|
|
975
|
+
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
976
|
+
*
|
|
977
|
+
* **When to use**
|
|
978
|
+
*
|
|
979
|
+
* Use when decoding input whose type is not statically known.
|
|
980
|
+
*
|
|
981
|
+
* **Details**
|
|
982
|
+
*
|
|
983
|
+
* Prefer {@link decodeEffect} when the input is already typed as the schema's
|
|
984
|
+
* `Encoded` type.
|
|
974
985
|
* Options may be provided either when creating the decoder or when applying it;
|
|
975
986
|
* application options override creation options.
|
|
976
987
|
*
|
|
@@ -981,8 +992,15 @@ export declare function decodeUnknownEffect<S extends Top>(schema: S, options?:
|
|
|
981
992
|
/**
|
|
982
993
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
983
994
|
* returning an `Effect` that succeeds with the decoded value or fails with a
|
|
984
|
-
* {@link SchemaError}.
|
|
985
|
-
*
|
|
995
|
+
* {@link SchemaError}.
|
|
996
|
+
*
|
|
997
|
+
* **When to use**
|
|
998
|
+
*
|
|
999
|
+
* Use when the input is already typed as the schema's `Encoded` type.
|
|
1000
|
+
*
|
|
1001
|
+
* **Details**
|
|
1002
|
+
*
|
|
1003
|
+
* For `unknown` input use {@link decodeUnknownEffect}.
|
|
986
1004
|
* Options may be provided either when creating the decoder or when applying it;
|
|
987
1005
|
* application options override creation options.
|
|
988
1006
|
*
|
|
@@ -993,9 +1011,18 @@ export declare const decodeEffect: <S extends Top>(schema: S, options?: AST.Pars
|
|
|
993
1011
|
/**
|
|
994
1012
|
* Decodes an `unknown` input against a schema synchronously, returning an
|
|
995
1013
|
* `Exit` that is either a `Success` with the decoded value or a `Failure` with
|
|
996
|
-
* a {@link SchemaError}.
|
|
997
|
-
*
|
|
998
|
-
*
|
|
1014
|
+
* a {@link SchemaError}.
|
|
1015
|
+
*
|
|
1016
|
+
* **When to use**
|
|
1017
|
+
*
|
|
1018
|
+
* Use when the input type is not statically known and decoding should return an
|
|
1019
|
+
* `Exit` instead of failing or throwing.
|
|
1020
|
+
*
|
|
1021
|
+
* **Details**
|
|
1022
|
+
*
|
|
1023
|
+
* Only usable with schemas that have no `DecodingServices` requirement. Prefer
|
|
1024
|
+
* {@link decodeExit} when the input is already typed as the schema's `Encoded`
|
|
1025
|
+
* type.
|
|
999
1026
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1000
1027
|
* application options override creation options.
|
|
1001
1028
|
*
|
|
@@ -1006,9 +1033,17 @@ export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S,
|
|
|
1006
1033
|
/**
|
|
1007
1034
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
1008
1035
|
* synchronously, returning an `Exit` that is either a `Success` with the
|
|
1009
|
-
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
1036
|
+
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
1037
|
+
*
|
|
1038
|
+
* **When to use**
|
|
1039
|
+
*
|
|
1040
|
+
* Use when typed input should be decoded into an `Exit` instead of failing or
|
|
1041
|
+
* throwing.
|
|
1042
|
+
*
|
|
1043
|
+
* **Details**
|
|
1044
|
+
*
|
|
1045
|
+
* Only usable with schemas that have no `DecodingServices` requirement. For
|
|
1046
|
+
* `unknown` input use {@link decodeUnknownExit}.
|
|
1012
1047
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1013
1048
|
* application options override creation options.
|
|
1014
1049
|
*
|
|
@@ -1018,10 +1053,17 @@ export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S,
|
|
|
1018
1053
|
export declare const decodeExit: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
|
|
1019
1054
|
/**
|
|
1020
1055
|
* Decodes an `unknown` input against a schema, returning an `Option` that is
|
|
1021
|
-
* `Some` with the decoded value on success or `None` on failure.
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1056
|
+
* `Some` with the decoded value on success or `None` on failure.
|
|
1057
|
+
*
|
|
1058
|
+
* **When to use**
|
|
1059
|
+
*
|
|
1060
|
+
* Use when the input type is not statically known and you only need to know
|
|
1061
|
+
* whether decoding succeeded.
|
|
1062
|
+
*
|
|
1063
|
+
* **Details**
|
|
1064
|
+
*
|
|
1065
|
+
* Prefer this over {@link decodeUnknownExit} or {@link decodeUnknownEffect}
|
|
1066
|
+
* when you don't need error details. For typed input use {@link decodeOption}.
|
|
1025
1067
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1026
1068
|
* application options override creation options.
|
|
1027
1069
|
*
|
|
@@ -1032,7 +1074,15 @@ export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
|
|
|
1032
1074
|
/**
|
|
1033
1075
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1034
1076
|
* returning an `Option` that is `Some` with the decoded value on success or
|
|
1035
|
-
* `None` on failure.
|
|
1077
|
+
* `None` on failure.
|
|
1078
|
+
*
|
|
1079
|
+
* **When to use**
|
|
1080
|
+
*
|
|
1081
|
+
* Use when typed input should be decoded and only success or failure matters.
|
|
1082
|
+
*
|
|
1083
|
+
* **Details**
|
|
1084
|
+
*
|
|
1085
|
+
* For `unknown` input use {@link decodeUnknownOption}.
|
|
1036
1086
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1037
1087
|
* application options override creation options.
|
|
1038
1088
|
*
|
|
@@ -1042,8 +1092,16 @@ export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
|
|
|
1042
1092
|
export declare const decodeOption: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Option_.Option<S["Type"]>;
|
|
1043
1093
|
/**
|
|
1044
1094
|
* Decodes an `unknown` input against a schema, returning a `Result` that
|
|
1045
|
-
* succeeds with the decoded value or fails with a schema issue.
|
|
1046
|
-
*
|
|
1095
|
+
* succeeds with the decoded value or fails with a schema issue.
|
|
1096
|
+
*
|
|
1097
|
+
* **When to use**
|
|
1098
|
+
*
|
|
1099
|
+
* Use when the input type is not statically known and decoding should return a
|
|
1100
|
+
* `Result` with structured issue data.
|
|
1101
|
+
*
|
|
1102
|
+
* **Details**
|
|
1103
|
+
*
|
|
1104
|
+
* For typed input use {@link decodeResult}.
|
|
1047
1105
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1048
1106
|
* application options override creation options.
|
|
1049
1107
|
*
|
|
@@ -1054,7 +1112,16 @@ export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult;
|
|
|
1054
1112
|
/**
|
|
1055
1113
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1056
1114
|
* returning a `Result` that succeeds with the decoded value or fails with a
|
|
1057
|
-
* schema issue.
|
|
1115
|
+
* schema issue.
|
|
1116
|
+
*
|
|
1117
|
+
* **When to use**
|
|
1118
|
+
*
|
|
1119
|
+
* Use when typed input should be decoded into a `Result` with structured issue
|
|
1120
|
+
* data.
|
|
1121
|
+
*
|
|
1122
|
+
* **Details**
|
|
1123
|
+
*
|
|
1124
|
+
* For `unknown` input use {@link decodeUnknownResult}.
|
|
1058
1125
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1059
1126
|
* application options override creation options.
|
|
1060
1127
|
*
|
|
@@ -1064,9 +1131,15 @@ export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult;
|
|
|
1064
1131
|
export declare const decodeResult: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Result_.Result<S["Type"], Issue.Issue>;
|
|
1065
1132
|
/**
|
|
1066
1133
|
* Decodes an `unknown` input against a schema, returning a `Promise` that
|
|
1067
|
-
* resolves with the decoded value or rejects with a schema issue.
|
|
1068
|
-
*
|
|
1069
|
-
*
|
|
1134
|
+
* resolves with the decoded value or rejects with a schema issue.
|
|
1135
|
+
*
|
|
1136
|
+
* **When to use**
|
|
1137
|
+
*
|
|
1138
|
+
* Use when integrating unknown input validation with Promise-based APIs.
|
|
1139
|
+
*
|
|
1140
|
+
* **Details**
|
|
1141
|
+
*
|
|
1142
|
+
* For typed input use {@link decodePromise}.
|
|
1070
1143
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1071
1144
|
* application options override creation options.
|
|
1072
1145
|
*
|
|
@@ -1077,10 +1150,15 @@ export declare const decodeUnknownPromise: typeof Parser.decodeUnknownPromise;
|
|
|
1077
1150
|
/**
|
|
1078
1151
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1079
1152
|
* returning a `Promise` that resolves with the decoded value or rejects with a
|
|
1080
|
-
* schema issue.
|
|
1153
|
+
* schema issue.
|
|
1154
|
+
*
|
|
1155
|
+
* **When to use**
|
|
1156
|
+
*
|
|
1157
|
+
* Use when integrating typed input decoding with Promise-based APIs.
|
|
1081
1158
|
*
|
|
1082
1159
|
* **Details**
|
|
1083
1160
|
*
|
|
1161
|
+
* For `unknown` input use `decodeUnknownPromise`.
|
|
1084
1162
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1085
1163
|
* application options override creation options.
|
|
1086
1164
|
*
|
|
@@ -1091,11 +1169,15 @@ export declare const decodePromise: typeof Parser.decodePromise;
|
|
|
1091
1169
|
/**
|
|
1092
1170
|
* Decodes an `unknown` input against a schema synchronously, returning the
|
|
1093
1171
|
* decoded value or throwing an `Error` whose cause contains the schema issue.
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1172
|
+
*
|
|
1173
|
+
* **When to use**
|
|
1174
|
+
*
|
|
1175
|
+
* Use when validating unknown data at a boundary and treating schema mismatches
|
|
1176
|
+
* as exceptions.
|
|
1096
1177
|
*
|
|
1097
1178
|
* **Details**
|
|
1098
1179
|
*
|
|
1180
|
+
* For typed input use `decodeSync`.
|
|
1099
1181
|
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
1100
1182
|
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
1101
1183
|
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
@@ -1125,10 +1207,16 @@ export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
|
|
|
1125
1207
|
/**
|
|
1126
1208
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
1127
1209
|
* synchronously, returning the decoded value or throwing an `Error` whose cause
|
|
1128
|
-
* contains the schema issue.
|
|
1210
|
+
* contains the schema issue.
|
|
1211
|
+
*
|
|
1212
|
+
* **When to use**
|
|
1213
|
+
*
|
|
1214
|
+
* Use when typed input should be decoded synchronously and schema mismatches
|
|
1215
|
+
* should throw.
|
|
1129
1216
|
*
|
|
1130
1217
|
* **Details**
|
|
1131
1218
|
*
|
|
1219
|
+
* For `unknown` input use `decodeUnknownSync`.
|
|
1132
1220
|
* Only service-free schemas can be decoded synchronously. Options may be
|
|
1133
1221
|
* provided either when creating the decoder or when applying it; application
|
|
1134
1222
|
* options override creation options.
|
|
@@ -1139,9 +1227,16 @@ export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
|
|
|
1139
1227
|
export declare const decodeSync: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => S["Type"];
|
|
1140
1228
|
/**
|
|
1141
1229
|
* Encodes an `unknown` input against a schema, returning an `Effect` that
|
|
1142
|
-
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
1143
|
-
*
|
|
1144
|
-
*
|
|
1230
|
+
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
1231
|
+
*
|
|
1232
|
+
* **When to use**
|
|
1233
|
+
*
|
|
1234
|
+
* Use when encoding input whose type is not statically known.
|
|
1235
|
+
*
|
|
1236
|
+
* **Details**
|
|
1237
|
+
*
|
|
1238
|
+
* Prefer {@link encodeEffect} when the input is already typed as the schema's
|
|
1239
|
+
* `Type`.
|
|
1145
1240
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1146
1241
|
* application options override creation options.
|
|
1147
1242
|
*
|
|
@@ -1163,8 +1258,15 @@ export declare function encodeUnknownEffect<S extends Top>(schema: S, options?:
|
|
|
1163
1258
|
/**
|
|
1164
1259
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1165
1260
|
* `Effect` that succeeds with the encoded value or fails with a
|
|
1166
|
-
* {@link SchemaError}.
|
|
1167
|
-
*
|
|
1261
|
+
* {@link SchemaError}.
|
|
1262
|
+
*
|
|
1263
|
+
* **When to use**
|
|
1264
|
+
*
|
|
1265
|
+
* Use when the input is already typed as the schema's `Type`.
|
|
1266
|
+
*
|
|
1267
|
+
* **Details**
|
|
1268
|
+
*
|
|
1269
|
+
* For `unknown` input use {@link encodeUnknownEffect}.
|
|
1168
1270
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1169
1271
|
* application options override creation options.
|
|
1170
1272
|
*
|
|
@@ -1175,9 +1277,17 @@ export declare const encodeEffect: <S extends Top>(schema: S, options?: AST.Pars
|
|
|
1175
1277
|
/**
|
|
1176
1278
|
* Encodes an `unknown` input against a schema synchronously, returning an
|
|
1177
1279
|
* `Exit` that is either a `Success` with the encoded value or a `Failure` with
|
|
1178
|
-
* a {@link SchemaError}.
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
1280
|
+
* a {@link SchemaError}.
|
|
1281
|
+
*
|
|
1282
|
+
* **When to use**
|
|
1283
|
+
*
|
|
1284
|
+
* Use when the input type is not statically known and encoding should return an
|
|
1285
|
+
* `Exit` instead of failing or throwing.
|
|
1286
|
+
*
|
|
1287
|
+
* **Details**
|
|
1288
|
+
*
|
|
1289
|
+
* Only usable with schemas that have no `EncodingServices` requirement. Prefer
|
|
1290
|
+
* {@link encodeExit} when the input is already typed as the schema's `Type`.
|
|
1181
1291
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1182
1292
|
* application options override creation options.
|
|
1183
1293
|
*
|
|
@@ -1188,9 +1298,17 @@ export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S,
|
|
|
1188
1298
|
/**
|
|
1189
1299
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1190
1300
|
* returning an `Exit` that is either a `Success` with the encoded value or a
|
|
1191
|
-
* `Failure` with a {@link SchemaError}.
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1301
|
+
* `Failure` with a {@link SchemaError}.
|
|
1302
|
+
*
|
|
1303
|
+
* **When to use**
|
|
1304
|
+
*
|
|
1305
|
+
* Use when typed input should be encoded into an `Exit` instead of failing or
|
|
1306
|
+
* throwing.
|
|
1307
|
+
*
|
|
1308
|
+
* **Details**
|
|
1309
|
+
*
|
|
1310
|
+
* Only usable with schemas that have no `EncodingServices` requirement. For
|
|
1311
|
+
* `unknown` input use {@link encodeUnknownExit}.
|
|
1194
1312
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1195
1313
|
* application options override creation options.
|
|
1196
1314
|
*
|
|
@@ -1200,10 +1318,17 @@ export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S,
|
|
|
1200
1318
|
export declare const encodeExit: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
|
|
1201
1319
|
/**
|
|
1202
1320
|
* Encodes an `unknown` input against a schema, returning an `Option` that is
|
|
1203
|
-
* `Some` with the encoded value on success or `None` on failure.
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1321
|
+
* `Some` with the encoded value on success or `None` on failure.
|
|
1322
|
+
*
|
|
1323
|
+
* **When to use**
|
|
1324
|
+
*
|
|
1325
|
+
* Use when the input type is not statically known and you only need to know
|
|
1326
|
+
* whether encoding succeeded.
|
|
1327
|
+
*
|
|
1328
|
+
* **Details**
|
|
1329
|
+
*
|
|
1330
|
+
* Prefer this over {@link encodeUnknownExit} or {@link encodeUnknownEffect}
|
|
1331
|
+
* when you don't need error details. For typed input use {@link encodeOption}.
|
|
1207
1332
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1208
1333
|
* application options override creation options.
|
|
1209
1334
|
*
|
|
@@ -1214,7 +1339,15 @@ export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
|
|
|
1214
1339
|
/**
|
|
1215
1340
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1216
1341
|
* `Option` that is `Some` with the encoded value on success or `None` on
|
|
1217
|
-
* failure.
|
|
1342
|
+
* failure.
|
|
1343
|
+
*
|
|
1344
|
+
* **When to use**
|
|
1345
|
+
*
|
|
1346
|
+
* Use when typed input should be encoded and only success or failure matters.
|
|
1347
|
+
*
|
|
1348
|
+
* **Details**
|
|
1349
|
+
*
|
|
1350
|
+
* For `unknown` input use {@link encodeUnknownOption}.
|
|
1218
1351
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1219
1352
|
* application options override creation options.
|
|
1220
1353
|
*
|
|
@@ -1224,8 +1357,16 @@ export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
|
|
|
1224
1357
|
export declare const encodeOption: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Option_.Option<S["Encoded"]>;
|
|
1225
1358
|
/**
|
|
1226
1359
|
* Encodes an `unknown` input against a schema, returning a `Result` that
|
|
1227
|
-
* succeeds with the encoded value or fails with a schema issue.
|
|
1228
|
-
*
|
|
1360
|
+
* succeeds with the encoded value or fails with a schema issue.
|
|
1361
|
+
*
|
|
1362
|
+
* **When to use**
|
|
1363
|
+
*
|
|
1364
|
+
* Use when the input type is not statically known and encoding should return a
|
|
1365
|
+
* `Result` with structured issue data.
|
|
1366
|
+
*
|
|
1367
|
+
* **Details**
|
|
1368
|
+
*
|
|
1369
|
+
* For typed input use {@link encodeResult}.
|
|
1229
1370
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1230
1371
|
* application options override creation options.
|
|
1231
1372
|
*
|
|
@@ -1236,6 +1377,14 @@ export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult;
|
|
|
1236
1377
|
/**
|
|
1237
1378
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1238
1379
|
* `Result` that succeeds with the encoded value or fails with a schema issue.
|
|
1380
|
+
*
|
|
1381
|
+
* **When to use**
|
|
1382
|
+
*
|
|
1383
|
+
* Use when typed input should be encoded into a `Result` with structured issue
|
|
1384
|
+
* data.
|
|
1385
|
+
*
|
|
1386
|
+
* **Details**
|
|
1387
|
+
*
|
|
1239
1388
|
* For `unknown` input use {@link encodeUnknownResult}.
|
|
1240
1389
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1241
1390
|
* application options override creation options.
|
|
@@ -1246,9 +1395,15 @@ export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult;
|
|
|
1246
1395
|
export declare const encodeResult: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Result_.Result<S["Encoded"], Issue.Issue>;
|
|
1247
1396
|
/**
|
|
1248
1397
|
* Encodes an `unknown` input against a schema, returning a `Promise` that
|
|
1249
|
-
* resolves with the encoded value or rejects with a schema issue.
|
|
1250
|
-
*
|
|
1251
|
-
*
|
|
1398
|
+
* resolves with the encoded value or rejects with a schema issue.
|
|
1399
|
+
*
|
|
1400
|
+
* **When to use**
|
|
1401
|
+
*
|
|
1402
|
+
* Use when integrating unknown input serialization with Promise-based APIs.
|
|
1403
|
+
*
|
|
1404
|
+
* **Details**
|
|
1405
|
+
*
|
|
1406
|
+
* For typed input use {@link encodePromise}.
|
|
1252
1407
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1253
1408
|
* application options override creation options.
|
|
1254
1409
|
*
|
|
@@ -1259,7 +1414,15 @@ export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema:
|
|
|
1259
1414
|
/**
|
|
1260
1415
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1261
1416
|
* `Promise` that resolves with the encoded value or rejects with a
|
|
1262
|
-
* {@link SchemaError}.
|
|
1417
|
+
* {@link SchemaError}.
|
|
1418
|
+
*
|
|
1419
|
+
* **When to use**
|
|
1420
|
+
*
|
|
1421
|
+
* Use when integrating typed input serialization with Promise-based APIs.
|
|
1422
|
+
*
|
|
1423
|
+
* **Details**
|
|
1424
|
+
*
|
|
1425
|
+
* For `unknown` input use {@link encodeUnknownPromise}.
|
|
1263
1426
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1264
1427
|
* application options override creation options.
|
|
1265
1428
|
*
|
|
@@ -1269,9 +1432,16 @@ export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema:
|
|
|
1269
1432
|
export declare const encodePromise: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Promise<S["Encoded"]>;
|
|
1270
1433
|
/**
|
|
1271
1434
|
* Encodes an `unknown` input against a schema synchronously, throwing a
|
|
1272
|
-
* {@link SchemaError} on failure.
|
|
1273
|
-
*
|
|
1274
|
-
*
|
|
1435
|
+
* {@link SchemaError} on failure.
|
|
1436
|
+
*
|
|
1437
|
+
* **When to use**
|
|
1438
|
+
*
|
|
1439
|
+
* Use when serializing unknown data at a boundary and treating schema
|
|
1440
|
+
* mismatches as unrecoverable errors.
|
|
1441
|
+
*
|
|
1442
|
+
* **Details**
|
|
1443
|
+
*
|
|
1444
|
+
* For non-throwing alternatives see {@link encodeUnknownOption},
|
|
1275
1445
|
* {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For typed input
|
|
1276
1446
|
* use {@link encodeSync}.
|
|
1277
1447
|
* Options may be provided either when creating the encoder or when applying it;
|
|
@@ -1283,8 +1453,16 @@ export declare const encodePromise: <S extends Encoder<unknown>>(schema: S, opti
|
|
|
1283
1453
|
export declare const encodeUnknownSync: typeof Parser.encodeUnknownSync;
|
|
1284
1454
|
/**
|
|
1285
1455
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1286
|
-
* throwing a {@link SchemaError} on failure.
|
|
1287
|
-
*
|
|
1456
|
+
* throwing a {@link SchemaError} on failure.
|
|
1457
|
+
*
|
|
1458
|
+
* **When to use**
|
|
1459
|
+
*
|
|
1460
|
+
* Use when typed input should be encoded synchronously and schema mismatches
|
|
1461
|
+
* should throw.
|
|
1462
|
+
*
|
|
1463
|
+
* **Details**
|
|
1464
|
+
*
|
|
1465
|
+
* For `unknown` input use {@link encodeUnknownSync}.
|
|
1288
1466
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1289
1467
|
* application options override creation options.
|
|
1290
1468
|
*
|
|
@@ -1335,7 +1513,7 @@ export declare function asClass<S extends Top>(schema: S): S & {
|
|
|
1335
1513
|
new (_: never): {};
|
|
1336
1514
|
};
|
|
1337
1515
|
/**
|
|
1338
|
-
*
|
|
1516
|
+
* Checks whether a value is a `Schema`.
|
|
1339
1517
|
*
|
|
1340
1518
|
* @category guards
|
|
1341
1519
|
* @since 3.10.0
|
|
@@ -1384,8 +1562,12 @@ interface requiredKeyLambda extends Lambda {
|
|
|
1384
1562
|
readonly "~lambda.out": this["~lambda.in"] extends optionalKey<Top> ? this["~lambda.in"]["schema"] : "Error: schema not eligible for requiredKey";
|
|
1385
1563
|
}
|
|
1386
1564
|
/**
|
|
1387
|
-
* Reverses
|
|
1388
|
-
*
|
|
1565
|
+
* Reverses `optionalKey` and returns the inner required schema.
|
|
1566
|
+
*
|
|
1567
|
+
* **When to use**
|
|
1568
|
+
*
|
|
1569
|
+
* Use to remove optional-key wrapping from a schema field that was previously
|
|
1570
|
+
* wrapped with {@link optionalKey}.
|
|
1389
1571
|
*
|
|
1390
1572
|
* @category combinators
|
|
1391
1573
|
* @since 4.0.0
|
|
@@ -1440,8 +1622,16 @@ interface requiredLambda extends Lambda {
|
|
|
1440
1622
|
readonly "~lambda.out": this["~lambda.in"] extends optional<Top> ? this["~lambda.in"]["schema"]["members"][0] : "Error: schema not eligible for required";
|
|
1441
1623
|
}
|
|
1442
1624
|
/**
|
|
1443
|
-
* Reverses
|
|
1444
|
-
*
|
|
1625
|
+
* Reverses `optional` and returns the inner schema.
|
|
1626
|
+
*
|
|
1627
|
+
* **When to use**
|
|
1628
|
+
*
|
|
1629
|
+
* Use to remove optional wrapping from a schema field that was previously
|
|
1630
|
+
* wrapped with {@link optional}.
|
|
1631
|
+
*
|
|
1632
|
+
* **Details**
|
|
1633
|
+
*
|
|
1634
|
+
* This also unwraps the `UndefinedOr` member added by `optional`.
|
|
1445
1635
|
*
|
|
1446
1636
|
* @category combinators
|
|
1447
1637
|
* @since 3.10.0
|
|
@@ -1474,8 +1664,12 @@ interface readonlyKeyLambda extends Lambda {
|
|
|
1474
1664
|
readonly "~lambda.out": this["~lambda.in"] extends mutableKey<Top> ? this["~lambda.in"]["schema"] : "Error: schema not eligible for readonlyKey";
|
|
1475
1665
|
}
|
|
1476
1666
|
/**
|
|
1477
|
-
* Reverses
|
|
1478
|
-
*
|
|
1667
|
+
* Reverses `mutableKey` and returns the inner readonly schema.
|
|
1668
|
+
*
|
|
1669
|
+
* **When to use**
|
|
1670
|
+
*
|
|
1671
|
+
* Use to remove mutable-key wrapping from a schema field that was previously
|
|
1672
|
+
* wrapped with {@link mutableKey}.
|
|
1479
1673
|
*
|
|
1480
1674
|
* @category combinators
|
|
1481
1675
|
* @since 4.0.0
|
|
@@ -1536,8 +1730,15 @@ export interface flip<S extends Top> extends Bottom<S["Encoded"], S["Type"], S["
|
|
|
1536
1730
|
readonly schema: S;
|
|
1537
1731
|
}
|
|
1538
1732
|
/**
|
|
1539
|
-
* Swaps the
|
|
1540
|
-
*
|
|
1733
|
+
* Swaps the decoded and encoded sides of a schema.
|
|
1734
|
+
*
|
|
1735
|
+
* **When to use**
|
|
1736
|
+
*
|
|
1737
|
+
* Use to invert a schema transformation direction.
|
|
1738
|
+
*
|
|
1739
|
+
* **Details**
|
|
1740
|
+
*
|
|
1741
|
+
* Calling `flip` twice returns the original schema.
|
|
1541
1742
|
*
|
|
1542
1743
|
* **Example** (Flip a number-from-string schema)
|
|
1543
1744
|
*
|
|
@@ -1698,8 +1899,17 @@ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> exte
|
|
|
1698
1899
|
readonly parts: Parts;
|
|
1699
1900
|
}
|
|
1700
1901
|
/**
|
|
1701
|
-
*
|
|
1702
|
-
*
|
|
1902
|
+
* Schema for parsing template literal matches into typed tuple parts.
|
|
1903
|
+
*
|
|
1904
|
+
* **When to use**
|
|
1905
|
+
*
|
|
1906
|
+
* Use to validate a template literal string and decode the matched parts into
|
|
1907
|
+
* typed values.
|
|
1908
|
+
*
|
|
1909
|
+
* **Details**
|
|
1910
|
+
*
|
|
1911
|
+
* Unlike {@link TemplateLiteral}, this schema decodes the matched string into a
|
|
1912
|
+
* readonly tuple with one element per schema part.
|
|
1703
1913
|
*
|
|
1704
1914
|
* **Example** (Parse path parameters)
|
|
1705
1915
|
*
|
|
@@ -2245,8 +2455,16 @@ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
|
|
|
2245
2455
|
readonly "~lambda.out": this["~lambda.in"] extends Struct<Struct.Fields> ? Struct<Struct_.Simplify<Struct_.Assign<this["~lambda.in"]["fields"], NewFields>>> : "Error: schema not eligible for fieldsAssign";
|
|
2246
2456
|
}
|
|
2247
2457
|
/**
|
|
2248
|
-
*
|
|
2249
|
-
*
|
|
2458
|
+
* Adds fields to a struct schema through a struct-mapping lambda.
|
|
2459
|
+
*
|
|
2460
|
+
* **When to use**
|
|
2461
|
+
*
|
|
2462
|
+
* Use to add the same fields to an existing struct or to every struct member of
|
|
2463
|
+
* a union.
|
|
2464
|
+
*
|
|
2465
|
+
* **Details**
|
|
2466
|
+
*
|
|
2467
|
+
* This is a shortcut for `MyStruct.mapFields(Struct.assign(fields))`.
|
|
2250
2468
|
*
|
|
2251
2469
|
* **Example** (Adding fields to a union of structs)
|
|
2252
2470
|
*
|
|
@@ -2640,8 +2858,8 @@ export declare namespace StructWithRest {
|
|
|
2640
2858
|
*
|
|
2641
2859
|
* **When to use**
|
|
2642
2860
|
*
|
|
2643
|
-
* Use as the schema type
|
|
2644
|
-
*
|
|
2861
|
+
* Use as the schema type when generic code needs to retain the base struct
|
|
2862
|
+
* schema and all rest record schemas.
|
|
2645
2863
|
*
|
|
2646
2864
|
* @see {@link StructWithRest} for constructing this schema type
|
|
2647
2865
|
* @see {@link Record} for constructing record schemas used as rest index signatures
|
|
@@ -3077,8 +3295,8 @@ export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
|
3077
3295
|
*
|
|
3078
3296
|
* **When to use**
|
|
3079
3297
|
*
|
|
3080
|
-
* Use as the schema type
|
|
3081
|
-
*
|
|
3298
|
+
* Use as the schema type when generic code needs to retain the original item
|
|
3299
|
+
* schema.
|
|
3082
3300
|
*
|
|
3083
3301
|
* **Details**
|
|
3084
3302
|
*
|
|
@@ -3382,8 +3600,8 @@ export interface suspend<S extends Top> extends Bottom<S["Type"], S["Encoded"],
|
|
|
3382
3600
|
*/
|
|
3383
3601
|
export declare function suspend<S extends Top>(f: () => S): suspend<S>;
|
|
3384
3602
|
/**
|
|
3385
|
-
*
|
|
3386
|
-
*
|
|
3603
|
+
* Attaches one or more filter checks to a schema without changing the
|
|
3604
|
+
* TypeScript type.
|
|
3387
3605
|
*
|
|
3388
3606
|
* **Example** (Adding checks to a schema)
|
|
3389
3607
|
*
|
|
@@ -3432,8 +3650,8 @@ type DistributeBrands<B> = UnionToIntersection<B extends infer U extends string
|
|
|
3432
3650
|
*
|
|
3433
3651
|
* **When to use**
|
|
3434
3652
|
*
|
|
3435
|
-
* Use as the schema type
|
|
3436
|
-
*
|
|
3653
|
+
* Use as the schema type when generic code needs to retain the wrapped schema
|
|
3654
|
+
* and nominal brand type.
|
|
3437
3655
|
*
|
|
3438
3656
|
* @see {@link brand} for adding the brand tag to an existing schema
|
|
3439
3657
|
*
|
|
@@ -3580,7 +3798,7 @@ export declare function middlewareEncoding<S extends Top, RE>(encode: (effect: E
|
|
|
3580
3798
|
*/
|
|
3581
3799
|
export declare function catchDecoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue>): (self: S) => S["Rebuild"];
|
|
3582
3800
|
/**
|
|
3583
|
-
*
|
|
3801
|
+
* Recovers from a decoding error with a handler that may require Effect services.
|
|
3584
3802
|
*
|
|
3585
3803
|
* **When to use**
|
|
3586
3804
|
*
|
|
@@ -3613,7 +3831,7 @@ export declare function catchDecodingWithContext<S extends Top, R = never>(f: (i
|
|
|
3613
3831
|
*/
|
|
3614
3832
|
export declare function catchEncoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue>): (self: S) => S["Rebuild"];
|
|
3615
3833
|
/**
|
|
3616
|
-
*
|
|
3834
|
+
* Recovers from an encoding error with a handler that may require Effect services.
|
|
3617
3835
|
*
|
|
3618
3836
|
* **When to use**
|
|
3619
3837
|
*
|
|
@@ -3759,13 +3977,17 @@ export declare function decode<S extends Top, RD = never, RE = never>(transforma
|
|
|
3759
3977
|
readonly encode: Getter.Getter<S["Type"], S["Type"], RE>;
|
|
3760
3978
|
}): (self: S) => decodeTo<toType<S>, S, RD, RE>;
|
|
3761
3979
|
/**
|
|
3762
|
-
*
|
|
3763
|
-
*
|
|
3980
|
+
* Reverses a schema transformation so the encoded schema is supplied first.
|
|
3981
|
+
*
|
|
3982
|
+
* **When to use**
|
|
3983
|
+
*
|
|
3984
|
+
* Use to define a transformation by naming the encoded schema before the
|
|
3985
|
+
* decoded schema.
|
|
3764
3986
|
*
|
|
3765
3987
|
* **Details**
|
|
3766
3988
|
*
|
|
3767
|
-
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))
|
|
3768
|
-
*
|
|
3989
|
+
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))`. The `from`
|
|
3990
|
+
* schema acts as the target decoded schema and `to` acts as the encoded source.
|
|
3769
3991
|
*
|
|
3770
3992
|
* **Example** (Encode a number back to string)
|
|
3771
3993
|
*
|
|
@@ -4090,9 +4312,17 @@ export interface tag<Tag extends AST.LiteralValue> extends withConstructorDefaul
|
|
|
4090
4312
|
*/
|
|
4091
4313
|
export declare function tag<Tag extends AST.LiteralValue>(literal: Tag): tag<Tag>;
|
|
4092
4314
|
/**
|
|
4093
|
-
*
|
|
4094
|
-
*
|
|
4095
|
-
*
|
|
4315
|
+
* Creates a literal `_tag` schema that is omitted from encoded output.
|
|
4316
|
+
*
|
|
4317
|
+
* **When to use**
|
|
4318
|
+
*
|
|
4319
|
+
* Use to decode data that omits the discriminator field while still constructing
|
|
4320
|
+
* values with a `_tag` for tagged union matching.
|
|
4321
|
+
*
|
|
4322
|
+
* **Details**
|
|
4323
|
+
*
|
|
4324
|
+
* The tag is filled during decoding and construction, like {@link tag}, but is
|
|
4325
|
+
* omitted when encoding.
|
|
4096
4326
|
*
|
|
4097
4327
|
* **Example** (Tag omitted during encoding)
|
|
4098
4328
|
*
|
|
@@ -4125,9 +4355,11 @@ export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fie
|
|
|
4125
4355
|
readonly _tag: tag<Tag>;
|
|
4126
4356
|
} & Fields>>;
|
|
4127
4357
|
/**
|
|
4128
|
-
*
|
|
4129
|
-
*
|
|
4130
|
-
*
|
|
4358
|
+
* Creates a struct schema with an automatically populated `_tag` field.
|
|
4359
|
+
*
|
|
4360
|
+
* **When to use**
|
|
4361
|
+
*
|
|
4362
|
+
* Use to define a tagged union case from a literal tag and a set of fields.
|
|
4131
4363
|
*
|
|
4132
4364
|
* **Details**
|
|
4133
4365
|
*
|
|
@@ -4774,8 +5006,8 @@ export declare function isUncapitalized(annotations?: Annotations.Filter): AST.F
|
|
|
4774
5006
|
*/
|
|
4775
5007
|
export declare function isFinite(annotations?: Annotations.Filter): AST.Filter<number>;
|
|
4776
5008
|
/**
|
|
4777
|
-
*
|
|
4778
|
-
*
|
|
5009
|
+
* Creates a greater-than (`>`) check for any ordered type from an
|
|
5010
|
+
* `Order.Order` instance.
|
|
4779
5011
|
*
|
|
4780
5012
|
* @category Order checks
|
|
4781
5013
|
* @since 4.0.0
|
|
@@ -4786,8 +5018,8 @@ export declare function makeIsGreaterThan<T>(options: {
|
|
|
4786
5018
|
readonly formatter?: Formatter<T> | undefined;
|
|
4787
5019
|
}): (exclusiveMinimum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4788
5020
|
/**
|
|
4789
|
-
*
|
|
4790
|
-
*
|
|
5021
|
+
* Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
|
|
5022
|
+
* `Order.Order` instance.
|
|
4791
5023
|
*
|
|
4792
5024
|
* @category Order checks
|
|
4793
5025
|
* @since 4.0.0
|
|
@@ -4798,8 +5030,8 @@ export declare function makeIsGreaterThanOrEqualTo<T>(options: {
|
|
|
4798
5030
|
readonly formatter?: Formatter<T> | undefined;
|
|
4799
5031
|
}): (minimum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4800
5032
|
/**
|
|
4801
|
-
*
|
|
4802
|
-
*
|
|
5033
|
+
* Creates a less-than (`<`) check for any ordered type from an `Order.Order`
|
|
5034
|
+
* instance.
|
|
4803
5035
|
*
|
|
4804
5036
|
* @category Order checks
|
|
4805
5037
|
* @since 4.0.0
|
|
@@ -4810,8 +5042,8 @@ export declare function makeIsLessThan<T>(options: {
|
|
|
4810
5042
|
readonly formatter?: Formatter<T> | undefined;
|
|
4811
5043
|
}): (exclusiveMaximum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4812
5044
|
/**
|
|
4813
|
-
*
|
|
4814
|
-
*
|
|
5045
|
+
* Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
|
|
5046
|
+
* `Order.Order` instance.
|
|
4815
5047
|
*
|
|
4816
5048
|
* @category Order checks
|
|
4817
5049
|
* @since 4.0.0
|
|
@@ -4822,8 +5054,8 @@ export declare function makeIsLessThanOrEqualTo<T>(options: {
|
|
|
4822
5054
|
readonly formatter?: Formatter<T> | undefined;
|
|
4823
5055
|
}): (maximum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4824
5056
|
/**
|
|
4825
|
-
*
|
|
4826
|
-
*
|
|
5057
|
+
* Creates an inclusive or exclusive range check for any ordered type from an
|
|
5058
|
+
* `Order.Order` instance.
|
|
4827
5059
|
*
|
|
4828
5060
|
* @category Order checks
|
|
4829
5061
|
* @since 4.0.0
|
|
@@ -4844,8 +5076,8 @@ export declare function makeIsBetween<T>(deriveOptions: {
|
|
|
4844
5076
|
readonly exclusiveMaximum?: boolean | undefined;
|
|
4845
5077
|
}, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4846
5078
|
/**
|
|
4847
|
-
*
|
|
4848
|
-
*
|
|
5079
|
+
* Creates a divisibility check for any numeric type from a remainder function
|
|
5080
|
+
* and a zero value.
|
|
4849
5081
|
*
|
|
4850
5082
|
* @category Numeric checks
|
|
4851
5083
|
* @since 4.0.0
|
|
@@ -5560,7 +5792,7 @@ export interface NonEmptyString extends String {
|
|
|
5560
5792
|
readonly "Rebuild": NonEmptyString;
|
|
5561
5793
|
}
|
|
5562
5794
|
/**
|
|
5563
|
-
*
|
|
5795
|
+
* Schema for non-empty strings. Validates that a string has at least one
|
|
5564
5796
|
* character.
|
|
5565
5797
|
*
|
|
5566
5798
|
* @category String
|
|
@@ -5578,7 +5810,7 @@ export interface Char extends String {
|
|
|
5578
5810
|
readonly "Rebuild": Char;
|
|
5579
5811
|
}
|
|
5580
5812
|
/**
|
|
5581
|
-
*
|
|
5813
|
+
* Schema for strings whose JavaScript `length` is exactly `1`.
|
|
5582
5814
|
*
|
|
5583
5815
|
* **When to use**
|
|
5584
5816
|
*
|
|
@@ -5639,7 +5871,7 @@ export type OptionIso<A extends Top> = {
|
|
|
5639
5871
|
readonly value: A["Iso"];
|
|
5640
5872
|
};
|
|
5641
5873
|
/**
|
|
5642
|
-
*
|
|
5874
|
+
* Schema for `Option<A>` values.
|
|
5643
5875
|
*
|
|
5644
5876
|
* @category Option
|
|
5645
5877
|
* @since 3.10.0
|
|
@@ -5822,7 +6054,7 @@ export declare function OptionFromOptionalNullOr<S extends Top>(schema: S, optio
|
|
|
5822
6054
|
* Schema for the `Result<A, E>` type, representing a computation that either
|
|
5823
6055
|
* succeeds with `A` or fails with `E`.
|
|
5824
6056
|
*
|
|
5825
|
-
* @category
|
|
6057
|
+
* @category schemas
|
|
5826
6058
|
* @since 4.0.0
|
|
5827
6059
|
*/
|
|
5828
6060
|
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>> {
|
|
@@ -5838,7 +6070,7 @@ export interface Result<A extends Top, E extends Top> extends declareConstructor
|
|
|
5838
6070
|
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
5839
6071
|
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
5840
6072
|
*
|
|
5841
|
-
* @category
|
|
6073
|
+
* @category schemas
|
|
5842
6074
|
* @since 4.0.0
|
|
5843
6075
|
*/
|
|
5844
6076
|
export type ResultIso<A extends Top, E extends Top> = {
|
|
@@ -5849,9 +6081,9 @@ export type ResultIso<A extends Top, E extends Top> = {
|
|
|
5849
6081
|
readonly failure: E["Iso"];
|
|
5850
6082
|
};
|
|
5851
6083
|
/**
|
|
5852
|
-
*
|
|
6084
|
+
* Schema for `Result<A, E>` values.
|
|
5853
6085
|
*
|
|
5854
|
-
* @category
|
|
6086
|
+
* @category schemas
|
|
5855
6087
|
* @since 4.0.0
|
|
5856
6088
|
*/
|
|
5857
6089
|
export declare function Result<A extends Top, E extends Top>(success: A, failure: E): Result<A, E>;
|
|
@@ -5867,8 +6099,8 @@ export interface Redacted<S extends Top> extends declareConstructor<Redacted_.Re
|
|
|
5867
6099
|
readonly value: S;
|
|
5868
6100
|
}
|
|
5869
6101
|
/**
|
|
5870
|
-
*
|
|
5871
|
-
*
|
|
6102
|
+
* Schema for values that hide sensitive information from error output and
|
|
6103
|
+
* inspection.
|
|
5872
6104
|
*
|
|
5873
6105
|
* **Details**
|
|
5874
6106
|
*
|
|
@@ -5930,8 +6162,8 @@ export declare function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
|
5930
6162
|
*
|
|
5931
6163
|
* **When to use**
|
|
5932
6164
|
*
|
|
5933
|
-
* Use as the schema type
|
|
5934
|
-
*
|
|
6165
|
+
* Use as the schema type when generic code needs to retain the typed failure
|
|
6166
|
+
* and defect schemas for a single cause reason.
|
|
5935
6167
|
*
|
|
5936
6168
|
* **Details**
|
|
5937
6169
|
*
|
|
@@ -5997,8 +6229,8 @@ export declare function CauseReason<E extends Top, D extends Top>(error: E, defe
|
|
|
5997
6229
|
*
|
|
5998
6230
|
* **When to use**
|
|
5999
6231
|
*
|
|
6000
|
-
* Use as the schema type
|
|
6001
|
-
*
|
|
6232
|
+
* Use as the schema type when generic code needs to retain the typed failure
|
|
6233
|
+
* and defect schemas for a full cause.
|
|
6002
6234
|
*
|
|
6003
6235
|
* **Details**
|
|
6004
6236
|
*
|
|
@@ -6064,7 +6296,7 @@ export interface Error extends instanceOf<globalThis.Error> {
|
|
|
6064
6296
|
readonly "Rebuild": Error;
|
|
6065
6297
|
}
|
|
6066
6298
|
/**
|
|
6067
|
-
*
|
|
6299
|
+
* Schema for JavaScript `Error` objects.
|
|
6068
6300
|
*
|
|
6069
6301
|
* **Details**
|
|
6070
6302
|
*
|
|
@@ -6078,7 +6310,7 @@ export interface Error extends instanceOf<globalThis.Error> {
|
|
|
6078
6310
|
*/
|
|
6079
6311
|
export declare const Error: Error;
|
|
6080
6312
|
/**
|
|
6081
|
-
*
|
|
6313
|
+
* Schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
6082
6314
|
* encoded form.
|
|
6083
6315
|
*
|
|
6084
6316
|
* **Details**
|
|
@@ -6109,7 +6341,7 @@ export interface Defect extends Union<readonly [
|
|
|
6109
6341
|
readonly "Rebuild": Defect;
|
|
6110
6342
|
}
|
|
6111
6343
|
/**
|
|
6112
|
-
*
|
|
6344
|
+
* Schema for defect values, accepting either JavaScript `Error` values encoded
|
|
6113
6345
|
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
6114
6346
|
*
|
|
6115
6347
|
* **Details**
|
|
@@ -6123,8 +6355,7 @@ export interface Defect extends Union<readonly [
|
|
|
6123
6355
|
*/
|
|
6124
6356
|
export declare const Defect: Defect;
|
|
6125
6357
|
/**
|
|
6126
|
-
*
|
|
6127
|
-
* encoded form.
|
|
6358
|
+
* Schema for defects that also includes stack traces in the encoded form.
|
|
6128
6359
|
*
|
|
6129
6360
|
* @category Defect
|
|
6130
6361
|
* @since 4.0.0
|
|
@@ -6199,8 +6430,8 @@ export interface $ReadonlyMap<Key extends Top, Value extends Top> extends declar
|
|
|
6199
6430
|
*/
|
|
6200
6431
|
export type ReadonlyMapIso<Key extends Top, Value extends Top> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>;
|
|
6201
6432
|
/**
|
|
6202
|
-
*
|
|
6203
|
-
*
|
|
6433
|
+
* Schema for readonly maps whose keys and values conform to the provided
|
|
6434
|
+
* schemas.
|
|
6204
6435
|
*
|
|
6205
6436
|
* @category ReadonlyMap
|
|
6206
6437
|
* @since 3.10.0
|
|
@@ -6227,8 +6458,7 @@ export interface HashMap<Key extends Top, Value extends Top> extends declareCons
|
|
|
6227
6458
|
*/
|
|
6228
6459
|
export type HashMapIso<Key extends Top, Value extends Top> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>;
|
|
6229
6460
|
/**
|
|
6230
|
-
*
|
|
6231
|
-
* conform to the provided schemas.
|
|
6461
|
+
* Schema for hash maps whose keys and values conform to the provided schemas.
|
|
6232
6462
|
*
|
|
6233
6463
|
* @category HashMap
|
|
6234
6464
|
* @since 3.10.0
|
|
@@ -6262,8 +6492,7 @@ export interface $ReadonlySet<Value extends Top> extends declareConstructor<glob
|
|
|
6262
6492
|
*/
|
|
6263
6493
|
export type ReadonlySetIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
6264
6494
|
/**
|
|
6265
|
-
*
|
|
6266
|
-
* provided element schema.
|
|
6495
|
+
* Schema for readonly sets whose values conform to the provided element schema.
|
|
6267
6496
|
*
|
|
6268
6497
|
* @category ReadonlySet
|
|
6269
6498
|
* @since 3.10.0
|
|
@@ -6289,8 +6518,7 @@ export interface HashSet<Value extends Top> extends declareConstructor<HashSet_.
|
|
|
6289
6518
|
*/
|
|
6290
6519
|
export type HashSetIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
6291
6520
|
/**
|
|
6292
|
-
*
|
|
6293
|
-
* provided schema.
|
|
6521
|
+
* Schema for hash sets whose values conform to the provided element schema.
|
|
6294
6522
|
*
|
|
6295
6523
|
* @category HashSet
|
|
6296
6524
|
* @since 3.10.0
|
|
@@ -6323,8 +6551,7 @@ export interface Chunk<Value extends Top> extends declareConstructor<Chunk_.Chun
|
|
|
6323
6551
|
*/
|
|
6324
6552
|
export type ChunkIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
6325
6553
|
/**
|
|
6326
|
-
*
|
|
6327
|
-
* provided schema.
|
|
6554
|
+
* Schema for chunks whose values conform to the provided element schema.
|
|
6328
6555
|
*
|
|
6329
6556
|
* @category Chunk
|
|
6330
6557
|
* @since 3.10.0
|
|
@@ -6360,7 +6587,7 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
6360
6587
|
readonly "Rebuild": URL;
|
|
6361
6588
|
}
|
|
6362
6589
|
/**
|
|
6363
|
-
*
|
|
6590
|
+
* Schema for JavaScript `URL` objects.
|
|
6364
6591
|
*
|
|
6365
6592
|
* **Details**
|
|
6366
6593
|
*
|
|
@@ -6383,7 +6610,7 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
6383
6610
|
readonly "Rebuild": URLFromString;
|
|
6384
6611
|
}
|
|
6385
6612
|
/**
|
|
6386
|
-
*
|
|
6613
|
+
* Schema that decodes a `string` into a `URL`.
|
|
6387
6614
|
*
|
|
6388
6615
|
* **Details**
|
|
6389
6616
|
*
|
|
@@ -6408,7 +6635,7 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
6408
6635
|
readonly "Rebuild": Date;
|
|
6409
6636
|
}
|
|
6410
6637
|
/**
|
|
6411
|
-
*
|
|
6638
|
+
* Schema for JavaScript `Date` objects.
|
|
6412
6639
|
*
|
|
6413
6640
|
* **When to use**
|
|
6414
6641
|
*
|
|
@@ -6447,7 +6674,7 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
6447
6674
|
readonly "Rebuild": DateFromString;
|
|
6448
6675
|
}
|
|
6449
6676
|
/**
|
|
6450
|
-
*
|
|
6677
|
+
* Schema that decodes a string into a JavaScript `Date`.
|
|
6451
6678
|
*
|
|
6452
6679
|
* **When to use**
|
|
6453
6680
|
*
|
|
@@ -6485,7 +6712,7 @@ export interface DateValid extends Date {
|
|
|
6485
6712
|
readonly "Rebuild": DateValid;
|
|
6486
6713
|
}
|
|
6487
6714
|
/**
|
|
6488
|
-
*
|
|
6715
|
+
* Schema for **valid** JavaScript `Date` objects.
|
|
6489
6716
|
*
|
|
6490
6717
|
* **Details**
|
|
6491
6718
|
*
|
|
@@ -6506,7 +6733,7 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
6506
6733
|
readonly "Rebuild": Duration;
|
|
6507
6734
|
}
|
|
6508
6735
|
/**
|
|
6509
|
-
*
|
|
6736
|
+
* Schema for `Duration` values.
|
|
6510
6737
|
*
|
|
6511
6738
|
* **Details**
|
|
6512
6739
|
*
|
|
@@ -6538,7 +6765,7 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
6538
6765
|
readonly "Rebuild": DurationFromString;
|
|
6539
6766
|
}
|
|
6540
6767
|
/**
|
|
6541
|
-
*
|
|
6768
|
+
* Schema that parses a string into a `Duration`.
|
|
6542
6769
|
*
|
|
6543
6770
|
* **Details**
|
|
6544
6771
|
*
|
|
@@ -6564,7 +6791,7 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
6564
6791
|
readonly "Rebuild": DurationFromNanos;
|
|
6565
6792
|
}
|
|
6566
6793
|
/**
|
|
6567
|
-
*
|
|
6794
|
+
* Schema that decodes a non-negative `bigint` into a
|
|
6568
6795
|
* `Duration`, treating the bigint as nanoseconds.
|
|
6569
6796
|
*
|
|
6570
6797
|
* **Details**
|
|
@@ -6592,7 +6819,7 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
6592
6819
|
readonly "Rebuild": DurationFromMillis;
|
|
6593
6820
|
}
|
|
6594
6821
|
/**
|
|
6595
|
-
*
|
|
6822
|
+
* Schema that decodes a non-negative (possibly infinite)
|
|
6596
6823
|
* integer into a `Duration`, treating the integer value as the duration in
|
|
6597
6824
|
* milliseconds.
|
|
6598
6825
|
*
|
|
@@ -6620,12 +6847,12 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
6620
6847
|
readonly "Rebuild": BigDecimal;
|
|
6621
6848
|
}
|
|
6622
6849
|
/**
|
|
6623
|
-
*
|
|
6850
|
+
* Schema for `BigDecimal` values.
|
|
6624
6851
|
*
|
|
6625
6852
|
* **When to use**
|
|
6626
6853
|
*
|
|
6627
|
-
* Use when values are already
|
|
6628
|
-
* formatting, equivalence, and JSON string serialization.
|
|
6854
|
+
* Use when values are already Effect decimal instances and need schema
|
|
6855
|
+
* validation, formatting, equivalence, and JSON string serialization.
|
|
6629
6856
|
*
|
|
6630
6857
|
* **Details**
|
|
6631
6858
|
*
|
|
@@ -6650,7 +6877,7 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
6650
6877
|
readonly "Rebuild": BigDecimalFromString;
|
|
6651
6878
|
}
|
|
6652
6879
|
/**
|
|
6653
|
-
*
|
|
6880
|
+
* Schema that parses a string into a `BigDecimal`.
|
|
6654
6881
|
*
|
|
6655
6882
|
* **When to use**
|
|
6656
6883
|
*
|
|
@@ -6688,7 +6915,7 @@ export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
|
6688
6915
|
readonly "Rebuild": UnknownFromJsonString;
|
|
6689
6916
|
}
|
|
6690
6917
|
/**
|
|
6691
|
-
*
|
|
6918
|
+
* Schema that decodes a JSON-encoded string into an `unknown` value.
|
|
6692
6919
|
*
|
|
6693
6920
|
* **Details**
|
|
6694
6921
|
*
|
|
@@ -6843,9 +7070,11 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
6843
7070
|
readonly "Rebuild": fromFormData<S>;
|
|
6844
7071
|
}
|
|
6845
7072
|
/**
|
|
6846
|
-
*
|
|
6847
|
-
*
|
|
6848
|
-
*
|
|
7073
|
+
* Schema for decoding `FormData` through a bracket-notation tree.
|
|
7074
|
+
*
|
|
7075
|
+
* **When to use**
|
|
7076
|
+
*
|
|
7077
|
+
* Use to decode browser or multipart form data into a structured schema value.
|
|
6849
7078
|
*
|
|
6850
7079
|
* **Details**
|
|
6851
7080
|
*
|
|
@@ -6961,9 +7190,11 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
6961
7190
|
readonly "Rebuild": fromURLSearchParams<S>;
|
|
6962
7191
|
}
|
|
6963
7192
|
/**
|
|
6964
|
-
*
|
|
6965
|
-
*
|
|
6966
|
-
*
|
|
7193
|
+
* Schema for decoding `URLSearchParams` through a bracket-notation tree.
|
|
7194
|
+
*
|
|
7195
|
+
* **When to use**
|
|
7196
|
+
*
|
|
7197
|
+
* Use to decode query parameters into a structured schema value.
|
|
6967
7198
|
*
|
|
6968
7199
|
* **Details**
|
|
6969
7200
|
*
|
|
@@ -7050,7 +7281,7 @@ export interface Finite extends Number {
|
|
|
7050
7281
|
readonly "Rebuild": Finite;
|
|
7051
7282
|
}
|
|
7052
7283
|
/**
|
|
7053
|
-
*
|
|
7284
|
+
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
7054
7285
|
*
|
|
7055
7286
|
* @category Number
|
|
7056
7287
|
* @since 3.10.0
|
|
@@ -7067,7 +7298,7 @@ export interface Int extends Number {
|
|
|
7067
7298
|
readonly "Rebuild": Int;
|
|
7068
7299
|
}
|
|
7069
7300
|
/**
|
|
7070
|
-
*
|
|
7301
|
+
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
7071
7302
|
*
|
|
7072
7303
|
* @category Number
|
|
7073
7304
|
* @since 3.10.0
|
|
@@ -7084,7 +7315,7 @@ export interface NumberFromString extends decodeTo<Finite, String> {
|
|
|
7084
7315
|
readonly "Rebuild": NumberFromString;
|
|
7085
7316
|
}
|
|
7086
7317
|
/**
|
|
7087
|
-
*
|
|
7318
|
+
* Schema that parses a string into a `number` using JavaScript
|
|
7088
7319
|
* number coercion.
|
|
7089
7320
|
*
|
|
7090
7321
|
* **Details**
|
|
@@ -7112,7 +7343,7 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
7112
7343
|
readonly "Rebuild": FiniteFromString;
|
|
7113
7344
|
}
|
|
7114
7345
|
/**
|
|
7115
|
-
*
|
|
7346
|
+
* Schema that parses a string into a finite number.
|
|
7116
7347
|
*
|
|
7117
7348
|
* **Details**
|
|
7118
7349
|
*
|
|
@@ -7138,7 +7369,7 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
7138
7369
|
readonly "Rebuild": BigIntFromString;
|
|
7139
7370
|
}
|
|
7140
7371
|
/**
|
|
7141
|
-
*
|
|
7372
|
+
* Schema that parses a string into a `bigint`.
|
|
7142
7373
|
*
|
|
7143
7374
|
* **When to use**
|
|
7144
7375
|
*
|
|
@@ -7177,7 +7408,7 @@ export interface Trimmed extends String {
|
|
|
7177
7408
|
readonly "Rebuild": Trimmed;
|
|
7178
7409
|
}
|
|
7179
7410
|
/**
|
|
7180
|
-
*
|
|
7411
|
+
* Schema for strings that contains no leading or trailing whitespaces.
|
|
7181
7412
|
*
|
|
7182
7413
|
* @category String
|
|
7183
7414
|
* @since 3.10.0
|
|
@@ -7194,7 +7425,7 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
7194
7425
|
readonly "Rebuild": Trim;
|
|
7195
7426
|
}
|
|
7196
7427
|
/**
|
|
7197
|
-
*
|
|
7428
|
+
* Schema that trims whitespace from a string.
|
|
7198
7429
|
*
|
|
7199
7430
|
* **Details**
|
|
7200
7431
|
*
|
|
@@ -7328,7 +7559,7 @@ export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
|
7328
7559
|
*/
|
|
7329
7560
|
export declare const StringFromUriComponent: StringFromUriComponent;
|
|
7330
7561
|
/**
|
|
7331
|
-
*
|
|
7562
|
+
* Schema for property keys accepted by Effect schemas: finite `number`,
|
|
7332
7563
|
* `symbol`, or `string`.
|
|
7333
7564
|
*
|
|
7334
7565
|
* @category PropertyKey
|
|
@@ -7365,7 +7596,7 @@ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0,
|
|
|
7365
7596
|
readonly "Rebuild": BooleanFromBit;
|
|
7366
7597
|
}
|
|
7367
7598
|
/**
|
|
7368
|
-
*
|
|
7599
|
+
* Schema for a boolean parsed from 0 or 1.
|
|
7369
7600
|
*
|
|
7370
7601
|
* **When to use**
|
|
7371
7602
|
*
|
|
@@ -7395,7 +7626,7 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
7395
7626
|
readonly "Rebuild": Uint8Array;
|
|
7396
7627
|
}
|
|
7397
7628
|
/**
|
|
7398
|
-
*
|
|
7629
|
+
* Schema for JavaScript `Uint8Array` objects.
|
|
7399
7630
|
*
|
|
7400
7631
|
* **Details**
|
|
7401
7632
|
*
|
|
@@ -7418,7 +7649,7 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
7418
7649
|
readonly "Rebuild": Uint8ArrayFromBase64;
|
|
7419
7650
|
}
|
|
7420
7651
|
/**
|
|
7421
|
-
*
|
|
7652
|
+
* Schema that decodes a base64 encoded string into a
|
|
7422
7653
|
* `Uint8Array`.
|
|
7423
7654
|
*
|
|
7424
7655
|
* **Details**
|
|
@@ -7444,7 +7675,7 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
7444
7675
|
readonly "Rebuild": Uint8ArrayFromBase64Url;
|
|
7445
7676
|
}
|
|
7446
7677
|
/**
|
|
7447
|
-
*
|
|
7678
|
+
* Schema that decodes a base64 (URL) encoded string into a
|
|
7448
7679
|
* `Uint8Array`.
|
|
7449
7680
|
*
|
|
7450
7681
|
* **Details**
|
|
@@ -7470,7 +7701,7 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
7470
7701
|
readonly "Rebuild": Uint8ArrayFromHex;
|
|
7471
7702
|
}
|
|
7472
7703
|
/**
|
|
7473
|
-
*
|
|
7704
|
+
* Schema that decodes a hex encoded string into a
|
|
7474
7705
|
* `Uint8Array`.
|
|
7475
7706
|
*
|
|
7476
7707
|
* **Details**
|
|
@@ -7496,7 +7727,7 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
7496
7727
|
readonly "Rebuild": DateTimeUtc;
|
|
7497
7728
|
}
|
|
7498
7729
|
/**
|
|
7499
|
-
*
|
|
7730
|
+
* Schema for `DateTime.Utc` values.
|
|
7500
7731
|
*
|
|
7501
7732
|
* **When to use**
|
|
7502
7733
|
*
|
|
@@ -7528,7 +7759,7 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
7528
7759
|
readonly "Rebuild": DateTimeUtcFromDate;
|
|
7529
7760
|
}
|
|
7530
7761
|
/**
|
|
7531
|
-
*
|
|
7762
|
+
* Schema that decodes a `Date` into a `DateTime.Utc`.
|
|
7532
7763
|
*
|
|
7533
7764
|
* **When to use**
|
|
7534
7765
|
*
|
|
@@ -7563,7 +7794,7 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
7563
7794
|
readonly "Rebuild": DateTimeUtcFromString;
|
|
7564
7795
|
}
|
|
7565
7796
|
/**
|
|
7566
|
-
*
|
|
7797
|
+
* Schema that decodes a date-time string into a `DateTime.Utc`.
|
|
7567
7798
|
*
|
|
7568
7799
|
* **Details**
|
|
7569
7800
|
*
|
|
@@ -7591,7 +7822,7 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
7591
7822
|
readonly "Rebuild": DateTimeUtcFromMillis;
|
|
7592
7823
|
}
|
|
7593
7824
|
/**
|
|
7594
|
-
*
|
|
7825
|
+
* Schema that decodes a number into a `DateTime.Utc`.
|
|
7595
7826
|
*
|
|
7596
7827
|
* **Details**
|
|
7597
7828
|
*
|
|
@@ -7616,7 +7847,7 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
7616
7847
|
readonly "Rebuild": TimeZoneOffset;
|
|
7617
7848
|
}
|
|
7618
7849
|
/**
|
|
7619
|
-
*
|
|
7850
|
+
* Schema for `DateTime.TimeZone.Offset` values.
|
|
7620
7851
|
*
|
|
7621
7852
|
* **Details**
|
|
7622
7853
|
*
|
|
@@ -7639,7 +7870,7 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
7639
7870
|
readonly "Rebuild": TimeZoneNamed;
|
|
7640
7871
|
}
|
|
7641
7872
|
/**
|
|
7642
|
-
*
|
|
7873
|
+
* Schema for `DateTime.TimeZone.Named` values.
|
|
7643
7874
|
*
|
|
7644
7875
|
* **Details**
|
|
7645
7876
|
*
|
|
@@ -7662,7 +7893,7 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
7662
7893
|
readonly "Rebuild": TimeZoneNamedFromString;
|
|
7663
7894
|
}
|
|
7664
7895
|
/**
|
|
7665
|
-
*
|
|
7896
|
+
* Schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
7666
7897
|
*
|
|
7667
7898
|
* **Details**
|
|
7668
7899
|
*
|
|
@@ -7687,7 +7918,7 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
7687
7918
|
readonly "Rebuild": TimeZone;
|
|
7688
7919
|
}
|
|
7689
7920
|
/**
|
|
7690
|
-
*
|
|
7921
|
+
* Schema for `DateTime.TimeZone` values.
|
|
7691
7922
|
*
|
|
7692
7923
|
* **Details**
|
|
7693
7924
|
*
|
|
@@ -7711,7 +7942,7 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
7711
7942
|
readonly "Rebuild": TimeZoneFromString;
|
|
7712
7943
|
}
|
|
7713
7944
|
/**
|
|
7714
|
-
*
|
|
7945
|
+
* Schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
7715
7946
|
*
|
|
7716
7947
|
* **Details**
|
|
7717
7948
|
*
|
|
@@ -7736,7 +7967,7 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
7736
7967
|
readonly "Rebuild": DateTimeZoned;
|
|
7737
7968
|
}
|
|
7738
7969
|
/**
|
|
7739
|
-
*
|
|
7970
|
+
* Schema for `DateTime.Zoned` values.
|
|
7740
7971
|
*
|
|
7741
7972
|
* **Details**
|
|
7742
7973
|
*
|
|
@@ -7762,7 +7993,7 @@ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String>
|
|
|
7762
7993
|
readonly "Rebuild": DateTimeZonedFromString;
|
|
7763
7994
|
}
|
|
7764
7995
|
/**
|
|
7765
|
-
*
|
|
7996
|
+
* Schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
7766
7997
|
*
|
|
7767
7998
|
* **Details**
|
|
7768
7999
|
*
|
|
@@ -8066,9 +8297,12 @@ export declare const Class: {
|
|
|
8066
8297
|
};
|
|
8067
8298
|
};
|
|
8068
8299
|
/**
|
|
8069
|
-
*
|
|
8070
|
-
*
|
|
8071
|
-
*
|
|
8300
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8301
|
+
*
|
|
8302
|
+
* **When to use**
|
|
8303
|
+
*
|
|
8304
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8305
|
+
* in tagged union matching.
|
|
8072
8306
|
*
|
|
8073
8307
|
* **Details**
|
|
8074
8308
|
*
|
|
@@ -8094,9 +8328,12 @@ export declare const Class: {
|
|
|
8094
8328
|
*/
|
|
8095
8329
|
export declare const TaggedClass: {
|
|
8096
8330
|
/**
|
|
8097
|
-
*
|
|
8098
|
-
*
|
|
8099
|
-
*
|
|
8331
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8332
|
+
*
|
|
8333
|
+
* **When to use**
|
|
8334
|
+
*
|
|
8335
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8336
|
+
* in tagged union matching.
|
|
8100
8337
|
*
|
|
8101
8338
|
* **Details**
|
|
8102
8339
|
*
|
|
@@ -8122,9 +8359,12 @@ export declare const TaggedClass: {
|
|
|
8122
8359
|
*/
|
|
8123
8360
|
<Self = never, Brand = {}>(identifier?: string): {
|
|
8124
8361
|
/**
|
|
8125
|
-
*
|
|
8126
|
-
*
|
|
8127
|
-
*
|
|
8362
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8363
|
+
*
|
|
8364
|
+
* **When to use**
|
|
8365
|
+
*
|
|
8366
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8367
|
+
* in tagged union matching.
|
|
8128
8368
|
*
|
|
8129
8369
|
* **Details**
|
|
8130
8370
|
*
|
|
@@ -8150,9 +8390,12 @@ export declare const TaggedClass: {
|
|
|
8150
8390
|
*/
|
|
8151
8391
|
<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>;
|
|
8152
8392
|
/**
|
|
8153
|
-
*
|
|
8154
|
-
*
|
|
8155
|
-
*
|
|
8393
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8394
|
+
*
|
|
8395
|
+
* **When to use**
|
|
8396
|
+
*
|
|
8397
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8398
|
+
* in tagged union matching.
|
|
8156
8399
|
*
|
|
8157
8400
|
* **Details**
|
|
8158
8401
|
*
|
|
@@ -8282,9 +8525,13 @@ export declare const ErrorClass: {
|
|
|
8282
8525
|
};
|
|
8283
8526
|
};
|
|
8284
8527
|
/**
|
|
8285
|
-
*
|
|
8286
|
-
*
|
|
8287
|
-
*
|
|
8528
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8529
|
+
* `_tag` field.
|
|
8530
|
+
*
|
|
8531
|
+
* **When to use**
|
|
8532
|
+
*
|
|
8533
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8534
|
+
* and matched as tagged union members.
|
|
8288
8535
|
*
|
|
8289
8536
|
* **Example** (Tagged error class)
|
|
8290
8537
|
*
|
|
@@ -8305,9 +8552,13 @@ export declare const ErrorClass: {
|
|
|
8305
8552
|
*/
|
|
8306
8553
|
export declare const TaggedErrorClass: {
|
|
8307
8554
|
/**
|
|
8308
|
-
*
|
|
8309
|
-
*
|
|
8310
|
-
*
|
|
8555
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8556
|
+
* `_tag` field.
|
|
8557
|
+
*
|
|
8558
|
+
* **When to use**
|
|
8559
|
+
*
|
|
8560
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8561
|
+
* and matched as tagged union members.
|
|
8311
8562
|
*
|
|
8312
8563
|
* **Example** (Tagged error class)
|
|
8313
8564
|
*
|
|
@@ -8328,9 +8579,13 @@ export declare const TaggedErrorClass: {
|
|
|
8328
8579
|
*/
|
|
8329
8580
|
<Self = never, Brand = {}>(identifier?: string): {
|
|
8330
8581
|
/**
|
|
8331
|
-
*
|
|
8332
|
-
*
|
|
8333
|
-
*
|
|
8582
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8583
|
+
* `_tag` field.
|
|
8584
|
+
*
|
|
8585
|
+
* **When to use**
|
|
8586
|
+
*
|
|
8587
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8588
|
+
* and matched as tagged union members.
|
|
8334
8589
|
*
|
|
8335
8590
|
* **Example** (Tagged error class)
|
|
8336
8591
|
*
|
|
@@ -8351,9 +8606,13 @@ export declare const TaggedErrorClass: {
|
|
|
8351
8606
|
*/
|
|
8352
8607
|
<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>;
|
|
8353
8608
|
/**
|
|
8354
|
-
*
|
|
8355
|
-
*
|
|
8356
|
-
*
|
|
8609
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8610
|
+
* `_tag` field.
|
|
8611
|
+
*
|
|
8612
|
+
* **When to use**
|
|
8613
|
+
*
|
|
8614
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8615
|
+
* and matched as tagged union members.
|
|
8357
8616
|
*
|
|
8358
8617
|
* **Example** (Tagged error class)
|
|
8359
8618
|
*
|
|
@@ -8424,7 +8683,7 @@ export declare function toArbitraryLazy<S extends Top>(schema: S): LazyArbitrary
|
|
|
8424
8683
|
*/
|
|
8425
8684
|
export declare function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitrary<S["Type"]>;
|
|
8426
8685
|
/**
|
|
8427
|
-
*
|
|
8686
|
+
* Attaches a custom formatter used by `toFormatter`.
|
|
8428
8687
|
*
|
|
8429
8688
|
* **Details**
|
|
8430
8689
|
*
|
|
@@ -8454,8 +8713,12 @@ export declare function toFormatter<T>(schema: Schema<T>, options?: {
|
|
|
8454
8713
|
}): Formatter<T>;
|
|
8455
8714
|
/**
|
|
8456
8715
|
* Overrides the equivalence derivation for a schema by supplying a custom
|
|
8457
|
-
* `Equivalence`.
|
|
8458
|
-
*
|
|
8716
|
+
* `Equivalence`.
|
|
8717
|
+
*
|
|
8718
|
+
* **When to use**
|
|
8719
|
+
*
|
|
8720
|
+
* Use when the default structural equivalence derived by {@link toEquivalence}
|
|
8721
|
+
* is not appropriate for a type.
|
|
8459
8722
|
*
|
|
8460
8723
|
* @category Equivalence
|
|
8461
8724
|
* @since 4.0.0
|
|
@@ -8601,8 +8864,8 @@ export declare function toCodecIso<S extends Top>(schema: S): Codec<S["Type"], S
|
|
|
8601
8864
|
*/
|
|
8602
8865
|
export type StringTree = Tree<string | undefined>;
|
|
8603
8866
|
/**
|
|
8604
|
-
*
|
|
8605
|
-
* preserving the original structure.
|
|
8867
|
+
* Converts a schema to the StringTree canonical codec, where every leaf value
|
|
8868
|
+
* becomes a string while preserving the original structure.
|
|
8606
8869
|
*
|
|
8607
8870
|
* **Details**
|
|
8608
8871
|
*
|
|
@@ -8682,12 +8945,19 @@ export interface overrideToCodecIso<S extends Top, Iso> extends Bottom<S["Type"]
|
|
|
8682
8945
|
readonly schema: S;
|
|
8683
8946
|
}
|
|
8684
8947
|
/**
|
|
8685
|
-
* Overrides
|
|
8686
|
-
*
|
|
8687
|
-
*
|
|
8688
|
-
*
|
|
8948
|
+
* Overrides a schema's derived ISO codec with an explicit target codec.
|
|
8949
|
+
*
|
|
8950
|
+
* **When to use**
|
|
8951
|
+
*
|
|
8952
|
+
* Use to provide a custom ISO transformation when the default derivation is not
|
|
8689
8953
|
* appropriate.
|
|
8690
8954
|
*
|
|
8955
|
+
* **Details**
|
|
8956
|
+
*
|
|
8957
|
+
* The resulting schema carries a custom `Iso` type parameter and uses the
|
|
8958
|
+
* provided `decode` and `encode` getters to transform between the schema type
|
|
8959
|
+
* and the target codec.
|
|
8960
|
+
*
|
|
8691
8961
|
* @category Optic
|
|
8692
8962
|
* @since 4.0.0
|
|
8693
8963
|
*/
|