effect 4.0.0-beta.71 → 4.0.0-beta.73
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 +6 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +9 -8
- 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 +4 -5
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- 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/HttpApiSecurity.d.ts +27 -5
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +26 -3
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/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 +9 -3
- 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 +13 -10
- 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 +5 -6
- package/src/unstable/httpapi/HttpApiError.ts +2 -2
- package/src/unstable/httpapi/HttpApiSchema.ts +4 -7
- package/src/unstable/httpapi/HttpApiSecurity.ts +36 -8
- package/src/unstable/httpapi/HttpApiTest.ts +1 -1
- package/src/unstable/httpapi/OpenApi.ts +9 -3
- 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/src/Schema.ts
CHANGED
|
@@ -460,7 +460,7 @@ export function declare<T, Iso = T>(
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
/**
|
|
463
|
-
*
|
|
463
|
+
* Returns a schema widened to the fully-parameterized {@link Bottom} interface,
|
|
464
464
|
* making all 14 type parameters visible to TypeScript.
|
|
465
465
|
*
|
|
466
466
|
* **Details**
|
|
@@ -889,8 +889,8 @@ export interface Encoder<out E, out RE = never> extends Codec<unknown, E, unknow
|
|
|
889
889
|
}
|
|
890
890
|
|
|
891
891
|
/**
|
|
892
|
-
*
|
|
893
|
-
*
|
|
892
|
+
* Returns a codec widened to the full {@link Codec} interface, prompting
|
|
893
|
+
* TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`).
|
|
894
894
|
*
|
|
895
895
|
* **Details**
|
|
896
896
|
*
|
|
@@ -1115,7 +1115,7 @@ function toBaseStandardJSONSchemaV1(self: Top, target: StandardJSONSchemaV1.Targ
|
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
1117
1117
|
/**
|
|
1118
|
-
*
|
|
1118
|
+
* Converts a schema to an experimental Standard JSON Schema V1 representation.
|
|
1119
1119
|
*
|
|
1120
1120
|
* **Details**
|
|
1121
1121
|
*
|
|
@@ -1186,11 +1186,15 @@ export const is = Parser.is
|
|
|
1186
1186
|
* Creates an assertion function that throws an error if the input doesn't match
|
|
1187
1187
|
* the schema.
|
|
1188
1188
|
*
|
|
1189
|
+
* **When to use**
|
|
1190
|
+
*
|
|
1191
|
+
* Use to validate unknown input at runtime while narrowing the value with a
|
|
1192
|
+
* TypeScript `asserts` predicate.
|
|
1193
|
+
*
|
|
1189
1194
|
* **Details**
|
|
1190
1195
|
*
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1193
|
-
* throws an error if it fails.
|
|
1196
|
+
* The input is narrowed if the assertion succeeds. If validation fails, the
|
|
1197
|
+
* assertion throws.
|
|
1194
1198
|
*
|
|
1195
1199
|
* **Example** (Basic Usage)
|
|
1196
1200
|
*
|
|
@@ -1219,9 +1223,16 @@ export const asserts: <S extends Top, I>(schema: S, input: I) => asserts input i
|
|
|
1219
1223
|
|
|
1220
1224
|
/**
|
|
1221
1225
|
* Decodes an `unknown` input against a schema, returning an `Effect` that
|
|
1222
|
-
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1226
|
+
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
1227
|
+
*
|
|
1228
|
+
* **When to use**
|
|
1229
|
+
*
|
|
1230
|
+
* Use when decoding input whose type is not statically known.
|
|
1231
|
+
*
|
|
1232
|
+
* **Details**
|
|
1233
|
+
*
|
|
1234
|
+
* Prefer {@link decodeEffect} when the input is already typed as the schema's
|
|
1235
|
+
* `Encoded` type.
|
|
1225
1236
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1226
1237
|
* application options override creation options.
|
|
1227
1238
|
*
|
|
@@ -1238,8 +1249,15 @@ export function decodeUnknownEffect<S extends Top>(schema: S, options?: AST.Pars
|
|
|
1238
1249
|
/**
|
|
1239
1250
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1240
1251
|
* returning an `Effect` that succeeds with the decoded value or fails with a
|
|
1241
|
-
* {@link SchemaError}.
|
|
1242
|
-
*
|
|
1252
|
+
* {@link SchemaError}.
|
|
1253
|
+
*
|
|
1254
|
+
* **When to use**
|
|
1255
|
+
*
|
|
1256
|
+
* Use when the input is already typed as the schema's `Encoded` type.
|
|
1257
|
+
*
|
|
1258
|
+
* **Details**
|
|
1259
|
+
*
|
|
1260
|
+
* For `unknown` input use {@link decodeUnknownEffect}.
|
|
1243
1261
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1244
1262
|
* application options override creation options.
|
|
1245
1263
|
*
|
|
@@ -1255,9 +1273,18 @@ export const decodeEffect: <S extends Top>(
|
|
|
1255
1273
|
/**
|
|
1256
1274
|
* Decodes an `unknown` input against a schema synchronously, returning an
|
|
1257
1275
|
* `Exit` that is either a `Success` with the decoded value or a `Failure` with
|
|
1258
|
-
* a {@link SchemaError}.
|
|
1259
|
-
*
|
|
1260
|
-
*
|
|
1276
|
+
* a {@link SchemaError}.
|
|
1277
|
+
*
|
|
1278
|
+
* **When to use**
|
|
1279
|
+
*
|
|
1280
|
+
* Use when the input type is not statically known and decoding should return an
|
|
1281
|
+
* `Exit` instead of failing or throwing.
|
|
1282
|
+
*
|
|
1283
|
+
* **Details**
|
|
1284
|
+
*
|
|
1285
|
+
* Only usable with schemas that have no `DecodingServices` requirement. Prefer
|
|
1286
|
+
* {@link decodeExit} when the input is already typed as the schema's `Encoded`
|
|
1287
|
+
* type.
|
|
1261
1288
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1262
1289
|
* application options override creation options.
|
|
1263
1290
|
*
|
|
@@ -1274,9 +1301,17 @@ export function decodeUnknownExit<S extends Decoder<unknown>>(schema: S, options
|
|
|
1274
1301
|
/**
|
|
1275
1302
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
1276
1303
|
* synchronously, returning an `Exit` that is either a `Success` with the
|
|
1277
|
-
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
1278
|
-
*
|
|
1279
|
-
*
|
|
1304
|
+
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
1305
|
+
*
|
|
1306
|
+
* **When to use**
|
|
1307
|
+
*
|
|
1308
|
+
* Use when typed input should be decoded into an `Exit` instead of failing or
|
|
1309
|
+
* throwing.
|
|
1310
|
+
*
|
|
1311
|
+
* **Details**
|
|
1312
|
+
*
|
|
1313
|
+
* Only usable with schemas that have no `DecodingServices` requirement. For
|
|
1314
|
+
* `unknown` input use {@link decodeUnknownExit}.
|
|
1280
1315
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1281
1316
|
* application options override creation options.
|
|
1282
1317
|
*
|
|
@@ -1290,10 +1325,17 @@ export const decodeExit: <S extends Decoder<unknown>>(
|
|
|
1290
1325
|
|
|
1291
1326
|
/**
|
|
1292
1327
|
* Decodes an `unknown` input against a schema, returning an `Option` that is
|
|
1293
|
-
* `Some` with the decoded value on success or `None` on failure.
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1296
|
-
*
|
|
1328
|
+
* `Some` with the decoded value on success or `None` on failure.
|
|
1329
|
+
*
|
|
1330
|
+
* **When to use**
|
|
1331
|
+
*
|
|
1332
|
+
* Use when the input type is not statically known and you only need to know
|
|
1333
|
+
* whether decoding succeeded.
|
|
1334
|
+
*
|
|
1335
|
+
* **Details**
|
|
1336
|
+
*
|
|
1337
|
+
* Prefer this over {@link decodeUnknownExit} or {@link decodeUnknownEffect}
|
|
1338
|
+
* when you don't need error details. For typed input use {@link decodeOption}.
|
|
1297
1339
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1298
1340
|
* application options override creation options.
|
|
1299
1341
|
*
|
|
@@ -1305,7 +1347,15 @@ export const decodeUnknownOption = Parser.decodeUnknownOption
|
|
|
1305
1347
|
/**
|
|
1306
1348
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1307
1349
|
* returning an `Option` that is `Some` with the decoded value on success or
|
|
1308
|
-
* `None` on failure.
|
|
1350
|
+
* `None` on failure.
|
|
1351
|
+
*
|
|
1352
|
+
* **When to use**
|
|
1353
|
+
*
|
|
1354
|
+
* Use when typed input should be decoded and only success or failure matters.
|
|
1355
|
+
*
|
|
1356
|
+
* **Details**
|
|
1357
|
+
*
|
|
1358
|
+
* For `unknown` input use {@link decodeUnknownOption}.
|
|
1309
1359
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1310
1360
|
* application options override creation options.
|
|
1311
1361
|
*
|
|
@@ -1316,8 +1366,16 @@ export const decodeOption = Parser.decodeOption
|
|
|
1316
1366
|
|
|
1317
1367
|
/**
|
|
1318
1368
|
* Decodes an `unknown` input against a schema, returning a `Result` that
|
|
1319
|
-
* succeeds with the decoded value or fails with a schema issue.
|
|
1320
|
-
*
|
|
1369
|
+
* succeeds with the decoded value or fails with a schema issue.
|
|
1370
|
+
*
|
|
1371
|
+
* **When to use**
|
|
1372
|
+
*
|
|
1373
|
+
* Use when the input type is not statically known and decoding should return a
|
|
1374
|
+
* `Result` with structured issue data.
|
|
1375
|
+
*
|
|
1376
|
+
* **Details**
|
|
1377
|
+
*
|
|
1378
|
+
* For typed input use {@link decodeResult}.
|
|
1321
1379
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1322
1380
|
* application options override creation options.
|
|
1323
1381
|
*
|
|
@@ -1329,7 +1387,16 @@ export const decodeUnknownResult = Parser.decodeUnknownResult
|
|
|
1329
1387
|
/**
|
|
1330
1388
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1331
1389
|
* returning a `Result` that succeeds with the decoded value or fails with a
|
|
1332
|
-
* schema issue.
|
|
1390
|
+
* schema issue.
|
|
1391
|
+
*
|
|
1392
|
+
* **When to use**
|
|
1393
|
+
*
|
|
1394
|
+
* Use when typed input should be decoded into a `Result` with structured issue
|
|
1395
|
+
* data.
|
|
1396
|
+
*
|
|
1397
|
+
* **Details**
|
|
1398
|
+
*
|
|
1399
|
+
* For `unknown` input use {@link decodeUnknownResult}.
|
|
1333
1400
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1334
1401
|
* application options override creation options.
|
|
1335
1402
|
*
|
|
@@ -1340,9 +1407,15 @@ export const decodeResult = Parser.decodeResult
|
|
|
1340
1407
|
|
|
1341
1408
|
/**
|
|
1342
1409
|
* Decodes an `unknown` input against a schema, returning a `Promise` that
|
|
1343
|
-
* resolves with the decoded value or rejects with a schema issue.
|
|
1344
|
-
*
|
|
1345
|
-
*
|
|
1410
|
+
* resolves with the decoded value or rejects with a schema issue.
|
|
1411
|
+
*
|
|
1412
|
+
* **When to use**
|
|
1413
|
+
*
|
|
1414
|
+
* Use when integrating unknown input validation with Promise-based APIs.
|
|
1415
|
+
*
|
|
1416
|
+
* **Details**
|
|
1417
|
+
*
|
|
1418
|
+
* For typed input use {@link decodePromise}.
|
|
1346
1419
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1347
1420
|
* application options override creation options.
|
|
1348
1421
|
*
|
|
@@ -1354,10 +1427,15 @@ export const decodeUnknownPromise = Parser.decodeUnknownPromise
|
|
|
1354
1427
|
/**
|
|
1355
1428
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1356
1429
|
* returning a `Promise` that resolves with the decoded value or rejects with a
|
|
1357
|
-
* schema issue.
|
|
1430
|
+
* schema issue.
|
|
1431
|
+
*
|
|
1432
|
+
* **When to use**
|
|
1433
|
+
*
|
|
1434
|
+
* Use when integrating typed input decoding with Promise-based APIs.
|
|
1358
1435
|
*
|
|
1359
1436
|
* **Details**
|
|
1360
1437
|
*
|
|
1438
|
+
* For `unknown` input use `decodeUnknownPromise`.
|
|
1361
1439
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1362
1440
|
* application options override creation options.
|
|
1363
1441
|
*
|
|
@@ -1369,11 +1447,15 @@ export const decodePromise = Parser.decodePromise
|
|
|
1369
1447
|
/**
|
|
1370
1448
|
* Decodes an `unknown` input against a schema synchronously, returning the
|
|
1371
1449
|
* decoded value or throwing an `Error` whose cause contains the schema issue.
|
|
1372
|
-
*
|
|
1373
|
-
*
|
|
1450
|
+
*
|
|
1451
|
+
* **When to use**
|
|
1452
|
+
*
|
|
1453
|
+
* Use when validating unknown data at a boundary and treating schema mismatches
|
|
1454
|
+
* as exceptions.
|
|
1374
1455
|
*
|
|
1375
1456
|
* **Details**
|
|
1376
1457
|
*
|
|
1458
|
+
* For typed input use `decodeSync`.
|
|
1377
1459
|
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
1378
1460
|
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
1379
1461
|
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
@@ -1404,10 +1486,16 @@ export const decodeUnknownSync = Parser.decodeUnknownSync
|
|
|
1404
1486
|
/**
|
|
1405
1487
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
1406
1488
|
* synchronously, returning the decoded value or throwing an `Error` whose cause
|
|
1407
|
-
* contains the schema issue.
|
|
1489
|
+
* contains the schema issue.
|
|
1490
|
+
*
|
|
1491
|
+
* **When to use**
|
|
1492
|
+
*
|
|
1493
|
+
* Use when typed input should be decoded synchronously and schema mismatches
|
|
1494
|
+
* should throw.
|
|
1408
1495
|
*
|
|
1409
1496
|
* **Details**
|
|
1410
1497
|
*
|
|
1498
|
+
* For `unknown` input use `decodeUnknownSync`.
|
|
1411
1499
|
* Only service-free schemas can be decoded synchronously. Options may be
|
|
1412
1500
|
* provided either when creating the decoder or when applying it; application
|
|
1413
1501
|
* options override creation options.
|
|
@@ -1419,9 +1507,16 @@ export const decodeSync = Parser.decodeSync
|
|
|
1419
1507
|
|
|
1420
1508
|
/**
|
|
1421
1509
|
* Encodes an `unknown` input against a schema, returning an `Effect` that
|
|
1422
|
-
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1510
|
+
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
1511
|
+
*
|
|
1512
|
+
* **When to use**
|
|
1513
|
+
*
|
|
1514
|
+
* Use when encoding input whose type is not statically known.
|
|
1515
|
+
*
|
|
1516
|
+
* **Details**
|
|
1517
|
+
*
|
|
1518
|
+
* Prefer {@link encodeEffect} when the input is already typed as the schema's
|
|
1519
|
+
* `Type`.
|
|
1425
1520
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1426
1521
|
* application options override creation options.
|
|
1427
1522
|
*
|
|
@@ -1452,8 +1547,15 @@ export function encodeUnknownEffect<S extends Top>(schema: S, options?: AST.Pars
|
|
|
1452
1547
|
/**
|
|
1453
1548
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1454
1549
|
* `Effect` that succeeds with the encoded value or fails with a
|
|
1455
|
-
* {@link SchemaError}.
|
|
1456
|
-
*
|
|
1550
|
+
* {@link SchemaError}.
|
|
1551
|
+
*
|
|
1552
|
+
* **When to use**
|
|
1553
|
+
*
|
|
1554
|
+
* Use when the input is already typed as the schema's `Type`.
|
|
1555
|
+
*
|
|
1556
|
+
* **Details**
|
|
1557
|
+
*
|
|
1558
|
+
* For `unknown` input use {@link encodeUnknownEffect}.
|
|
1457
1559
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1458
1560
|
* application options override creation options.
|
|
1459
1561
|
*
|
|
@@ -1469,9 +1571,17 @@ export const encodeEffect: <S extends Top>(
|
|
|
1469
1571
|
/**
|
|
1470
1572
|
* Encodes an `unknown` input against a schema synchronously, returning an
|
|
1471
1573
|
* `Exit` that is either a `Success` with the encoded value or a `Failure` with
|
|
1472
|
-
* a {@link SchemaError}.
|
|
1473
|
-
*
|
|
1474
|
-
*
|
|
1574
|
+
* a {@link SchemaError}.
|
|
1575
|
+
*
|
|
1576
|
+
* **When to use**
|
|
1577
|
+
*
|
|
1578
|
+
* Use when the input type is not statically known and encoding should return an
|
|
1579
|
+
* `Exit` instead of failing or throwing.
|
|
1580
|
+
*
|
|
1581
|
+
* **Details**
|
|
1582
|
+
*
|
|
1583
|
+
* Only usable with schemas that have no `EncodingServices` requirement. Prefer
|
|
1584
|
+
* {@link encodeExit} when the input is already typed as the schema's `Type`.
|
|
1475
1585
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1476
1586
|
* application options override creation options.
|
|
1477
1587
|
*
|
|
@@ -1488,9 +1598,17 @@ export function encodeUnknownExit<S extends Encoder<unknown>>(schema: S, options
|
|
|
1488
1598
|
/**
|
|
1489
1599
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1490
1600
|
* returning an `Exit` that is either a `Success` with the encoded value or a
|
|
1491
|
-
* `Failure` with a {@link SchemaError}.
|
|
1492
|
-
*
|
|
1493
|
-
*
|
|
1601
|
+
* `Failure` with a {@link SchemaError}.
|
|
1602
|
+
*
|
|
1603
|
+
* **When to use**
|
|
1604
|
+
*
|
|
1605
|
+
* Use when typed input should be encoded into an `Exit` instead of failing or
|
|
1606
|
+
* throwing.
|
|
1607
|
+
*
|
|
1608
|
+
* **Details**
|
|
1609
|
+
*
|
|
1610
|
+
* Only usable with schemas that have no `EncodingServices` requirement. For
|
|
1611
|
+
* `unknown` input use {@link encodeUnknownExit}.
|
|
1494
1612
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1495
1613
|
* application options override creation options.
|
|
1496
1614
|
*
|
|
@@ -1504,10 +1622,17 @@ export const encodeExit: <S extends Encoder<unknown>>(
|
|
|
1504
1622
|
|
|
1505
1623
|
/**
|
|
1506
1624
|
* Encodes an `unknown` input against a schema, returning an `Option` that is
|
|
1507
|
-
* `Some` with the encoded value on success or `None` on failure.
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1625
|
+
* `Some` with the encoded value on success or `None` on failure.
|
|
1626
|
+
*
|
|
1627
|
+
* **When to use**
|
|
1628
|
+
*
|
|
1629
|
+
* Use when the input type is not statically known and you only need to know
|
|
1630
|
+
* whether encoding succeeded.
|
|
1631
|
+
*
|
|
1632
|
+
* **Details**
|
|
1633
|
+
*
|
|
1634
|
+
* Prefer this over {@link encodeUnknownExit} or {@link encodeUnknownEffect}
|
|
1635
|
+
* when you don't need error details. For typed input use {@link encodeOption}.
|
|
1511
1636
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1512
1637
|
* application options override creation options.
|
|
1513
1638
|
*
|
|
@@ -1519,7 +1644,15 @@ export const encodeUnknownOption = Parser.encodeUnknownOption
|
|
|
1519
1644
|
/**
|
|
1520
1645
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1521
1646
|
* `Option` that is `Some` with the encoded value on success or `None` on
|
|
1522
|
-
* failure.
|
|
1647
|
+
* failure.
|
|
1648
|
+
*
|
|
1649
|
+
* **When to use**
|
|
1650
|
+
*
|
|
1651
|
+
* Use when typed input should be encoded and only success or failure matters.
|
|
1652
|
+
*
|
|
1653
|
+
* **Details**
|
|
1654
|
+
*
|
|
1655
|
+
* For `unknown` input use {@link encodeUnknownOption}.
|
|
1523
1656
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1524
1657
|
* application options override creation options.
|
|
1525
1658
|
*
|
|
@@ -1530,8 +1663,16 @@ export const encodeOption = Parser.encodeOption
|
|
|
1530
1663
|
|
|
1531
1664
|
/**
|
|
1532
1665
|
* Encodes an `unknown` input against a schema, returning a `Result` that
|
|
1533
|
-
* succeeds with the encoded value or fails with a schema issue.
|
|
1534
|
-
*
|
|
1666
|
+
* succeeds with the encoded value or fails with a schema issue.
|
|
1667
|
+
*
|
|
1668
|
+
* **When to use**
|
|
1669
|
+
*
|
|
1670
|
+
* Use when the input type is not statically known and encoding should return a
|
|
1671
|
+
* `Result` with structured issue data.
|
|
1672
|
+
*
|
|
1673
|
+
* **Details**
|
|
1674
|
+
*
|
|
1675
|
+
* For typed input use {@link encodeResult}.
|
|
1535
1676
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1536
1677
|
* application options override creation options.
|
|
1537
1678
|
*
|
|
@@ -1543,6 +1684,14 @@ export const encodeUnknownResult = Parser.encodeUnknownResult
|
|
|
1543
1684
|
/**
|
|
1544
1685
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1545
1686
|
* `Result` that succeeds with the encoded value or fails with a schema issue.
|
|
1687
|
+
*
|
|
1688
|
+
* **When to use**
|
|
1689
|
+
*
|
|
1690
|
+
* Use when typed input should be encoded into a `Result` with structured issue
|
|
1691
|
+
* data.
|
|
1692
|
+
*
|
|
1693
|
+
* **Details**
|
|
1694
|
+
*
|
|
1546
1695
|
* For `unknown` input use {@link encodeUnknownResult}.
|
|
1547
1696
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1548
1697
|
* application options override creation options.
|
|
@@ -1554,9 +1703,15 @@ export const encodeResult = Parser.encodeResult
|
|
|
1554
1703
|
|
|
1555
1704
|
/**
|
|
1556
1705
|
* Encodes an `unknown` input against a schema, returning a `Promise` that
|
|
1557
|
-
* resolves with the encoded value or rejects with a schema issue.
|
|
1558
|
-
*
|
|
1559
|
-
*
|
|
1706
|
+
* resolves with the encoded value or rejects with a schema issue.
|
|
1707
|
+
*
|
|
1708
|
+
* **When to use**
|
|
1709
|
+
*
|
|
1710
|
+
* Use when integrating unknown input serialization with Promise-based APIs.
|
|
1711
|
+
*
|
|
1712
|
+
* **Details**
|
|
1713
|
+
*
|
|
1714
|
+
* For typed input use {@link encodePromise}.
|
|
1560
1715
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1561
1716
|
* application options override creation options.
|
|
1562
1717
|
*
|
|
@@ -1568,7 +1723,15 @@ export const encodeUnknownPromise = Parser.encodeUnknownPromise
|
|
|
1568
1723
|
/**
|
|
1569
1724
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1570
1725
|
* `Promise` that resolves with the encoded value or rejects with a
|
|
1571
|
-
* {@link SchemaError}.
|
|
1726
|
+
* {@link SchemaError}.
|
|
1727
|
+
*
|
|
1728
|
+
* **When to use**
|
|
1729
|
+
*
|
|
1730
|
+
* Use when integrating typed input serialization with Promise-based APIs.
|
|
1731
|
+
*
|
|
1732
|
+
* **Details**
|
|
1733
|
+
*
|
|
1734
|
+
* For `unknown` input use {@link encodeUnknownPromise}.
|
|
1572
1735
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1573
1736
|
* application options override creation options.
|
|
1574
1737
|
*
|
|
@@ -1579,9 +1742,16 @@ export const encodePromise = Parser.encodePromise
|
|
|
1579
1742
|
|
|
1580
1743
|
/**
|
|
1581
1744
|
* Encodes an `unknown` input against a schema synchronously, throwing a
|
|
1582
|
-
* {@link SchemaError} on failure.
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1745
|
+
* {@link SchemaError} on failure.
|
|
1746
|
+
*
|
|
1747
|
+
* **When to use**
|
|
1748
|
+
*
|
|
1749
|
+
* Use when serializing unknown data at a boundary and treating schema
|
|
1750
|
+
* mismatches as unrecoverable errors.
|
|
1751
|
+
*
|
|
1752
|
+
* **Details**
|
|
1753
|
+
*
|
|
1754
|
+
* For non-throwing alternatives see {@link encodeUnknownOption},
|
|
1585
1755
|
* {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For typed input
|
|
1586
1756
|
* use {@link encodeSync}.
|
|
1587
1757
|
* Options may be provided either when creating the encoder or when applying it;
|
|
@@ -1594,8 +1764,16 @@ export const encodeUnknownSync = Parser.encodeUnknownSync
|
|
|
1594
1764
|
|
|
1595
1765
|
/**
|
|
1596
1766
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1597
|
-
* throwing a {@link SchemaError} on failure.
|
|
1598
|
-
*
|
|
1767
|
+
* throwing a {@link SchemaError} on failure.
|
|
1768
|
+
*
|
|
1769
|
+
* **When to use**
|
|
1770
|
+
*
|
|
1771
|
+
* Use when typed input should be encoded synchronously and schema mismatches
|
|
1772
|
+
* should throw.
|
|
1773
|
+
*
|
|
1774
|
+
* **Details**
|
|
1775
|
+
*
|
|
1776
|
+
* For `unknown` input use {@link encodeUnknownSync}.
|
|
1599
1777
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1600
1778
|
* application options override creation options.
|
|
1601
1779
|
*
|
|
@@ -1651,7 +1829,7 @@ export function asClass<S extends Top>(schema: S): S & { new(_: never): {} } {
|
|
|
1651
1829
|
}
|
|
1652
1830
|
|
|
1653
1831
|
/**
|
|
1654
|
-
*
|
|
1832
|
+
* Checks whether a value is a `Schema`.
|
|
1655
1833
|
*
|
|
1656
1834
|
* @category guards
|
|
1657
1835
|
* @since 3.10.0
|
|
@@ -1726,8 +1904,12 @@ interface requiredKeyLambda extends Lambda {
|
|
|
1726
1904
|
}
|
|
1727
1905
|
|
|
1728
1906
|
/**
|
|
1729
|
-
* Reverses
|
|
1730
|
-
*
|
|
1907
|
+
* Reverses `optionalKey` and returns the inner required schema.
|
|
1908
|
+
*
|
|
1909
|
+
* **When to use**
|
|
1910
|
+
*
|
|
1911
|
+
* Use to remove optional-key wrapping from a schema field that was previously
|
|
1912
|
+
* wrapped with {@link optionalKey}.
|
|
1731
1913
|
*
|
|
1732
1914
|
* @category combinators
|
|
1733
1915
|
* @since 4.0.0
|
|
@@ -1788,8 +1970,16 @@ interface requiredLambda extends Lambda {
|
|
|
1788
1970
|
}
|
|
1789
1971
|
|
|
1790
1972
|
/**
|
|
1791
|
-
* Reverses
|
|
1792
|
-
*
|
|
1973
|
+
* Reverses `optional` and returns the inner schema.
|
|
1974
|
+
*
|
|
1975
|
+
* **When to use**
|
|
1976
|
+
*
|
|
1977
|
+
* Use to remove optional wrapping from a schema field that was previously
|
|
1978
|
+
* wrapped with {@link optional}.
|
|
1979
|
+
*
|
|
1980
|
+
* **Details**
|
|
1981
|
+
*
|
|
1982
|
+
* This also unwraps the `UndefinedOr` member added by `optional`.
|
|
1793
1983
|
*
|
|
1794
1984
|
* @category combinators
|
|
1795
1985
|
* @since 3.10.0
|
|
@@ -1846,8 +2036,12 @@ interface readonlyKeyLambda extends Lambda {
|
|
|
1846
2036
|
}
|
|
1847
2037
|
|
|
1848
2038
|
/**
|
|
1849
|
-
* Reverses
|
|
1850
|
-
*
|
|
2039
|
+
* Reverses `mutableKey` and returns the inner readonly schema.
|
|
2040
|
+
*
|
|
2041
|
+
* **When to use**
|
|
2042
|
+
*
|
|
2043
|
+
* Use to remove mutable-key wrapping from a schema field that was previously
|
|
2044
|
+
* wrapped with {@link mutableKey}.
|
|
1851
2045
|
*
|
|
1852
2046
|
* @category combinators
|
|
1853
2047
|
* @since 4.0.0
|
|
@@ -1973,8 +2167,15 @@ function isFlip$(schema: Top): schema is flip<any> {
|
|
|
1973
2167
|
}
|
|
1974
2168
|
|
|
1975
2169
|
/**
|
|
1976
|
-
* Swaps the
|
|
1977
|
-
*
|
|
2170
|
+
* Swaps the decoded and encoded sides of a schema.
|
|
2171
|
+
*
|
|
2172
|
+
* **When to use**
|
|
2173
|
+
*
|
|
2174
|
+
* Use to invert a schema transformation direction.
|
|
2175
|
+
*
|
|
2176
|
+
* **Details**
|
|
2177
|
+
*
|
|
2178
|
+
* Calling `flip` twice returns the original schema.
|
|
1978
2179
|
*
|
|
1979
2180
|
* **Example** (Flip a number-from-string schema)
|
|
1980
2181
|
*
|
|
@@ -2198,8 +2399,17 @@ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> exte
|
|
|
2198
2399
|
}
|
|
2199
2400
|
|
|
2200
2401
|
/**
|
|
2201
|
-
*
|
|
2202
|
-
*
|
|
2402
|
+
* Schema for parsing template literal matches into typed tuple parts.
|
|
2403
|
+
*
|
|
2404
|
+
* **When to use**
|
|
2405
|
+
*
|
|
2406
|
+
* Use to validate a template literal string and decode the matched parts into
|
|
2407
|
+
* typed values.
|
|
2408
|
+
*
|
|
2409
|
+
* **Details**
|
|
2410
|
+
*
|
|
2411
|
+
* Unlike {@link TemplateLiteral}, this schema decodes the matched string into a
|
|
2412
|
+
* readonly tuple with one element per schema part.
|
|
2203
2413
|
*
|
|
2204
2414
|
* **Example** (Parse path parameters)
|
|
2205
2415
|
*
|
|
@@ -2821,8 +3031,16 @@ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
|
|
|
2821
3031
|
}
|
|
2822
3032
|
|
|
2823
3033
|
/**
|
|
2824
|
-
*
|
|
2825
|
-
*
|
|
3034
|
+
* Adds fields to a struct schema through a struct-mapping lambda.
|
|
3035
|
+
*
|
|
3036
|
+
* **When to use**
|
|
3037
|
+
*
|
|
3038
|
+
* Use to add the same fields to an existing struct or to every struct member of
|
|
3039
|
+
* a union.
|
|
3040
|
+
*
|
|
3041
|
+
* **Details**
|
|
3042
|
+
*
|
|
3043
|
+
* This is a shortcut for `MyStruct.mapFields(Struct.assign(fields))`.
|
|
2826
3044
|
*
|
|
2827
3045
|
* **Example** (Adding fields to a union of structs)
|
|
2828
3046
|
*
|
|
@@ -3284,8 +3502,8 @@ export declare namespace StructWithRest {
|
|
|
3284
3502
|
*
|
|
3285
3503
|
* **When to use**
|
|
3286
3504
|
*
|
|
3287
|
-
* Use as the schema type
|
|
3288
|
-
*
|
|
3505
|
+
* Use as the schema type when generic code needs to retain the base struct
|
|
3506
|
+
* schema and all rest record schemas.
|
|
3289
3507
|
*
|
|
3290
3508
|
* @see {@link StructWithRest} for constructing this schema type
|
|
3291
3509
|
* @see {@link Record} for constructing record schemas used as rest index signatures
|
|
@@ -3867,8 +4085,8 @@ export const NonEmptyArray = Struct_.lambda<NonEmptyArrayLambda>((schema) =>
|
|
|
3867
4085
|
*
|
|
3868
4086
|
* **When to use**
|
|
3869
4087
|
*
|
|
3870
|
-
* Use as the schema type
|
|
3871
|
-
*
|
|
4088
|
+
* Use as the schema type when generic code needs to retain the original item
|
|
4089
|
+
* schema.
|
|
3872
4090
|
*
|
|
3873
4091
|
* **Details**
|
|
3874
4092
|
*
|
|
@@ -4284,8 +4502,8 @@ export function suspend<S extends Top>(f: () => S): suspend<S> {
|
|
|
4284
4502
|
}
|
|
4285
4503
|
|
|
4286
4504
|
/**
|
|
4287
|
-
*
|
|
4288
|
-
*
|
|
4505
|
+
* Attaches one or more filter checks to a schema without changing the
|
|
4506
|
+
* TypeScript type.
|
|
4289
4507
|
*
|
|
4290
4508
|
* **Example** (Adding checks to a schema)
|
|
4291
4509
|
*
|
|
@@ -4364,8 +4582,8 @@ type DistributeBrands<B> = UnionToIntersection<B extends infer U extends string
|
|
|
4364
4582
|
*
|
|
4365
4583
|
* **When to use**
|
|
4366
4584
|
*
|
|
4367
|
-
* Use as the schema type
|
|
4368
|
-
*
|
|
4585
|
+
* Use as the schema type when generic code needs to retain the wrapped schema
|
|
4586
|
+
* and nominal brand type.
|
|
4369
4587
|
*
|
|
4370
4588
|
* @see {@link brand} for adding the brand tag to an existing schema
|
|
4371
4589
|
*
|
|
@@ -4607,7 +4825,7 @@ export function catchDecoding<S extends Top>(
|
|
|
4607
4825
|
}
|
|
4608
4826
|
|
|
4609
4827
|
/**
|
|
4610
|
-
*
|
|
4828
|
+
* Recovers from a decoding error with a handler that may require Effect services.
|
|
4611
4829
|
*
|
|
4612
4830
|
* **When to use**
|
|
4613
4831
|
*
|
|
@@ -4651,7 +4869,7 @@ export function catchEncoding<S extends Top>(
|
|
|
4651
4869
|
}
|
|
4652
4870
|
|
|
4653
4871
|
/**
|
|
4654
|
-
*
|
|
4872
|
+
* Recovers from an encoding error with a handler that may require Effect services.
|
|
4655
4873
|
*
|
|
4656
4874
|
* **When to use**
|
|
4657
4875
|
*
|
|
@@ -4852,13 +5070,17 @@ export function decode<S extends Top, RD = never, RE = never>(transformation: {
|
|
|
4852
5070
|
}
|
|
4853
5071
|
|
|
4854
5072
|
/**
|
|
4855
|
-
*
|
|
4856
|
-
*
|
|
5073
|
+
* Reverses a schema transformation so the encoded schema is supplied first.
|
|
5074
|
+
*
|
|
5075
|
+
* **When to use**
|
|
5076
|
+
*
|
|
5077
|
+
* Use to define a transformation by naming the encoded schema before the
|
|
5078
|
+
* decoded schema.
|
|
4857
5079
|
*
|
|
4858
5080
|
* **Details**
|
|
4859
5081
|
*
|
|
4860
|
-
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))
|
|
4861
|
-
*
|
|
5082
|
+
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))`. The `from`
|
|
5083
|
+
* schema acts as the target decoded schema and `to` acts as the encoded source.
|
|
4862
5084
|
*
|
|
4863
5085
|
* **Example** (Encode a number back to string)
|
|
4864
5086
|
*
|
|
@@ -5293,9 +5515,17 @@ export function tag<Tag extends AST.LiteralValue>(literal: Tag): tag<Tag> {
|
|
|
5293
5515
|
}
|
|
5294
5516
|
|
|
5295
5517
|
/**
|
|
5296
|
-
*
|
|
5297
|
-
*
|
|
5298
|
-
*
|
|
5518
|
+
* Creates a literal `_tag` schema that is omitted from encoded output.
|
|
5519
|
+
*
|
|
5520
|
+
* **When to use**
|
|
5521
|
+
*
|
|
5522
|
+
* Use to decode data that omits the discriminator field while still constructing
|
|
5523
|
+
* values with a `_tag` for tagged union matching.
|
|
5524
|
+
*
|
|
5525
|
+
* **Details**
|
|
5526
|
+
*
|
|
5527
|
+
* The tag is filled during decoding and construction, like {@link tag}, but is
|
|
5528
|
+
* omitted when encoding.
|
|
5299
5529
|
*
|
|
5300
5530
|
* **Example** (Tag omitted during encoding)
|
|
5301
5531
|
*
|
|
@@ -5332,9 +5562,11 @@ export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fie
|
|
|
5332
5562
|
>
|
|
5333
5563
|
|
|
5334
5564
|
/**
|
|
5335
|
-
*
|
|
5336
|
-
*
|
|
5337
|
-
*
|
|
5565
|
+
* Creates a struct schema with an automatically populated `_tag` field.
|
|
5566
|
+
*
|
|
5567
|
+
* **When to use**
|
|
5568
|
+
*
|
|
5569
|
+
* Use to define a tagged union case from a literal tag and a set of fields.
|
|
5338
5570
|
*
|
|
5339
5571
|
* **Details**
|
|
5340
5572
|
*
|
|
@@ -6364,8 +6596,8 @@ export function isFinite(annotations?: Annotations.Filter) {
|
|
|
6364
6596
|
}
|
|
6365
6597
|
|
|
6366
6598
|
/**
|
|
6367
|
-
*
|
|
6368
|
-
*
|
|
6599
|
+
* Creates a greater-than (`>`) check for any ordered type from an
|
|
6600
|
+
* `Order.Order` instance.
|
|
6369
6601
|
*
|
|
6370
6602
|
* @category Order checks
|
|
6371
6603
|
* @since 4.0.0
|
|
@@ -6390,8 +6622,8 @@ export function makeIsGreaterThan<T>(options: {
|
|
|
6390
6622
|
}
|
|
6391
6623
|
|
|
6392
6624
|
/**
|
|
6393
|
-
*
|
|
6394
|
-
*
|
|
6625
|
+
* Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
|
|
6626
|
+
* `Order.Order` instance.
|
|
6395
6627
|
*
|
|
6396
6628
|
* @category Order checks
|
|
6397
6629
|
* @since 4.0.0
|
|
@@ -6416,8 +6648,8 @@ export function makeIsGreaterThanOrEqualTo<T>(options: {
|
|
|
6416
6648
|
}
|
|
6417
6649
|
|
|
6418
6650
|
/**
|
|
6419
|
-
*
|
|
6420
|
-
*
|
|
6651
|
+
* Creates a less-than (`<`) check for any ordered type from an `Order.Order`
|
|
6652
|
+
* instance.
|
|
6421
6653
|
*
|
|
6422
6654
|
* @category Order checks
|
|
6423
6655
|
* @since 4.0.0
|
|
@@ -6442,8 +6674,8 @@ export function makeIsLessThan<T>(options: {
|
|
|
6442
6674
|
}
|
|
6443
6675
|
|
|
6444
6676
|
/**
|
|
6445
|
-
*
|
|
6446
|
-
*
|
|
6677
|
+
* Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
|
|
6678
|
+
* `Order.Order` instance.
|
|
6447
6679
|
*
|
|
6448
6680
|
* @category Order checks
|
|
6449
6681
|
* @since 4.0.0
|
|
@@ -6468,8 +6700,8 @@ export function makeIsLessThanOrEqualTo<T>(options: {
|
|
|
6468
6700
|
}
|
|
6469
6701
|
|
|
6470
6702
|
/**
|
|
6471
|
-
*
|
|
6472
|
-
*
|
|
6703
|
+
* Creates an inclusive or exclusive range check for any ordered type from an
|
|
6704
|
+
* `Order.Order` instance.
|
|
6473
6705
|
*
|
|
6474
6706
|
* @category Order checks
|
|
6475
6707
|
* @since 4.0.0
|
|
@@ -6513,8 +6745,8 @@ export function makeIsBetween<T>(deriveOptions: {
|
|
|
6513
6745
|
}
|
|
6514
6746
|
|
|
6515
6747
|
/**
|
|
6516
|
-
*
|
|
6517
|
-
*
|
|
6748
|
+
* Creates a divisibility check for any numeric type from a remainder function
|
|
6749
|
+
* and a zero value.
|
|
6518
6750
|
*
|
|
6519
6751
|
* @category Numeric checks
|
|
6520
6752
|
* @since 4.0.0
|
|
@@ -7785,7 +8017,7 @@ export interface NonEmptyString extends String {
|
|
|
7785
8017
|
}
|
|
7786
8018
|
|
|
7787
8019
|
/**
|
|
7788
|
-
*
|
|
8020
|
+
* Schema for non-empty strings. Validates that a string has at least one
|
|
7789
8021
|
* character.
|
|
7790
8022
|
*
|
|
7791
8023
|
* @category String
|
|
@@ -7805,7 +8037,7 @@ export interface Char extends String {
|
|
|
7805
8037
|
}
|
|
7806
8038
|
|
|
7807
8039
|
/**
|
|
7808
|
-
*
|
|
8040
|
+
* Schema for strings whose JavaScript `length` is exactly `1`.
|
|
7809
8041
|
*
|
|
7810
8042
|
* **When to use**
|
|
7811
8043
|
*
|
|
@@ -7873,7 +8105,7 @@ export type OptionIso<A extends Top> =
|
|
|
7873
8105
|
| { readonly _tag: "Some"; readonly value: A["Iso"] }
|
|
7874
8106
|
|
|
7875
8107
|
/**
|
|
7876
|
-
*
|
|
8108
|
+
* Schema for `Option<A>` values.
|
|
7877
8109
|
*
|
|
7878
8110
|
* @category Option
|
|
7879
8111
|
* @since 3.10.0
|
|
@@ -8173,7 +8405,7 @@ export function OptionFromOptionalNullOr<S extends Top>(
|
|
|
8173
8405
|
* Schema for the `Result<A, E>` type, representing a computation that either
|
|
8174
8406
|
* succeeds with `A` or fails with `E`.
|
|
8175
8407
|
*
|
|
8176
|
-
* @category
|
|
8408
|
+
* @category schemas
|
|
8177
8409
|
* @since 4.0.0
|
|
8178
8410
|
*/
|
|
8179
8411
|
export interface Result<A extends Top, E extends Top> extends
|
|
@@ -8197,7 +8429,7 @@ export interface Result<A extends Top, E extends Top> extends
|
|
|
8197
8429
|
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
8198
8430
|
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
8199
8431
|
*
|
|
8200
|
-
* @category
|
|
8432
|
+
* @category schemas
|
|
8201
8433
|
* @since 4.0.0
|
|
8202
8434
|
*/
|
|
8203
8435
|
export type ResultIso<A extends Top, E extends Top> =
|
|
@@ -8205,9 +8437,9 @@ export type ResultIso<A extends Top, E extends Top> =
|
|
|
8205
8437
|
| { readonly _tag: "Failure"; readonly failure: E["Iso"] }
|
|
8206
8438
|
|
|
8207
8439
|
/**
|
|
8208
|
-
*
|
|
8440
|
+
* Schema for `Result<A, E>` values.
|
|
8209
8441
|
*
|
|
8210
|
-
* @category
|
|
8442
|
+
* @category schemas
|
|
8211
8443
|
* @since 4.0.0
|
|
8212
8444
|
*/
|
|
8213
8445
|
export function Result<A extends Top, E extends Top>(
|
|
@@ -8299,8 +8531,8 @@ export interface Redacted<S extends Top> extends
|
|
|
8299
8531
|
}
|
|
8300
8532
|
|
|
8301
8533
|
/**
|
|
8302
|
-
*
|
|
8303
|
-
*
|
|
8534
|
+
* Schema for values that hide sensitive information from error output and
|
|
8535
|
+
* inspection.
|
|
8304
8536
|
*
|
|
8305
8537
|
* **Details**
|
|
8306
8538
|
*
|
|
@@ -8450,8 +8682,8 @@ export function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
|
8450
8682
|
*
|
|
8451
8683
|
* **When to use**
|
|
8452
8684
|
*
|
|
8453
|
-
* Use as the schema type
|
|
8454
|
-
*
|
|
8685
|
+
* Use as the schema type when generic code needs to retain the typed failure
|
|
8686
|
+
* and defect schemas for a single cause reason.
|
|
8455
8687
|
*
|
|
8456
8688
|
* **Details**
|
|
8457
8689
|
*
|
|
@@ -8632,8 +8864,8 @@ function causeReasonToFormatter<E>(error: Formatter<E>, defect: Formatter<unknow
|
|
|
8632
8864
|
*
|
|
8633
8865
|
* **When to use**
|
|
8634
8866
|
*
|
|
8635
|
-
* Use as the schema type
|
|
8636
|
-
*
|
|
8867
|
+
* Use as the schema type when generic code needs to retain the typed failure
|
|
8868
|
+
* and defect schemas for a full cause.
|
|
8637
8869
|
*
|
|
8638
8870
|
* **Details**
|
|
8639
8871
|
*
|
|
@@ -8771,7 +9003,7 @@ const ErrorJsonEncoded = Struct({
|
|
|
8771
9003
|
})
|
|
8772
9004
|
|
|
8773
9005
|
/**
|
|
8774
|
-
*
|
|
9006
|
+
* Schema for JavaScript `Error` objects.
|
|
8775
9007
|
*
|
|
8776
9008
|
* **Details**
|
|
8777
9009
|
*
|
|
@@ -8797,7 +9029,7 @@ export const Error: Error = instanceOf(globalThis.Error, {
|
|
|
8797
9029
|
})
|
|
8798
9030
|
|
|
8799
9031
|
/**
|
|
8800
|
-
*
|
|
9032
|
+
* Schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
8801
9033
|
* encoded form.
|
|
8802
9034
|
*
|
|
8803
9035
|
* **Details**
|
|
@@ -8865,7 +9097,7 @@ const defectTransformation = new Transformation.Transformation(
|
|
|
8865
9097
|
)
|
|
8866
9098
|
|
|
8867
9099
|
/**
|
|
8868
|
-
*
|
|
9100
|
+
* Schema for defect values, accepting either JavaScript `Error` values encoded
|
|
8869
9101
|
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
8870
9102
|
*
|
|
8871
9103
|
* **Details**
|
|
@@ -8889,8 +9121,7 @@ export const Defect: Defect = Union([
|
|
|
8889
9121
|
])
|
|
8890
9122
|
|
|
8891
9123
|
/**
|
|
8892
|
-
*
|
|
8893
|
-
* encoded form.
|
|
9124
|
+
* Schema for defects that also includes stack traces in the encoded form.
|
|
8894
9125
|
*
|
|
8895
9126
|
* @category Defect
|
|
8896
9127
|
* @since 4.0.0
|
|
@@ -9091,8 +9322,8 @@ export interface $ReadonlyMap<Key extends Top, Value extends Top> extends
|
|
|
9091
9322
|
export type ReadonlyMapIso<Key extends Top, Value extends Top> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>
|
|
9092
9323
|
|
|
9093
9324
|
/**
|
|
9094
|
-
*
|
|
9095
|
-
*
|
|
9325
|
+
* Schema for readonly maps whose keys and values conform to the provided
|
|
9326
|
+
* schemas.
|
|
9096
9327
|
*
|
|
9097
9328
|
* @category ReadonlyMap
|
|
9098
9329
|
* @since 3.10.0
|
|
@@ -9188,8 +9419,7 @@ export interface HashMap<Key extends Top, Value extends Top> extends
|
|
|
9188
9419
|
export type HashMapIso<Key extends Top, Value extends Top> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>
|
|
9189
9420
|
|
|
9190
9421
|
/**
|
|
9191
|
-
*
|
|
9192
|
-
* conform to the provided schemas.
|
|
9422
|
+
* Schema for hash maps whose keys and values conform to the provided schemas.
|
|
9193
9423
|
*
|
|
9194
9424
|
* @category HashMap
|
|
9195
9425
|
* @since 3.10.0
|
|
@@ -9293,8 +9523,7 @@ export interface $ReadonlySet<Value extends Top> extends
|
|
|
9293
9523
|
export type ReadonlySetIso<Value extends Top> = ReadonlyArray<Value["Iso"]>
|
|
9294
9524
|
|
|
9295
9525
|
/**
|
|
9296
|
-
*
|
|
9297
|
-
* provided element schema.
|
|
9526
|
+
* Schema for readonly sets whose values conform to the provided element schema.
|
|
9298
9527
|
*
|
|
9299
9528
|
* @category ReadonlySet
|
|
9300
9529
|
* @since 3.10.0
|
|
@@ -9389,8 +9618,7 @@ export interface HashSet<Value extends Top> extends
|
|
|
9389
9618
|
export type HashSetIso<Value extends Top> = ReadonlyArray<Value["Iso"]>
|
|
9390
9619
|
|
|
9391
9620
|
/**
|
|
9392
|
-
*
|
|
9393
|
-
* provided schema.
|
|
9621
|
+
* Schema for hash sets whose values conform to the provided element schema.
|
|
9394
9622
|
*
|
|
9395
9623
|
* @category HashSet
|
|
9396
9624
|
* @since 3.10.0
|
|
@@ -9492,8 +9720,7 @@ export interface Chunk<Value extends Top> extends
|
|
|
9492
9720
|
export type ChunkIso<Value extends Top> = ReadonlyArray<Value["Iso"]>
|
|
9493
9721
|
|
|
9494
9722
|
/**
|
|
9495
|
-
*
|
|
9496
|
-
* provided schema.
|
|
9723
|
+
* Schema for chunks whose values conform to the provided element schema.
|
|
9497
9724
|
*
|
|
9498
9725
|
* @category Chunk
|
|
9499
9726
|
* @since 3.10.0
|
|
@@ -9648,7 +9875,7 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
9648
9875
|
const URLString = String.annotate({ expected: "a string that will be decoded as a URL" })
|
|
9649
9876
|
|
|
9650
9877
|
/**
|
|
9651
|
-
*
|
|
9878
|
+
* Schema for JavaScript `URL` objects.
|
|
9652
9879
|
*
|
|
9653
9880
|
* **Details**
|
|
9654
9881
|
*
|
|
@@ -9692,7 +9919,7 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
9692
9919
|
}
|
|
9693
9920
|
|
|
9694
9921
|
/**
|
|
9695
|
-
*
|
|
9922
|
+
* Schema that decodes a `string` into a `URL`.
|
|
9696
9923
|
*
|
|
9697
9924
|
* **Details**
|
|
9698
9925
|
*
|
|
@@ -9721,7 +9948,7 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
9721
9948
|
const DateString = String.annotate({ expected: "a string in ISO 8601 format that will be decoded as a Date" })
|
|
9722
9949
|
|
|
9723
9950
|
/**
|
|
9724
|
-
*
|
|
9951
|
+
* Schema for JavaScript `Date` objects.
|
|
9725
9952
|
*
|
|
9726
9953
|
* **When to use**
|
|
9727
9954
|
*
|
|
@@ -9780,7 +10007,7 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
9780
10007
|
}
|
|
9781
10008
|
|
|
9782
10009
|
/**
|
|
9783
|
-
*
|
|
10010
|
+
* Schema that decodes a string into a JavaScript `Date`.
|
|
9784
10011
|
*
|
|
9785
10012
|
* **When to use**
|
|
9786
10013
|
*
|
|
@@ -9820,7 +10047,7 @@ export interface DateValid extends Date {
|
|
|
9820
10047
|
}
|
|
9821
10048
|
|
|
9822
10049
|
/**
|
|
9823
|
-
*
|
|
10050
|
+
* Schema for **valid** JavaScript `Date` objects.
|
|
9824
10051
|
*
|
|
9825
10052
|
* **Details**
|
|
9826
10053
|
*
|
|
@@ -9843,7 +10070,7 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
9843
10070
|
}
|
|
9844
10071
|
|
|
9845
10072
|
/**
|
|
9846
|
-
*
|
|
10073
|
+
* Schema for `Duration` values.
|
|
9847
10074
|
*
|
|
9848
10075
|
* **Details**
|
|
9849
10076
|
*
|
|
@@ -9936,7 +10163,7 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
9936
10163
|
}
|
|
9937
10164
|
|
|
9938
10165
|
/**
|
|
9939
|
-
*
|
|
10166
|
+
* Schema that parses a string into a `Duration`.
|
|
9940
10167
|
*
|
|
9941
10168
|
* **Details**
|
|
9942
10169
|
*
|
|
@@ -9968,7 +10195,7 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
9968
10195
|
const bigint0 = globalThis.BigInt(0)
|
|
9969
10196
|
|
|
9970
10197
|
/**
|
|
9971
|
-
*
|
|
10198
|
+
* Schema that decodes a non-negative `bigint` into a
|
|
9972
10199
|
* `Duration`, treating the bigint as nanoseconds.
|
|
9973
10200
|
*
|
|
9974
10201
|
* **Details**
|
|
@@ -10000,7 +10227,7 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
10000
10227
|
}
|
|
10001
10228
|
|
|
10002
10229
|
/**
|
|
10003
|
-
*
|
|
10230
|
+
* Schema that decodes a non-negative (possibly infinite)
|
|
10004
10231
|
* integer into a `Duration`, treating the integer value as the duration in
|
|
10005
10232
|
* milliseconds.
|
|
10006
10233
|
*
|
|
@@ -10034,12 +10261,12 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
10034
10261
|
const BigDecimalString = String.annotate({ expected: "a string that will be decoded as a BigDecimal" })
|
|
10035
10262
|
|
|
10036
10263
|
/**
|
|
10037
|
-
*
|
|
10264
|
+
* Schema for `BigDecimal` values.
|
|
10038
10265
|
*
|
|
10039
10266
|
* **When to use**
|
|
10040
10267
|
*
|
|
10041
|
-
* Use when values are already
|
|
10042
|
-
* formatting, equivalence, and JSON string serialization.
|
|
10268
|
+
* Use when values are already Effect decimal instances and need schema
|
|
10269
|
+
* validation, formatting, equivalence, and JSON string serialization.
|
|
10043
10270
|
*
|
|
10044
10271
|
* **Details**
|
|
10045
10272
|
*
|
|
@@ -10089,7 +10316,7 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
10089
10316
|
}
|
|
10090
10317
|
|
|
10091
10318
|
/**
|
|
10092
|
-
*
|
|
10319
|
+
* Schema that parses a string into a `BigDecimal`.
|
|
10093
10320
|
*
|
|
10094
10321
|
* **When to use**
|
|
10095
10322
|
*
|
|
@@ -10131,7 +10358,7 @@ export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
|
10131
10358
|
}
|
|
10132
10359
|
|
|
10133
10360
|
/**
|
|
10134
|
-
*
|
|
10361
|
+
* Schema that decodes a JSON-encoded string into an `unknown` value.
|
|
10135
10362
|
*
|
|
10136
10363
|
* **Details**
|
|
10137
10364
|
*
|
|
@@ -10392,9 +10619,11 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
10392
10619
|
}
|
|
10393
10620
|
|
|
10394
10621
|
/**
|
|
10395
|
-
*
|
|
10396
|
-
*
|
|
10397
|
-
*
|
|
10622
|
+
* Schema for decoding `FormData` through a bracket-notation tree.
|
|
10623
|
+
*
|
|
10624
|
+
* **When to use**
|
|
10625
|
+
*
|
|
10626
|
+
* Use to decode browser or multipart form data into a structured schema value.
|
|
10398
10627
|
*
|
|
10399
10628
|
* **Details**
|
|
10400
10629
|
*
|
|
@@ -10533,9 +10762,11 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
10533
10762
|
}
|
|
10534
10763
|
|
|
10535
10764
|
/**
|
|
10536
|
-
*
|
|
10537
|
-
*
|
|
10538
|
-
*
|
|
10765
|
+
* Schema for decoding `URLSearchParams` through a bracket-notation tree.
|
|
10766
|
+
*
|
|
10767
|
+
* **When to use**
|
|
10768
|
+
*
|
|
10769
|
+
* Use to decode query parameters into a structured schema value.
|
|
10539
10770
|
*
|
|
10540
10771
|
* **Details**
|
|
10541
10772
|
*
|
|
@@ -10626,7 +10857,7 @@ export interface Finite extends Number {
|
|
|
10626
10857
|
}
|
|
10627
10858
|
|
|
10628
10859
|
/**
|
|
10629
|
-
*
|
|
10860
|
+
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
10630
10861
|
*
|
|
10631
10862
|
* @category Number
|
|
10632
10863
|
* @since 3.10.0
|
|
@@ -10645,7 +10876,7 @@ export interface Int extends Number {
|
|
|
10645
10876
|
}
|
|
10646
10877
|
|
|
10647
10878
|
/**
|
|
10648
|
-
*
|
|
10879
|
+
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
10649
10880
|
*
|
|
10650
10881
|
* @category Number
|
|
10651
10882
|
* @since 3.10.0
|
|
@@ -10664,7 +10895,7 @@ export interface NumberFromString extends decodeTo<Finite, String> {
|
|
|
10664
10895
|
}
|
|
10665
10896
|
|
|
10666
10897
|
/**
|
|
10667
|
-
*
|
|
10898
|
+
* Schema that parses a string into a `number` using JavaScript
|
|
10668
10899
|
* number coercion.
|
|
10669
10900
|
*
|
|
10670
10901
|
* **Details**
|
|
@@ -10696,7 +10927,7 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
10696
10927
|
}
|
|
10697
10928
|
|
|
10698
10929
|
/**
|
|
10699
|
-
*
|
|
10930
|
+
* Schema that parses a string into a finite number.
|
|
10700
10931
|
*
|
|
10701
10932
|
* **Details**
|
|
10702
10933
|
*
|
|
@@ -10726,7 +10957,7 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
10726
10957
|
}
|
|
10727
10958
|
|
|
10728
10959
|
/**
|
|
10729
|
-
*
|
|
10960
|
+
* Schema that parses a string into a `bigint`.
|
|
10730
10961
|
*
|
|
10731
10962
|
* **When to use**
|
|
10732
10963
|
*
|
|
@@ -10769,7 +11000,7 @@ export interface Trimmed extends String {
|
|
|
10769
11000
|
}
|
|
10770
11001
|
|
|
10771
11002
|
/**
|
|
10772
|
-
*
|
|
11003
|
+
* Schema for strings that contains no leading or trailing whitespaces.
|
|
10773
11004
|
*
|
|
10774
11005
|
* @category String
|
|
10775
11006
|
* @since 3.10.0
|
|
@@ -10788,7 +11019,7 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
10788
11019
|
}
|
|
10789
11020
|
|
|
10790
11021
|
/**
|
|
10791
|
-
*
|
|
11022
|
+
* Schema that trims whitespace from a string.
|
|
10792
11023
|
*
|
|
10793
11024
|
* **Details**
|
|
10794
11025
|
*
|
|
@@ -10949,7 +11180,7 @@ export const StringFromUriComponent: StringFromUriComponent = String.annotate({
|
|
|
10949
11180
|
)
|
|
10950
11181
|
|
|
10951
11182
|
/**
|
|
10952
|
-
*
|
|
11183
|
+
* Schema for property keys accepted by Effect schemas: finite `number`,
|
|
10953
11184
|
* `symbol`, or `string`.
|
|
10954
11185
|
*
|
|
10955
11186
|
* @category PropertyKey
|
|
@@ -10987,7 +11218,7 @@ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0,
|
|
|
10987
11218
|
}
|
|
10988
11219
|
|
|
10989
11220
|
/**
|
|
10990
|
-
*
|
|
11221
|
+
* Schema for a boolean parsed from 0 or 1.
|
|
10991
11222
|
*
|
|
10992
11223
|
* **When to use**
|
|
10993
11224
|
*
|
|
@@ -11033,7 +11264,7 @@ const Base64String = String.annotate({
|
|
|
11033
11264
|
})
|
|
11034
11265
|
|
|
11035
11266
|
/**
|
|
11036
|
-
*
|
|
11267
|
+
* Schema for JavaScript `Uint8Array` objects.
|
|
11037
11268
|
*
|
|
11038
11269
|
* **Details**
|
|
11039
11270
|
*
|
|
@@ -11073,7 +11304,7 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
11073
11304
|
}
|
|
11074
11305
|
|
|
11075
11306
|
/**
|
|
11076
|
-
*
|
|
11307
|
+
* Schema that decodes a base64 encoded string into a
|
|
11077
11308
|
* `Uint8Array`.
|
|
11078
11309
|
*
|
|
11079
11310
|
* **Details**
|
|
@@ -11103,7 +11334,7 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
11103
11334
|
}
|
|
11104
11335
|
|
|
11105
11336
|
/**
|
|
11106
|
-
*
|
|
11337
|
+
* Schema that decodes a base64 (URL) encoded string into a
|
|
11107
11338
|
* `Uint8Array`.
|
|
11108
11339
|
*
|
|
11109
11340
|
* **Details**
|
|
@@ -11138,7 +11369,7 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
11138
11369
|
}
|
|
11139
11370
|
|
|
11140
11371
|
/**
|
|
11141
|
-
*
|
|
11372
|
+
* Schema that decodes a hex encoded string into a
|
|
11142
11373
|
* `Uint8Array`.
|
|
11143
11374
|
*
|
|
11144
11375
|
* **Details**
|
|
@@ -11173,7 +11404,7 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
11173
11404
|
}
|
|
11174
11405
|
|
|
11175
11406
|
/**
|
|
11176
|
-
*
|
|
11407
|
+
* Schema for `DateTime.Utc` values.
|
|
11177
11408
|
*
|
|
11178
11409
|
* **When to use**
|
|
11179
11410
|
*
|
|
@@ -11229,7 +11460,7 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
11229
11460
|
}
|
|
11230
11461
|
|
|
11231
11462
|
/**
|
|
11232
|
-
*
|
|
11463
|
+
* Schema that decodes a `Date` into a `DateTime.Utc`.
|
|
11233
11464
|
*
|
|
11234
11465
|
* **When to use**
|
|
11235
11466
|
*
|
|
@@ -11271,7 +11502,7 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
11271
11502
|
}
|
|
11272
11503
|
|
|
11273
11504
|
/**
|
|
11274
|
-
*
|
|
11505
|
+
* Schema that decodes a date-time string into a `DateTime.Utc`.
|
|
11275
11506
|
*
|
|
11276
11507
|
* **Details**
|
|
11277
11508
|
*
|
|
@@ -11308,7 +11539,7 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
11308
11539
|
}
|
|
11309
11540
|
|
|
11310
11541
|
/**
|
|
11311
|
-
*
|
|
11542
|
+
* Schema that decodes a number into a `DateTime.Utc`.
|
|
11312
11543
|
*
|
|
11313
11544
|
* **Details**
|
|
11314
11545
|
*
|
|
@@ -11340,7 +11571,7 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
11340
11571
|
}
|
|
11341
11572
|
|
|
11342
11573
|
/**
|
|
11343
|
-
*
|
|
11574
|
+
* Schema for `DateTime.TimeZone.Offset` values.
|
|
11344
11575
|
*
|
|
11345
11576
|
* **Details**
|
|
11346
11577
|
*
|
|
@@ -11389,7 +11620,7 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
11389
11620
|
const TimeZoneNamedString = String.annotate({ expected: "an IANA time zone identifier" })
|
|
11390
11621
|
|
|
11391
11622
|
/**
|
|
11392
|
-
*
|
|
11623
|
+
* Schema for `DateTime.TimeZone.Named` values.
|
|
11393
11624
|
*
|
|
11394
11625
|
* **Details**
|
|
11395
11626
|
*
|
|
@@ -11440,7 +11671,7 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
11440
11671
|
}
|
|
11441
11672
|
|
|
11442
11673
|
/**
|
|
11443
|
-
*
|
|
11674
|
+
* Schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
11444
11675
|
*
|
|
11445
11676
|
* **Details**
|
|
11446
11677
|
*
|
|
@@ -11473,7 +11704,7 @@ const TimeZoneString = String.annotate({
|
|
|
11473
11704
|
})
|
|
11474
11705
|
|
|
11475
11706
|
/**
|
|
11476
|
-
*
|
|
11707
|
+
* Schema for `DateTime.TimeZone` values.
|
|
11477
11708
|
*
|
|
11478
11709
|
* **Details**
|
|
11479
11710
|
*
|
|
@@ -11528,7 +11759,7 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
11528
11759
|
}
|
|
11529
11760
|
|
|
11530
11761
|
/**
|
|
11531
|
-
*
|
|
11762
|
+
* Schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
11532
11763
|
*
|
|
11533
11764
|
* **Details**
|
|
11534
11765
|
*
|
|
@@ -11561,7 +11792,7 @@ const DateTimeZonedString = String.annotate({
|
|
|
11561
11792
|
})
|
|
11562
11793
|
|
|
11563
11794
|
/**
|
|
11564
|
-
*
|
|
11795
|
+
* Schema for `DateTime.Zoned` values.
|
|
11565
11796
|
*
|
|
11566
11797
|
* **Details**
|
|
11567
11798
|
*
|
|
@@ -11619,7 +11850,7 @@ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String>
|
|
|
11619
11850
|
}
|
|
11620
11851
|
|
|
11621
11852
|
/**
|
|
11622
|
-
*
|
|
11853
|
+
* Schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
11623
11854
|
*
|
|
11624
11855
|
* **Details**
|
|
11625
11856
|
*
|
|
@@ -12137,9 +12368,12 @@ export const Class: {
|
|
|
12137
12368
|
}
|
|
12138
12369
|
|
|
12139
12370
|
/**
|
|
12140
|
-
*
|
|
12141
|
-
*
|
|
12142
|
-
*
|
|
12371
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
12372
|
+
*
|
|
12373
|
+
* **When to use**
|
|
12374
|
+
*
|
|
12375
|
+
* Use to define class instances that are validated by a schema and participate
|
|
12376
|
+
* in tagged union matching.
|
|
12143
12377
|
*
|
|
12144
12378
|
* **Details**
|
|
12145
12379
|
*
|
|
@@ -12165,9 +12399,12 @@ export const Class: {
|
|
|
12165
12399
|
*/
|
|
12166
12400
|
export const TaggedClass: {
|
|
12167
12401
|
/**
|
|
12168
|
-
*
|
|
12169
|
-
*
|
|
12170
|
-
*
|
|
12402
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
12403
|
+
*
|
|
12404
|
+
* **When to use**
|
|
12405
|
+
*
|
|
12406
|
+
* Use to define class instances that are validated by a schema and participate
|
|
12407
|
+
* in tagged union matching.
|
|
12171
12408
|
*
|
|
12172
12409
|
* **Details**
|
|
12173
12410
|
*
|
|
@@ -12193,9 +12430,12 @@ export const TaggedClass: {
|
|
|
12193
12430
|
*/
|
|
12194
12431
|
<Self = never, Brand = {}>(identifier?: string): {
|
|
12195
12432
|
/**
|
|
12196
|
-
*
|
|
12197
|
-
*
|
|
12198
|
-
*
|
|
12433
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
12434
|
+
*
|
|
12435
|
+
* **When to use**
|
|
12436
|
+
*
|
|
12437
|
+
* Use to define class instances that are validated by a schema and participate
|
|
12438
|
+
* in tagged union matching.
|
|
12199
12439
|
*
|
|
12200
12440
|
* **Details**
|
|
12201
12441
|
*
|
|
@@ -12225,9 +12465,12 @@ export const TaggedClass: {
|
|
|
12225
12465
|
annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>
|
|
12226
12466
|
): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedClass"> : Class<Self, TaggedStruct<Tag, Fields>, Brand>
|
|
12227
12467
|
/**
|
|
12228
|
-
*
|
|
12229
|
-
*
|
|
12230
|
-
*
|
|
12468
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
12469
|
+
*
|
|
12470
|
+
* **When to use**
|
|
12471
|
+
*
|
|
12472
|
+
* Use to define class instances that are validated by a schema and participate
|
|
12473
|
+
* in tagged union matching.
|
|
12231
12474
|
*
|
|
12232
12475
|
* **Details**
|
|
12233
12476
|
*
|
|
@@ -12401,9 +12644,13 @@ export const ErrorClass: {
|
|
|
12401
12644
|
}
|
|
12402
12645
|
|
|
12403
12646
|
/**
|
|
12404
|
-
*
|
|
12405
|
-
*
|
|
12406
|
-
*
|
|
12647
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
12648
|
+
* `_tag` field.
|
|
12649
|
+
*
|
|
12650
|
+
* **When to use**
|
|
12651
|
+
*
|
|
12652
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
12653
|
+
* and matched as tagged union members.
|
|
12407
12654
|
*
|
|
12408
12655
|
* **Example** (Tagged error class)
|
|
12409
12656
|
*
|
|
@@ -12424,9 +12671,13 @@ export const ErrorClass: {
|
|
|
12424
12671
|
*/
|
|
12425
12672
|
export const TaggedErrorClass: {
|
|
12426
12673
|
/**
|
|
12427
|
-
*
|
|
12428
|
-
*
|
|
12429
|
-
*
|
|
12674
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
12675
|
+
* `_tag` field.
|
|
12676
|
+
*
|
|
12677
|
+
* **When to use**
|
|
12678
|
+
*
|
|
12679
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
12680
|
+
* and matched as tagged union members.
|
|
12430
12681
|
*
|
|
12431
12682
|
* **Example** (Tagged error class)
|
|
12432
12683
|
*
|
|
@@ -12447,9 +12698,13 @@ export const TaggedErrorClass: {
|
|
|
12447
12698
|
*/
|
|
12448
12699
|
<Self = never, Brand = {}>(identifier?: string): {
|
|
12449
12700
|
/**
|
|
12450
|
-
*
|
|
12451
|
-
*
|
|
12452
|
-
*
|
|
12701
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
12702
|
+
* `_tag` field.
|
|
12703
|
+
*
|
|
12704
|
+
* **When to use**
|
|
12705
|
+
*
|
|
12706
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
12707
|
+
* and matched as tagged union members.
|
|
12453
12708
|
*
|
|
12454
12709
|
* **Example** (Tagged error class)
|
|
12455
12710
|
*
|
|
@@ -12475,9 +12730,13 @@ export const TaggedErrorClass: {
|
|
|
12475
12730
|
): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedErrorClass">
|
|
12476
12731
|
: Class<Self, TaggedStruct<Tag, Fields>, Cause_.YieldableError & Brand>
|
|
12477
12732
|
/**
|
|
12478
|
-
*
|
|
12479
|
-
*
|
|
12480
|
-
*
|
|
12733
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
12734
|
+
* `_tag` field.
|
|
12735
|
+
*
|
|
12736
|
+
* **When to use**
|
|
12737
|
+
*
|
|
12738
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
12739
|
+
* and matched as tagged union members.
|
|
12481
12740
|
*
|
|
12482
12741
|
* **Example** (Tagged error class)
|
|
12483
12742
|
*
|
|
@@ -12585,7 +12844,7 @@ export function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitrary<S["Ty
|
|
|
12585
12844
|
// -----------------------------------------------------------------------------
|
|
12586
12845
|
|
|
12587
12846
|
/**
|
|
12588
|
-
*
|
|
12847
|
+
* Attaches a custom formatter used by `toFormatter`.
|
|
12589
12848
|
*
|
|
12590
12849
|
* **Details**
|
|
12591
12850
|
*
|
|
@@ -12757,8 +13016,12 @@ export function toFormatter<T>(schema: Schema<T>, options?: {
|
|
|
12757
13016
|
|
|
12758
13017
|
/**
|
|
12759
13018
|
* Overrides the equivalence derivation for a schema by supplying a custom
|
|
12760
|
-
* `Equivalence`.
|
|
12761
|
-
*
|
|
13019
|
+
* `Equivalence`.
|
|
13020
|
+
*
|
|
13021
|
+
* **When to use**
|
|
13022
|
+
*
|
|
13023
|
+
* Use when the default structural equivalence derived by {@link toEquivalence}
|
|
13024
|
+
* is not appropriate for a type.
|
|
12762
13025
|
*
|
|
12763
13026
|
* @category Equivalence
|
|
12764
13027
|
* @since 4.0.0
|
|
@@ -13026,8 +13289,8 @@ function toCodecIsoBase(ast: AST.AST, recur: (ast: AST.AST) => AST.AST): AST.AST
|
|
|
13026
13289
|
export type StringTree = Tree<string | undefined>
|
|
13027
13290
|
|
|
13028
13291
|
/**
|
|
13029
|
-
*
|
|
13030
|
-
* preserving the original structure.
|
|
13292
|
+
* Converts a schema to the StringTree canonical codec, where every leaf value
|
|
13293
|
+
* becomes a string while preserving the original structure.
|
|
13031
13294
|
*
|
|
13032
13295
|
* **Details**
|
|
13033
13296
|
*
|
|
@@ -13406,12 +13669,19 @@ export interface overrideToCodecIso<S extends Top, Iso> extends
|
|
|
13406
13669
|
}
|
|
13407
13670
|
|
|
13408
13671
|
/**
|
|
13409
|
-
* Overrides
|
|
13410
|
-
*
|
|
13411
|
-
*
|
|
13412
|
-
*
|
|
13672
|
+
* Overrides a schema's derived ISO codec with an explicit target codec.
|
|
13673
|
+
*
|
|
13674
|
+
* **When to use**
|
|
13675
|
+
*
|
|
13676
|
+
* Use to provide a custom ISO transformation when the default derivation is not
|
|
13413
13677
|
* appropriate.
|
|
13414
13678
|
*
|
|
13679
|
+
* **Details**
|
|
13680
|
+
*
|
|
13681
|
+
* The resulting schema carries a custom `Iso` type parameter and uses the
|
|
13682
|
+
* provided `decode` and `encode` getters to transform between the schema type
|
|
13683
|
+
* and the target codec.
|
|
13684
|
+
*
|
|
13415
13685
|
* @category Optic
|
|
13416
13686
|
* @since 4.0.0
|
|
13417
13687
|
*/
|