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/dist/Schema.js
CHANGED
|
@@ -215,7 +215,7 @@ export function declare(is, annotations) {
|
|
|
215
215
|
return declareConstructor()([], () => (input, ast) => is(input) ? Effect.succeed(input) : Effect.fail(new Issue.InvalidType(ast, Option_.some(input))), annotations);
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
|
-
*
|
|
218
|
+
* Returns a schema widened to the fully-parameterized {@link Bottom} interface,
|
|
219
219
|
* making all 14 type parameters visible to TypeScript.
|
|
220
220
|
*
|
|
221
221
|
* **Details**
|
|
@@ -346,8 +346,8 @@ export function annotateKey(annotations) {
|
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
348
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
349
|
+
* Returns a codec widened to the full {@link Codec} interface, prompting
|
|
350
|
+
* TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`).
|
|
351
351
|
*
|
|
352
352
|
* **Details**
|
|
353
353
|
*
|
|
@@ -563,7 +563,7 @@ function toBaseStandardJSONSchemaV1(self, target) {
|
|
|
563
563
|
throw new globalThis.Error(`Unsupported target: ${target}`);
|
|
564
564
|
}
|
|
565
565
|
/**
|
|
566
|
-
*
|
|
566
|
+
* Converts a schema to an experimental Standard JSON Schema V1 representation.
|
|
567
567
|
*
|
|
568
568
|
* **Details**
|
|
569
569
|
*
|
|
@@ -634,11 +634,15 @@ export const is = Parser.is;
|
|
|
634
634
|
* Creates an assertion function that throws an error if the input doesn't match
|
|
635
635
|
* the schema.
|
|
636
636
|
*
|
|
637
|
+
* **When to use**
|
|
638
|
+
*
|
|
639
|
+
* Use to validate unknown input at runtime while narrowing the value with a
|
|
640
|
+
* TypeScript `asserts` predicate.
|
|
641
|
+
*
|
|
637
642
|
* **Details**
|
|
638
643
|
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
* throws an error if it fails.
|
|
644
|
+
* The input is narrowed if the assertion succeeds. If validation fails, the
|
|
645
|
+
* assertion throws.
|
|
642
646
|
*
|
|
643
647
|
* **Example** (Basic Usage)
|
|
644
648
|
*
|
|
@@ -666,9 +670,16 @@ export const is = Parser.is;
|
|
|
666
670
|
export const asserts = Parser.asserts;
|
|
667
671
|
/**
|
|
668
672
|
* Decodes an `unknown` input against a schema, returning an `Effect` that
|
|
669
|
-
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
670
|
-
*
|
|
671
|
-
*
|
|
673
|
+
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
674
|
+
*
|
|
675
|
+
* **When to use**
|
|
676
|
+
*
|
|
677
|
+
* Use when decoding input whose type is not statically known.
|
|
678
|
+
*
|
|
679
|
+
* **Details**
|
|
680
|
+
*
|
|
681
|
+
* Prefer {@link decodeEffect} when the input is already typed as the schema's
|
|
682
|
+
* `Encoded` type.
|
|
672
683
|
* Options may be provided either when creating the decoder or when applying it;
|
|
673
684
|
* application options override creation options.
|
|
674
685
|
*
|
|
@@ -684,8 +695,15 @@ export function decodeUnknownEffect(schema, options) {
|
|
|
684
695
|
/**
|
|
685
696
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
686
697
|
* returning an `Effect` that succeeds with the decoded value or fails with a
|
|
687
|
-
* {@link SchemaError}.
|
|
688
|
-
*
|
|
698
|
+
* {@link SchemaError}.
|
|
699
|
+
*
|
|
700
|
+
* **When to use**
|
|
701
|
+
*
|
|
702
|
+
* Use when the input is already typed as the schema's `Encoded` type.
|
|
703
|
+
*
|
|
704
|
+
* **Details**
|
|
705
|
+
*
|
|
706
|
+
* For `unknown` input use {@link decodeUnknownEffect}.
|
|
689
707
|
* Options may be provided either when creating the decoder or when applying it;
|
|
690
708
|
* application options override creation options.
|
|
691
709
|
*
|
|
@@ -696,9 +714,18 @@ export const decodeEffect = decodeUnknownEffect;
|
|
|
696
714
|
/**
|
|
697
715
|
* Decodes an `unknown` input against a schema synchronously, returning an
|
|
698
716
|
* `Exit` that is either a `Success` with the decoded value or a `Failure` with
|
|
699
|
-
* a {@link SchemaError}.
|
|
700
|
-
*
|
|
701
|
-
*
|
|
717
|
+
* a {@link SchemaError}.
|
|
718
|
+
*
|
|
719
|
+
* **When to use**
|
|
720
|
+
*
|
|
721
|
+
* Use when the input type is not statically known and decoding should return an
|
|
722
|
+
* `Exit` instead of failing or throwing.
|
|
723
|
+
*
|
|
724
|
+
* **Details**
|
|
725
|
+
*
|
|
726
|
+
* Only usable with schemas that have no `DecodingServices` requirement. Prefer
|
|
727
|
+
* {@link decodeExit} when the input is already typed as the schema's `Encoded`
|
|
728
|
+
* type.
|
|
702
729
|
* Options may be provided either when creating the decoder or when applying it;
|
|
703
730
|
* application options override creation options.
|
|
704
731
|
*
|
|
@@ -714,9 +741,17 @@ export function decodeUnknownExit(schema, options) {
|
|
|
714
741
|
/**
|
|
715
742
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
716
743
|
* synchronously, returning an `Exit` that is either a `Success` with the
|
|
717
|
-
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
718
|
-
*
|
|
719
|
-
*
|
|
744
|
+
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
745
|
+
*
|
|
746
|
+
* **When to use**
|
|
747
|
+
*
|
|
748
|
+
* Use when typed input should be decoded into an `Exit` instead of failing or
|
|
749
|
+
* throwing.
|
|
750
|
+
*
|
|
751
|
+
* **Details**
|
|
752
|
+
*
|
|
753
|
+
* Only usable with schemas that have no `DecodingServices` requirement. For
|
|
754
|
+
* `unknown` input use {@link decodeUnknownExit}.
|
|
720
755
|
* Options may be provided either when creating the decoder or when applying it;
|
|
721
756
|
* application options override creation options.
|
|
722
757
|
*
|
|
@@ -726,10 +761,17 @@ export function decodeUnknownExit(schema, options) {
|
|
|
726
761
|
export const decodeExit = decodeUnknownExit;
|
|
727
762
|
/**
|
|
728
763
|
* Decodes an `unknown` input against a schema, returning an `Option` that is
|
|
729
|
-
* `Some` with the decoded value on success or `None` on failure.
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
*
|
|
764
|
+
* `Some` with the decoded value on success or `None` on failure.
|
|
765
|
+
*
|
|
766
|
+
* **When to use**
|
|
767
|
+
*
|
|
768
|
+
* Use when the input type is not statically known and you only need to know
|
|
769
|
+
* whether decoding succeeded.
|
|
770
|
+
*
|
|
771
|
+
* **Details**
|
|
772
|
+
*
|
|
773
|
+
* Prefer this over {@link decodeUnknownExit} or {@link decodeUnknownEffect}
|
|
774
|
+
* when you don't need error details. For typed input use {@link decodeOption}.
|
|
733
775
|
* Options may be provided either when creating the decoder or when applying it;
|
|
734
776
|
* application options override creation options.
|
|
735
777
|
*
|
|
@@ -740,7 +782,15 @@ export const decodeUnknownOption = Parser.decodeUnknownOption;
|
|
|
740
782
|
/**
|
|
741
783
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
742
784
|
* returning an `Option` that is `Some` with the decoded value on success or
|
|
743
|
-
* `None` on failure.
|
|
785
|
+
* `None` on failure.
|
|
786
|
+
*
|
|
787
|
+
* **When to use**
|
|
788
|
+
*
|
|
789
|
+
* Use when typed input should be decoded and only success or failure matters.
|
|
790
|
+
*
|
|
791
|
+
* **Details**
|
|
792
|
+
*
|
|
793
|
+
* For `unknown` input use {@link decodeUnknownOption}.
|
|
744
794
|
* Options may be provided either when creating the decoder or when applying it;
|
|
745
795
|
* application options override creation options.
|
|
746
796
|
*
|
|
@@ -750,8 +800,16 @@ export const decodeUnknownOption = Parser.decodeUnknownOption;
|
|
|
750
800
|
export const decodeOption = Parser.decodeOption;
|
|
751
801
|
/**
|
|
752
802
|
* Decodes an `unknown` input against a schema, returning a `Result` that
|
|
753
|
-
* succeeds with the decoded value or fails with a schema issue.
|
|
754
|
-
*
|
|
803
|
+
* succeeds with the decoded value or fails with a schema issue.
|
|
804
|
+
*
|
|
805
|
+
* **When to use**
|
|
806
|
+
*
|
|
807
|
+
* Use when the input type is not statically known and decoding should return a
|
|
808
|
+
* `Result` with structured issue data.
|
|
809
|
+
*
|
|
810
|
+
* **Details**
|
|
811
|
+
*
|
|
812
|
+
* For typed input use {@link decodeResult}.
|
|
755
813
|
* Options may be provided either when creating the decoder or when applying it;
|
|
756
814
|
* application options override creation options.
|
|
757
815
|
*
|
|
@@ -762,7 +820,16 @@ export const decodeUnknownResult = Parser.decodeUnknownResult;
|
|
|
762
820
|
/**
|
|
763
821
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
764
822
|
* returning a `Result` that succeeds with the decoded value or fails with a
|
|
765
|
-
* schema issue.
|
|
823
|
+
* schema issue.
|
|
824
|
+
*
|
|
825
|
+
* **When to use**
|
|
826
|
+
*
|
|
827
|
+
* Use when typed input should be decoded into a `Result` with structured issue
|
|
828
|
+
* data.
|
|
829
|
+
*
|
|
830
|
+
* **Details**
|
|
831
|
+
*
|
|
832
|
+
* For `unknown` input use {@link decodeUnknownResult}.
|
|
766
833
|
* Options may be provided either when creating the decoder or when applying it;
|
|
767
834
|
* application options override creation options.
|
|
768
835
|
*
|
|
@@ -772,9 +839,15 @@ export const decodeUnknownResult = Parser.decodeUnknownResult;
|
|
|
772
839
|
export const decodeResult = Parser.decodeResult;
|
|
773
840
|
/**
|
|
774
841
|
* Decodes an `unknown` input against a schema, returning a `Promise` that
|
|
775
|
-
* resolves with the decoded value or rejects with a schema issue.
|
|
776
|
-
*
|
|
777
|
-
*
|
|
842
|
+
* resolves with the decoded value or rejects with a schema issue.
|
|
843
|
+
*
|
|
844
|
+
* **When to use**
|
|
845
|
+
*
|
|
846
|
+
* Use when integrating unknown input validation with Promise-based APIs.
|
|
847
|
+
*
|
|
848
|
+
* **Details**
|
|
849
|
+
*
|
|
850
|
+
* For typed input use {@link decodePromise}.
|
|
778
851
|
* Options may be provided either when creating the decoder or when applying it;
|
|
779
852
|
* application options override creation options.
|
|
780
853
|
*
|
|
@@ -785,10 +858,15 @@ export const decodeUnknownPromise = Parser.decodeUnknownPromise;
|
|
|
785
858
|
/**
|
|
786
859
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
787
860
|
* returning a `Promise` that resolves with the decoded value or rejects with a
|
|
788
|
-
* schema issue.
|
|
861
|
+
* schema issue.
|
|
862
|
+
*
|
|
863
|
+
* **When to use**
|
|
864
|
+
*
|
|
865
|
+
* Use when integrating typed input decoding with Promise-based APIs.
|
|
789
866
|
*
|
|
790
867
|
* **Details**
|
|
791
868
|
*
|
|
869
|
+
* For `unknown` input use `decodeUnknownPromise`.
|
|
792
870
|
* Options may be provided either when creating the decoder or when applying it;
|
|
793
871
|
* application options override creation options.
|
|
794
872
|
*
|
|
@@ -799,11 +877,15 @@ export const decodePromise = Parser.decodePromise;
|
|
|
799
877
|
/**
|
|
800
878
|
* Decodes an `unknown` input against a schema synchronously, returning the
|
|
801
879
|
* decoded value or throwing an `Error` whose cause contains the schema issue.
|
|
802
|
-
*
|
|
803
|
-
*
|
|
880
|
+
*
|
|
881
|
+
* **When to use**
|
|
882
|
+
*
|
|
883
|
+
* Use when validating unknown data at a boundary and treating schema mismatches
|
|
884
|
+
* as exceptions.
|
|
804
885
|
*
|
|
805
886
|
* **Details**
|
|
806
887
|
*
|
|
888
|
+
* For typed input use `decodeSync`.
|
|
807
889
|
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
808
890
|
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
809
891
|
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
@@ -833,10 +915,16 @@ export const decodeUnknownSync = Parser.decodeUnknownSync;
|
|
|
833
915
|
/**
|
|
834
916
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
835
917
|
* synchronously, returning the decoded value or throwing an `Error` whose cause
|
|
836
|
-
* contains the schema issue.
|
|
918
|
+
* contains the schema issue.
|
|
919
|
+
*
|
|
920
|
+
* **When to use**
|
|
921
|
+
*
|
|
922
|
+
* Use when typed input should be decoded synchronously and schema mismatches
|
|
923
|
+
* should throw.
|
|
837
924
|
*
|
|
838
925
|
* **Details**
|
|
839
926
|
*
|
|
927
|
+
* For `unknown` input use `decodeUnknownSync`.
|
|
840
928
|
* Only service-free schemas can be decoded synchronously. Options may be
|
|
841
929
|
* provided either when creating the decoder or when applying it; application
|
|
842
930
|
* options override creation options.
|
|
@@ -847,9 +935,16 @@ export const decodeUnknownSync = Parser.decodeUnknownSync;
|
|
|
847
935
|
export const decodeSync = Parser.decodeSync;
|
|
848
936
|
/**
|
|
849
937
|
* Encodes an `unknown` input against a schema, returning an `Effect` that
|
|
850
|
-
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
851
|
-
*
|
|
852
|
-
*
|
|
938
|
+
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
939
|
+
*
|
|
940
|
+
* **When to use**
|
|
941
|
+
*
|
|
942
|
+
* Use when encoding input whose type is not statically known.
|
|
943
|
+
*
|
|
944
|
+
* **Details**
|
|
945
|
+
*
|
|
946
|
+
* Prefer {@link encodeEffect} when the input is already typed as the schema's
|
|
947
|
+
* `Type`.
|
|
853
948
|
* Options may be provided either when creating the encoder or when applying it;
|
|
854
949
|
* application options override creation options.
|
|
855
950
|
*
|
|
@@ -876,8 +971,15 @@ export function encodeUnknownEffect(schema, options) {
|
|
|
876
971
|
/**
|
|
877
972
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
878
973
|
* `Effect` that succeeds with the encoded value or fails with a
|
|
879
|
-
* {@link SchemaError}.
|
|
880
|
-
*
|
|
974
|
+
* {@link SchemaError}.
|
|
975
|
+
*
|
|
976
|
+
* **When to use**
|
|
977
|
+
*
|
|
978
|
+
* Use when the input is already typed as the schema's `Type`.
|
|
979
|
+
*
|
|
980
|
+
* **Details**
|
|
981
|
+
*
|
|
982
|
+
* For `unknown` input use {@link encodeUnknownEffect}.
|
|
881
983
|
* Options may be provided either when creating the encoder or when applying it;
|
|
882
984
|
* application options override creation options.
|
|
883
985
|
*
|
|
@@ -888,9 +990,17 @@ export const encodeEffect = encodeUnknownEffect;
|
|
|
888
990
|
/**
|
|
889
991
|
* Encodes an `unknown` input against a schema synchronously, returning an
|
|
890
992
|
* `Exit` that is either a `Success` with the encoded value or a `Failure` with
|
|
891
|
-
* a {@link SchemaError}.
|
|
892
|
-
*
|
|
893
|
-
*
|
|
993
|
+
* a {@link SchemaError}.
|
|
994
|
+
*
|
|
995
|
+
* **When to use**
|
|
996
|
+
*
|
|
997
|
+
* Use when the input type is not statically known and encoding should return an
|
|
998
|
+
* `Exit` instead of failing or throwing.
|
|
999
|
+
*
|
|
1000
|
+
* **Details**
|
|
1001
|
+
*
|
|
1002
|
+
* Only usable with schemas that have no `EncodingServices` requirement. Prefer
|
|
1003
|
+
* {@link encodeExit} when the input is already typed as the schema's `Type`.
|
|
894
1004
|
* Options may be provided either when creating the encoder or when applying it;
|
|
895
1005
|
* application options override creation options.
|
|
896
1006
|
*
|
|
@@ -906,9 +1016,17 @@ export function encodeUnknownExit(schema, options) {
|
|
|
906
1016
|
/**
|
|
907
1017
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
908
1018
|
* returning an `Exit` that is either a `Success` with the encoded value or a
|
|
909
|
-
* `Failure` with a {@link SchemaError}.
|
|
910
|
-
*
|
|
911
|
-
*
|
|
1019
|
+
* `Failure` with a {@link SchemaError}.
|
|
1020
|
+
*
|
|
1021
|
+
* **When to use**
|
|
1022
|
+
*
|
|
1023
|
+
* Use when typed input should be encoded into an `Exit` instead of failing or
|
|
1024
|
+
* throwing.
|
|
1025
|
+
*
|
|
1026
|
+
* **Details**
|
|
1027
|
+
*
|
|
1028
|
+
* Only usable with schemas that have no `EncodingServices` requirement. For
|
|
1029
|
+
* `unknown` input use {@link encodeUnknownExit}.
|
|
912
1030
|
* Options may be provided either when creating the encoder or when applying it;
|
|
913
1031
|
* application options override creation options.
|
|
914
1032
|
*
|
|
@@ -918,10 +1036,17 @@ export function encodeUnknownExit(schema, options) {
|
|
|
918
1036
|
export const encodeExit = encodeUnknownExit;
|
|
919
1037
|
/**
|
|
920
1038
|
* Encodes an `unknown` input against a schema, returning an `Option` that is
|
|
921
|
-
* `Some` with the encoded value on success or `None` on failure.
|
|
922
|
-
*
|
|
923
|
-
*
|
|
924
|
-
*
|
|
1039
|
+
* `Some` with the encoded value on success or `None` on failure.
|
|
1040
|
+
*
|
|
1041
|
+
* **When to use**
|
|
1042
|
+
*
|
|
1043
|
+
* Use when the input type is not statically known and you only need to know
|
|
1044
|
+
* whether encoding succeeded.
|
|
1045
|
+
*
|
|
1046
|
+
* **Details**
|
|
1047
|
+
*
|
|
1048
|
+
* Prefer this over {@link encodeUnknownExit} or {@link encodeUnknownEffect}
|
|
1049
|
+
* when you don't need error details. For typed input use {@link encodeOption}.
|
|
925
1050
|
* Options may be provided either when creating the encoder or when applying it;
|
|
926
1051
|
* application options override creation options.
|
|
927
1052
|
*
|
|
@@ -932,7 +1057,15 @@ export const encodeUnknownOption = Parser.encodeUnknownOption;
|
|
|
932
1057
|
/**
|
|
933
1058
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
934
1059
|
* `Option` that is `Some` with the encoded value on success or `None` on
|
|
935
|
-
* failure.
|
|
1060
|
+
* failure.
|
|
1061
|
+
*
|
|
1062
|
+
* **When to use**
|
|
1063
|
+
*
|
|
1064
|
+
* Use when typed input should be encoded and only success or failure matters.
|
|
1065
|
+
*
|
|
1066
|
+
* **Details**
|
|
1067
|
+
*
|
|
1068
|
+
* For `unknown` input use {@link encodeUnknownOption}.
|
|
936
1069
|
* Options may be provided either when creating the encoder or when applying it;
|
|
937
1070
|
* application options override creation options.
|
|
938
1071
|
*
|
|
@@ -942,8 +1075,16 @@ export const encodeUnknownOption = Parser.encodeUnknownOption;
|
|
|
942
1075
|
export const encodeOption = Parser.encodeOption;
|
|
943
1076
|
/**
|
|
944
1077
|
* Encodes an `unknown` input against a schema, returning a `Result` that
|
|
945
|
-
* succeeds with the encoded value or fails with a schema issue.
|
|
946
|
-
*
|
|
1078
|
+
* succeeds with the encoded value or fails with a schema issue.
|
|
1079
|
+
*
|
|
1080
|
+
* **When to use**
|
|
1081
|
+
*
|
|
1082
|
+
* Use when the input type is not statically known and encoding should return a
|
|
1083
|
+
* `Result` with structured issue data.
|
|
1084
|
+
*
|
|
1085
|
+
* **Details**
|
|
1086
|
+
*
|
|
1087
|
+
* For typed input use {@link encodeResult}.
|
|
947
1088
|
* Options may be provided either when creating the encoder or when applying it;
|
|
948
1089
|
* application options override creation options.
|
|
949
1090
|
*
|
|
@@ -954,6 +1095,14 @@ export const encodeUnknownResult = Parser.encodeUnknownResult;
|
|
|
954
1095
|
/**
|
|
955
1096
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
956
1097
|
* `Result` that succeeds with the encoded value or fails with a schema issue.
|
|
1098
|
+
*
|
|
1099
|
+
* **When to use**
|
|
1100
|
+
*
|
|
1101
|
+
* Use when typed input should be encoded into a `Result` with structured issue
|
|
1102
|
+
* data.
|
|
1103
|
+
*
|
|
1104
|
+
* **Details**
|
|
1105
|
+
*
|
|
957
1106
|
* For `unknown` input use {@link encodeUnknownResult}.
|
|
958
1107
|
* Options may be provided either when creating the encoder or when applying it;
|
|
959
1108
|
* application options override creation options.
|
|
@@ -964,9 +1113,15 @@ export const encodeUnknownResult = Parser.encodeUnknownResult;
|
|
|
964
1113
|
export const encodeResult = Parser.encodeResult;
|
|
965
1114
|
/**
|
|
966
1115
|
* Encodes an `unknown` input against a schema, returning a `Promise` that
|
|
967
|
-
* resolves with the encoded value or rejects with a schema issue.
|
|
968
|
-
*
|
|
969
|
-
*
|
|
1116
|
+
* resolves with the encoded value or rejects with a schema issue.
|
|
1117
|
+
*
|
|
1118
|
+
* **When to use**
|
|
1119
|
+
*
|
|
1120
|
+
* Use when integrating unknown input serialization with Promise-based APIs.
|
|
1121
|
+
*
|
|
1122
|
+
* **Details**
|
|
1123
|
+
*
|
|
1124
|
+
* For typed input use {@link encodePromise}.
|
|
970
1125
|
* Options may be provided either when creating the encoder or when applying it;
|
|
971
1126
|
* application options override creation options.
|
|
972
1127
|
*
|
|
@@ -977,7 +1132,15 @@ export const encodeUnknownPromise = Parser.encodeUnknownPromise;
|
|
|
977
1132
|
/**
|
|
978
1133
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
979
1134
|
* `Promise` that resolves with the encoded value or rejects with a
|
|
980
|
-
* {@link SchemaError}.
|
|
1135
|
+
* {@link SchemaError}.
|
|
1136
|
+
*
|
|
1137
|
+
* **When to use**
|
|
1138
|
+
*
|
|
1139
|
+
* Use when integrating typed input serialization with Promise-based APIs.
|
|
1140
|
+
*
|
|
1141
|
+
* **Details**
|
|
1142
|
+
*
|
|
1143
|
+
* For `unknown` input use {@link encodeUnknownPromise}.
|
|
981
1144
|
* Options may be provided either when creating the encoder or when applying it;
|
|
982
1145
|
* application options override creation options.
|
|
983
1146
|
*
|
|
@@ -987,9 +1150,16 @@ export const encodeUnknownPromise = Parser.encodeUnknownPromise;
|
|
|
987
1150
|
export const encodePromise = Parser.encodePromise;
|
|
988
1151
|
/**
|
|
989
1152
|
* Encodes an `unknown` input against a schema synchronously, throwing a
|
|
990
|
-
* {@link SchemaError} on failure.
|
|
991
|
-
*
|
|
992
|
-
*
|
|
1153
|
+
* {@link SchemaError} on failure.
|
|
1154
|
+
*
|
|
1155
|
+
* **When to use**
|
|
1156
|
+
*
|
|
1157
|
+
* Use when serializing unknown data at a boundary and treating schema
|
|
1158
|
+
* mismatches as unrecoverable errors.
|
|
1159
|
+
*
|
|
1160
|
+
* **Details**
|
|
1161
|
+
*
|
|
1162
|
+
* For non-throwing alternatives see {@link encodeUnknownOption},
|
|
993
1163
|
* {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For typed input
|
|
994
1164
|
* use {@link encodeSync}.
|
|
995
1165
|
* Options may be provided either when creating the encoder or when applying it;
|
|
@@ -1001,8 +1171,16 @@ export const encodePromise = Parser.encodePromise;
|
|
|
1001
1171
|
export const encodeUnknownSync = Parser.encodeUnknownSync;
|
|
1002
1172
|
/**
|
|
1003
1173
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1004
|
-
* throwing a {@link SchemaError} on failure.
|
|
1005
|
-
*
|
|
1174
|
+
* throwing a {@link SchemaError} on failure.
|
|
1175
|
+
*
|
|
1176
|
+
* **When to use**
|
|
1177
|
+
*
|
|
1178
|
+
* Use when typed input should be encoded synchronously and schema mismatches
|
|
1179
|
+
* should throw.
|
|
1180
|
+
*
|
|
1181
|
+
* **Details**
|
|
1182
|
+
*
|
|
1183
|
+
* For `unknown` input use {@link encodeUnknownSync}.
|
|
1006
1184
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1007
1185
|
* application options override creation options.
|
|
1008
1186
|
*
|
|
@@ -1055,7 +1233,7 @@ export function asClass(schema) {
|
|
|
1055
1233
|
return Object.setPrototypeOf(Class, schema);
|
|
1056
1234
|
}
|
|
1057
1235
|
/**
|
|
1058
|
-
*
|
|
1236
|
+
* Checks whether a value is a `Schema`.
|
|
1059
1237
|
*
|
|
1060
1238
|
* @category guards
|
|
1061
1239
|
* @since 3.10.0
|
|
@@ -1089,8 +1267,12 @@ export const optionalKey = /*#__PURE__*/Struct_.lambda(schema => make(AST.option
|
|
|
1089
1267
|
schema
|
|
1090
1268
|
}));
|
|
1091
1269
|
/**
|
|
1092
|
-
* Reverses
|
|
1093
|
-
*
|
|
1270
|
+
* Reverses `optionalKey` and returns the inner required schema.
|
|
1271
|
+
*
|
|
1272
|
+
* **When to use**
|
|
1273
|
+
*
|
|
1274
|
+
* Use to remove optional-key wrapping from a schema field that was previously
|
|
1275
|
+
* wrapped with {@link optionalKey}.
|
|
1094
1276
|
*
|
|
1095
1277
|
* @category combinators
|
|
1096
1278
|
* @since 4.0.0
|
|
@@ -1127,8 +1309,16 @@ export const requiredKey = /*#__PURE__*/Struct_.lambda(self => self.schema);
|
|
|
1127
1309
|
*/
|
|
1128
1310
|
export const optional = /*#__PURE__*/Struct_.lambda(self => optionalKey(UndefinedOr(self)));
|
|
1129
1311
|
/**
|
|
1130
|
-
* Reverses
|
|
1131
|
-
*
|
|
1312
|
+
* Reverses `optional` and returns the inner schema.
|
|
1313
|
+
*
|
|
1314
|
+
* **When to use**
|
|
1315
|
+
*
|
|
1316
|
+
* Use to remove optional wrapping from a schema field that was previously
|
|
1317
|
+
* wrapped with {@link optional}.
|
|
1318
|
+
*
|
|
1319
|
+
* **Details**
|
|
1320
|
+
*
|
|
1321
|
+
* This also unwraps the `UndefinedOr` member added by `optional`.
|
|
1132
1322
|
*
|
|
1133
1323
|
* @category combinators
|
|
1134
1324
|
* @since 3.10.0
|
|
@@ -1145,8 +1335,12 @@ export const mutableKey = /*#__PURE__*/Struct_.lambda(schema => make(AST.mutable
|
|
|
1145
1335
|
schema
|
|
1146
1336
|
}));
|
|
1147
1337
|
/**
|
|
1148
|
-
* Reverses
|
|
1149
|
-
*
|
|
1338
|
+
* Reverses `mutableKey` and returns the inner readonly schema.
|
|
1339
|
+
*
|
|
1340
|
+
* **When to use**
|
|
1341
|
+
*
|
|
1342
|
+
* Use to remove mutable-key wrapping from a schema field that was previously
|
|
1343
|
+
* wrapped with {@link mutableKey}.
|
|
1150
1344
|
*
|
|
1151
1345
|
* @category combinators
|
|
1152
1346
|
* @since 4.0.0
|
|
@@ -1241,8 +1435,17 @@ export function TemplateLiteral(parts) {
|
|
|
1241
1435
|
});
|
|
1242
1436
|
}
|
|
1243
1437
|
/**
|
|
1244
|
-
*
|
|
1245
|
-
*
|
|
1438
|
+
* Schema for parsing template literal matches into typed tuple parts.
|
|
1439
|
+
*
|
|
1440
|
+
* **When to use**
|
|
1441
|
+
*
|
|
1442
|
+
* Use to validate a template literal string and decode the matched parts into
|
|
1443
|
+
* typed values.
|
|
1444
|
+
*
|
|
1445
|
+
* **Details**
|
|
1446
|
+
*
|
|
1447
|
+
* Unlike {@link TemplateLiteral}, this schema decodes the matched string into a
|
|
1448
|
+
* readonly tuple with one element per schema part.
|
|
1246
1449
|
*
|
|
1247
1450
|
* **Example** (Parse path parameters)
|
|
1248
1451
|
*
|
|
@@ -1463,8 +1666,16 @@ export function Struct(fields) {
|
|
|
1463
1666
|
return makeStruct(AST.struct(fields, undefined), fields);
|
|
1464
1667
|
}
|
|
1465
1668
|
/**
|
|
1466
|
-
*
|
|
1467
|
-
*
|
|
1669
|
+
* Adds fields to a struct schema through a struct-mapping lambda.
|
|
1670
|
+
*
|
|
1671
|
+
* **When to use**
|
|
1672
|
+
*
|
|
1673
|
+
* Use to add the same fields to an existing struct or to every struct member of
|
|
1674
|
+
* a union.
|
|
1675
|
+
*
|
|
1676
|
+
* **Details**
|
|
1677
|
+
*
|
|
1678
|
+
* This is a shortcut for `MyStruct.mapFields(Struct.assign(fields))`.
|
|
1468
1679
|
*
|
|
1469
1680
|
* **Example** (Adding fields to a union of structs)
|
|
1470
1681
|
*
|
|
@@ -1949,8 +2160,8 @@ export function suspend(f) {
|
|
|
1949
2160
|
return make(new AST.Suspend(() => f().ast));
|
|
1950
2161
|
}
|
|
1951
2162
|
/**
|
|
1952
|
-
*
|
|
1953
|
-
*
|
|
2163
|
+
* Attaches one or more filter checks to a schema without changing the
|
|
2164
|
+
* TypeScript type.
|
|
1954
2165
|
*
|
|
1955
2166
|
* **Example** (Adding checks to a schema)
|
|
1956
2167
|
*
|
|
@@ -2111,7 +2322,7 @@ export function catchDecoding(f) {
|
|
|
2111
2322
|
return catchDecodingWithContext(f);
|
|
2112
2323
|
}
|
|
2113
2324
|
/**
|
|
2114
|
-
*
|
|
2325
|
+
* Recovers from a decoding error with a handler that may require Effect services.
|
|
2115
2326
|
*
|
|
2116
2327
|
* **When to use**
|
|
2117
2328
|
*
|
|
@@ -2148,7 +2359,7 @@ export function catchEncoding(f) {
|
|
|
2148
2359
|
return catchEncodingWithContext(f);
|
|
2149
2360
|
}
|
|
2150
2361
|
/**
|
|
2151
|
-
*
|
|
2362
|
+
* Recovers from an encoding error with a handler that may require Effect services.
|
|
2152
2363
|
*
|
|
2153
2364
|
* **When to use**
|
|
2154
2365
|
*
|
|
@@ -2458,9 +2669,17 @@ export function tag(literal) {
|
|
|
2458
2669
|
return Literal(literal).pipe(withConstructorDefault(Effect.succeed(literal)));
|
|
2459
2670
|
}
|
|
2460
2671
|
/**
|
|
2461
|
-
*
|
|
2462
|
-
*
|
|
2463
|
-
*
|
|
2672
|
+
* Creates a literal `_tag` schema that is omitted from encoded output.
|
|
2673
|
+
*
|
|
2674
|
+
* **When to use**
|
|
2675
|
+
*
|
|
2676
|
+
* Use to decode data that omits the discriminator field while still constructing
|
|
2677
|
+
* values with a `_tag` for tagged union matching.
|
|
2678
|
+
*
|
|
2679
|
+
* **Details**
|
|
2680
|
+
*
|
|
2681
|
+
* The tag is filled during decoding and construction, like {@link tag}, but is
|
|
2682
|
+
* omitted when encoding.
|
|
2464
2683
|
*
|
|
2465
2684
|
* **Example** (Tag omitted during encoding)
|
|
2466
2685
|
*
|
|
@@ -2487,9 +2706,11 @@ export function tagDefaultOmit(literal) {
|
|
|
2487
2706
|
}));
|
|
2488
2707
|
}
|
|
2489
2708
|
/**
|
|
2490
|
-
*
|
|
2491
|
-
*
|
|
2492
|
-
*
|
|
2709
|
+
* Creates a struct schema with an automatically populated `_tag` field.
|
|
2710
|
+
*
|
|
2711
|
+
* **When to use**
|
|
2712
|
+
*
|
|
2713
|
+
* Use to define a tagged union case from a literal tag and a set of fields.
|
|
2493
2714
|
*
|
|
2494
2715
|
* **Details**
|
|
2495
2716
|
*
|
|
@@ -3251,8 +3472,8 @@ export function isFinite(annotations) {
|
|
|
3251
3472
|
});
|
|
3252
3473
|
}
|
|
3253
3474
|
/**
|
|
3254
|
-
*
|
|
3255
|
-
*
|
|
3475
|
+
* Creates a greater-than (`>`) check for any ordered type from an
|
|
3476
|
+
* `Order.Order` instance.
|
|
3256
3477
|
*
|
|
3257
3478
|
* @category Order checks
|
|
3258
3479
|
* @since 4.0.0
|
|
@@ -3269,8 +3490,8 @@ export function makeIsGreaterThan(options) {
|
|
|
3269
3490
|
};
|
|
3270
3491
|
}
|
|
3271
3492
|
/**
|
|
3272
|
-
*
|
|
3273
|
-
*
|
|
3493
|
+
* Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
|
|
3494
|
+
* `Order.Order` instance.
|
|
3274
3495
|
*
|
|
3275
3496
|
* @category Order checks
|
|
3276
3497
|
* @since 4.0.0
|
|
@@ -3287,8 +3508,8 @@ export function makeIsGreaterThanOrEqualTo(options) {
|
|
|
3287
3508
|
};
|
|
3288
3509
|
}
|
|
3289
3510
|
/**
|
|
3290
|
-
*
|
|
3291
|
-
*
|
|
3511
|
+
* Creates a less-than (`<`) check for any ordered type from an `Order.Order`
|
|
3512
|
+
* instance.
|
|
3292
3513
|
*
|
|
3293
3514
|
* @category Order checks
|
|
3294
3515
|
* @since 4.0.0
|
|
@@ -3305,8 +3526,8 @@ export function makeIsLessThan(options) {
|
|
|
3305
3526
|
};
|
|
3306
3527
|
}
|
|
3307
3528
|
/**
|
|
3308
|
-
*
|
|
3309
|
-
*
|
|
3529
|
+
* Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
|
|
3530
|
+
* `Order.Order` instance.
|
|
3310
3531
|
*
|
|
3311
3532
|
* @category Order checks
|
|
3312
3533
|
* @since 4.0.0
|
|
@@ -3323,8 +3544,8 @@ export function makeIsLessThanOrEqualTo(options) {
|
|
|
3323
3544
|
};
|
|
3324
3545
|
}
|
|
3325
3546
|
/**
|
|
3326
|
-
*
|
|
3327
|
-
*
|
|
3547
|
+
* Creates an inclusive or exclusive range check for any ordered type from an
|
|
3548
|
+
* `Order.Order` instance.
|
|
3328
3549
|
*
|
|
3329
3550
|
* @category Order checks
|
|
3330
3551
|
* @since 4.0.0
|
|
@@ -3346,8 +3567,8 @@ export function makeIsBetween(deriveOptions) {
|
|
|
3346
3567
|
};
|
|
3347
3568
|
}
|
|
3348
3569
|
/**
|
|
3349
|
-
*
|
|
3350
|
-
*
|
|
3570
|
+
* Creates a divisibility check for any numeric type from a remainder function
|
|
3571
|
+
* and a zero value.
|
|
3351
3572
|
*
|
|
3352
3573
|
* @category Numeric checks
|
|
3353
3574
|
* @since 4.0.0
|
|
@@ -4506,7 +4727,7 @@ export function isUnique(annotations) {
|
|
|
4506
4727
|
});
|
|
4507
4728
|
}
|
|
4508
4729
|
/**
|
|
4509
|
-
*
|
|
4730
|
+
* Schema for non-empty strings. Validates that a string has at least one
|
|
4510
4731
|
* character.
|
|
4511
4732
|
*
|
|
4512
4733
|
* @category String
|
|
@@ -4514,7 +4735,7 @@ export function isUnique(annotations) {
|
|
|
4514
4735
|
*/
|
|
4515
4736
|
export const NonEmptyString = /*#__PURE__*/String.check(/*#__PURE__*/isNonEmpty());
|
|
4516
4737
|
/**
|
|
4517
|
-
*
|
|
4738
|
+
* Schema for strings whose JavaScript `length` is exactly `1`.
|
|
4518
4739
|
*
|
|
4519
4740
|
* **When to use**
|
|
4520
4741
|
*
|
|
@@ -4534,7 +4755,7 @@ export const NonEmptyString = /*#__PURE__*/String.check(/*#__PURE__*/isNonEmpty(
|
|
|
4534
4755
|
*/
|
|
4535
4756
|
export const Char = /*#__PURE__*/String.check(/*#__PURE__*/isLengthBetween(1, 1));
|
|
4536
4757
|
/**
|
|
4537
|
-
*
|
|
4758
|
+
* Schema for `Option<A>` values.
|
|
4538
4759
|
*
|
|
4539
4760
|
* @category Option
|
|
4540
4761
|
* @since 3.10.0
|
|
@@ -4718,9 +4939,9 @@ export function OptionFromOptionalNullOr(schema, options) {
|
|
|
4718
4939
|
})));
|
|
4719
4940
|
}
|
|
4720
4941
|
/**
|
|
4721
|
-
*
|
|
4942
|
+
* Schema for `Result<A, E>` values.
|
|
4722
4943
|
*
|
|
4723
|
-
* @category
|
|
4944
|
+
* @category schemas
|
|
4724
4945
|
* @since 4.0.0
|
|
4725
4946
|
*/
|
|
4726
4947
|
export function Result(success, failure) {
|
|
@@ -4784,8 +5005,8 @@ export function Result(success, failure) {
|
|
|
4784
5005
|
});
|
|
4785
5006
|
}
|
|
4786
5007
|
/**
|
|
4787
|
-
*
|
|
4788
|
-
*
|
|
5008
|
+
* Schema for values that hide sensitive information from error output and
|
|
5009
|
+
* inspection.
|
|
4789
5010
|
*
|
|
4790
5011
|
* **Details**
|
|
4791
5012
|
*
|
|
@@ -5068,7 +5289,7 @@ const ErrorJsonEncoded = /*#__PURE__*/Struct({
|
|
|
5068
5289
|
stack: /*#__PURE__*/optionalKey(String)
|
|
5069
5290
|
});
|
|
5070
5291
|
/**
|
|
5071
|
-
*
|
|
5292
|
+
* Schema for JavaScript `Error` objects.
|
|
5072
5293
|
*
|
|
5073
5294
|
* **Details**
|
|
5074
5295
|
*
|
|
@@ -5093,7 +5314,7 @@ export const Error = /*#__PURE__*/instanceOf(globalThis.Error, {
|
|
|
5093
5314
|
toArbitrary: () => fc => fc.string().map(message => new globalThis.Error(message))
|
|
5094
5315
|
});
|
|
5095
5316
|
/**
|
|
5096
|
-
*
|
|
5317
|
+
* Schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
5097
5318
|
* encoded form.
|
|
5098
5319
|
*
|
|
5099
5320
|
* **Details**
|
|
@@ -5127,7 +5348,7 @@ const defectTransformation = /*#__PURE__*/new Transformation.Transformation(/*#_
|
|
|
5127
5348
|
}
|
|
5128
5349
|
}));
|
|
5129
5350
|
/**
|
|
5130
|
-
*
|
|
5351
|
+
* Schema for defect values, accepting either JavaScript `Error` values encoded
|
|
5131
5352
|
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
5132
5353
|
*
|
|
5133
5354
|
* **Details**
|
|
@@ -5144,8 +5365,7 @@ export const Defect = /*#__PURE__*/Union([/*#__PURE__*/ErrorJsonEncoded.pipe(/*#
|
|
|
5144
5365
|
toArbitrary: () => fc => fc.json()
|
|
5145
5366
|
}), defectTransformation))]);
|
|
5146
5367
|
/**
|
|
5147
|
-
*
|
|
5148
|
-
* encoded form.
|
|
5368
|
+
* Schema for defects that also includes stack traces in the encoded form.
|
|
5149
5369
|
*
|
|
5150
5370
|
* @category Defect
|
|
5151
5371
|
* @since 4.0.0
|
|
@@ -5244,8 +5464,8 @@ export function Exit(value, error, defect) {
|
|
|
5244
5464
|
});
|
|
5245
5465
|
}
|
|
5246
5466
|
/**
|
|
5247
|
-
*
|
|
5248
|
-
*
|
|
5467
|
+
* Schema for readonly maps whose keys and values conform to the provided
|
|
5468
|
+
* schemas.
|
|
5249
5469
|
*
|
|
5250
5470
|
* @category ReadonlyMap
|
|
5251
5471
|
* @since 3.10.0
|
|
@@ -5297,8 +5517,7 @@ export function ReadonlyMap(key, value) {
|
|
|
5297
5517
|
});
|
|
5298
5518
|
}
|
|
5299
5519
|
/**
|
|
5300
|
-
*
|
|
5301
|
-
* conform to the provided schemas.
|
|
5520
|
+
* Schema for hash maps whose keys and values conform to the provided schemas.
|
|
5302
5521
|
*
|
|
5303
5522
|
* @category HashMap
|
|
5304
5523
|
* @since 3.10.0
|
|
@@ -5351,8 +5570,7 @@ export function HashMap(key, value) {
|
|
|
5351
5570
|
});
|
|
5352
5571
|
}
|
|
5353
5572
|
/**
|
|
5354
|
-
*
|
|
5355
|
-
* provided element schema.
|
|
5573
|
+
* Schema for readonly sets whose values conform to the provided element schema.
|
|
5356
5574
|
*
|
|
5357
5575
|
* @category ReadonlySet
|
|
5358
5576
|
* @since 3.10.0
|
|
@@ -5403,8 +5621,7 @@ export function ReadonlySet(value) {
|
|
|
5403
5621
|
});
|
|
5404
5622
|
}
|
|
5405
5623
|
/**
|
|
5406
|
-
*
|
|
5407
|
-
* provided schema.
|
|
5624
|
+
* Schema for hash sets whose values conform to the provided element schema.
|
|
5408
5625
|
*
|
|
5409
5626
|
* @category HashSet
|
|
5410
5627
|
* @since 3.10.0
|
|
@@ -5455,8 +5672,7 @@ export function HashSet(value) {
|
|
|
5455
5672
|
});
|
|
5456
5673
|
}
|
|
5457
5674
|
/**
|
|
5458
|
-
*
|
|
5459
|
-
* provided schema.
|
|
5675
|
+
* Schema for chunks whose values conform to the provided element schema.
|
|
5460
5676
|
*
|
|
5461
5677
|
* @category Chunk
|
|
5462
5678
|
* @since 3.10.0
|
|
@@ -5551,7 +5767,7 @@ const URLString = /*#__PURE__*/String.annotate({
|
|
|
5551
5767
|
expected: "a string that will be decoded as a URL"
|
|
5552
5768
|
});
|
|
5553
5769
|
/**
|
|
5554
|
-
*
|
|
5770
|
+
* Schema for JavaScript `URL` objects.
|
|
5555
5771
|
*
|
|
5556
5772
|
* **Details**
|
|
5557
5773
|
*
|
|
@@ -5576,7 +5792,7 @@ export const URL = /*#__PURE__*/instanceOf(globalThis.URL, {
|
|
|
5576
5792
|
toEquivalence: () => (a, b) => a.toString() === b.toString()
|
|
5577
5793
|
});
|
|
5578
5794
|
/**
|
|
5579
|
-
*
|
|
5795
|
+
* Schema that decodes a `string` into a `URL`.
|
|
5580
5796
|
*
|
|
5581
5797
|
* **Details**
|
|
5582
5798
|
*
|
|
@@ -5594,7 +5810,7 @@ const DateString = /*#__PURE__*/String.annotate({
|
|
|
5594
5810
|
expected: "a string in ISO 8601 format that will be decoded as a Date"
|
|
5595
5811
|
});
|
|
5596
5812
|
/**
|
|
5597
|
-
*
|
|
5813
|
+
* Schema for JavaScript `Date` objects.
|
|
5598
5814
|
*
|
|
5599
5815
|
* **When to use**
|
|
5600
5816
|
*
|
|
@@ -5634,7 +5850,7 @@ export const Date = /*#__PURE__*/instanceOf(globalThis.Date, {
|
|
|
5634
5850
|
toArbitrary: () => (fc, ctx) => fc.date(ctx?.constraints?.date)
|
|
5635
5851
|
});
|
|
5636
5852
|
/**
|
|
5637
|
-
*
|
|
5853
|
+
* Schema that decodes a string into a JavaScript `Date`.
|
|
5638
5854
|
*
|
|
5639
5855
|
* **When to use**
|
|
5640
5856
|
*
|
|
@@ -5662,7 +5878,7 @@ export const Date = /*#__PURE__*/instanceOf(globalThis.Date, {
|
|
|
5662
5878
|
*/
|
|
5663
5879
|
export const DateFromString = /*#__PURE__*/DateString.pipe(/*#__PURE__*/decodeTo(Date, Transformation.dateFromString));
|
|
5664
5880
|
/**
|
|
5665
|
-
*
|
|
5881
|
+
* Schema for **valid** JavaScript `Date` objects.
|
|
5666
5882
|
*
|
|
5667
5883
|
* **Details**
|
|
5668
5884
|
*
|
|
@@ -5674,7 +5890,7 @@ export const DateFromString = /*#__PURE__*/DateString.pipe(/*#__PURE__*/decodeTo
|
|
|
5674
5890
|
*/
|
|
5675
5891
|
export const DateValid = /*#__PURE__*/Date.check(/*#__PURE__*/isDateValid());
|
|
5676
5892
|
/**
|
|
5677
|
-
*
|
|
5893
|
+
* Schema for `Duration` values.
|
|
5678
5894
|
*
|
|
5679
5895
|
* **Details**
|
|
5680
5896
|
*
|
|
@@ -5758,7 +5974,7 @@ const DurationString = /*#__PURE__*/String.annotate({
|
|
|
5758
5974
|
expected: "a string that will be decoded as a Duration"
|
|
5759
5975
|
});
|
|
5760
5976
|
/**
|
|
5761
|
-
*
|
|
5977
|
+
* Schema that parses a string into a `Duration`.
|
|
5762
5978
|
*
|
|
5763
5979
|
* **Details**
|
|
5764
5980
|
*
|
|
@@ -5775,7 +5991,7 @@ const DurationString = /*#__PURE__*/String.annotate({
|
|
|
5775
5991
|
export const DurationFromString = /*#__PURE__*/DurationString.pipe(/*#__PURE__*/decodeTo(Duration, Transformation.durationFromString));
|
|
5776
5992
|
const bigint0 = /*#__PURE__*/globalThis.BigInt(0);
|
|
5777
5993
|
/**
|
|
5778
|
-
*
|
|
5994
|
+
* Schema that decodes a non-negative `bigint` into a
|
|
5779
5995
|
* `Duration`, treating the bigint as nanoseconds.
|
|
5780
5996
|
*
|
|
5781
5997
|
* **Details**
|
|
@@ -5793,7 +6009,7 @@ const bigint0 = /*#__PURE__*/globalThis.BigInt(0);
|
|
|
5793
6009
|
*/
|
|
5794
6010
|
export const DurationFromNanos = /*#__PURE__*/BigInt.check(isGreaterThanOrEqualToBigInt(bigint0)).pipe(/*#__PURE__*/decodeTo(Duration, Transformation.durationFromNanos));
|
|
5795
6011
|
/**
|
|
5796
|
-
*
|
|
6012
|
+
* Schema that decodes a non-negative (possibly infinite)
|
|
5797
6013
|
* integer into a `Duration`, treating the integer value as the duration in
|
|
5798
6014
|
* milliseconds.
|
|
5799
6015
|
*
|
|
@@ -5815,12 +6031,12 @@ const BigDecimalString = /*#__PURE__*/String.annotate({
|
|
|
5815
6031
|
expected: "a string that will be decoded as a BigDecimal"
|
|
5816
6032
|
});
|
|
5817
6033
|
/**
|
|
5818
|
-
*
|
|
6034
|
+
* Schema for `BigDecimal` values.
|
|
5819
6035
|
*
|
|
5820
6036
|
* **When to use**
|
|
5821
6037
|
*
|
|
5822
|
-
* Use when values are already
|
|
5823
|
-
* formatting, equivalence, and JSON string serialization.
|
|
6038
|
+
* Use when values are already Effect decimal instances and need schema
|
|
6039
|
+
* validation, formatting, equivalence, and JSON string serialization.
|
|
5824
6040
|
*
|
|
5825
6041
|
* **Details**
|
|
5826
6042
|
*
|
|
@@ -5852,7 +6068,7 @@ export const BigDecimal = /*#__PURE__*/declare(BigDecimal_.isBigDecimal, {
|
|
|
5852
6068
|
toEquivalence: () => BigDecimal_.Equivalence
|
|
5853
6069
|
});
|
|
5854
6070
|
/**
|
|
5855
|
-
*
|
|
6071
|
+
* Schema that parses a string into a `BigDecimal`.
|
|
5856
6072
|
*
|
|
5857
6073
|
* **When to use**
|
|
5858
6074
|
*
|
|
@@ -5880,7 +6096,7 @@ export const BigDecimal = /*#__PURE__*/declare(BigDecimal_.isBigDecimal, {
|
|
|
5880
6096
|
*/
|
|
5881
6097
|
export const BigDecimalFromString = /*#__PURE__*/BigDecimalString.pipe(/*#__PURE__*/decodeTo(BigDecimal, Transformation.bigDecimalFromString));
|
|
5882
6098
|
/**
|
|
5883
|
-
*
|
|
6099
|
+
* Schema that decodes a JSON-encoded string into an `unknown` value.
|
|
5884
6100
|
*
|
|
5885
6101
|
* **Details**
|
|
5886
6102
|
*
|
|
@@ -6084,9 +6300,11 @@ export const FormData = /*#__PURE__*/instanceOf(globalThis.FormData, {
|
|
|
6084
6300
|
}))
|
|
6085
6301
|
});
|
|
6086
6302
|
/**
|
|
6087
|
-
*
|
|
6088
|
-
*
|
|
6089
|
-
*
|
|
6303
|
+
* Schema for decoding `FormData` through a bracket-notation tree.
|
|
6304
|
+
*
|
|
6305
|
+
* **When to use**
|
|
6306
|
+
*
|
|
6307
|
+
* Use to decode browser or multipart form data into a structured schema value.
|
|
6090
6308
|
*
|
|
6091
6309
|
* **Details**
|
|
6092
6310
|
*
|
|
@@ -6199,9 +6417,11 @@ export const URLSearchParams = /*#__PURE__*/instanceOf(globalThis.URLSearchParam
|
|
|
6199
6417
|
}))
|
|
6200
6418
|
});
|
|
6201
6419
|
/**
|
|
6202
|
-
*
|
|
6203
|
-
*
|
|
6204
|
-
*
|
|
6420
|
+
* Schema for decoding `URLSearchParams` through a bracket-notation tree.
|
|
6421
|
+
*
|
|
6422
|
+
* **When to use**
|
|
6423
|
+
*
|
|
6424
|
+
* Use to decode query parameters into a structured schema value.
|
|
6205
6425
|
*
|
|
6206
6426
|
* **Details**
|
|
6207
6427
|
*
|
|
@@ -6280,21 +6500,21 @@ export function fromURLSearchParams(schema) {
|
|
|
6280
6500
|
return URLSearchParams.pipe(decodeTo(schema, Transformation.fromURLSearchParams));
|
|
6281
6501
|
}
|
|
6282
6502
|
/**
|
|
6283
|
-
*
|
|
6503
|
+
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
6284
6504
|
*
|
|
6285
6505
|
* @category Number
|
|
6286
6506
|
* @since 3.10.0
|
|
6287
6507
|
*/
|
|
6288
6508
|
export const Finite = /*#__PURE__*/Number.check(/*#__PURE__*/isFinite());
|
|
6289
6509
|
/**
|
|
6290
|
-
*
|
|
6510
|
+
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
6291
6511
|
*
|
|
6292
6512
|
* @category Number
|
|
6293
6513
|
* @since 3.10.0
|
|
6294
6514
|
*/
|
|
6295
6515
|
export const Int = /*#__PURE__*/Number.check(/*#__PURE__*/isInt());
|
|
6296
6516
|
/**
|
|
6297
|
-
*
|
|
6517
|
+
* Schema that parses a string into a `number` using JavaScript
|
|
6298
6518
|
* number coercion.
|
|
6299
6519
|
*
|
|
6300
6520
|
* **Details**
|
|
@@ -6314,7 +6534,7 @@ export const NumberFromString = /*#__PURE__*/String.annotate({
|
|
|
6314
6534
|
expected: "a string that will be decoded as a number"
|
|
6315
6535
|
}).pipe(/*#__PURE__*/decodeTo(Number, Transformation.numberFromString));
|
|
6316
6536
|
/**
|
|
6317
|
-
*
|
|
6537
|
+
* Schema that parses a string into a finite number.
|
|
6318
6538
|
*
|
|
6319
6539
|
* **Details**
|
|
6320
6540
|
*
|
|
@@ -6332,7 +6552,7 @@ export const FiniteFromString = /*#__PURE__*/String.annotate({
|
|
|
6332
6552
|
expected: "a string that will be decoded as a finite number"
|
|
6333
6553
|
}).pipe(/*#__PURE__*/decodeTo(Finite, Transformation.numberFromString));
|
|
6334
6554
|
/**
|
|
6335
|
-
*
|
|
6555
|
+
* Schema that parses a string into a `bigint`.
|
|
6336
6556
|
*
|
|
6337
6557
|
* **When to use**
|
|
6338
6558
|
*
|
|
@@ -6361,14 +6581,14 @@ export const FiniteFromString = /*#__PURE__*/String.annotate({
|
|
|
6361
6581
|
*/
|
|
6362
6582
|
export const BigIntFromString = /*#__PURE__*/make(AST.bigIntString).pipe(/*#__PURE__*/decodeTo(BigInt, Transformation.bigintFromString));
|
|
6363
6583
|
/**
|
|
6364
|
-
*
|
|
6584
|
+
* Schema for strings that contains no leading or trailing whitespaces.
|
|
6365
6585
|
*
|
|
6366
6586
|
* @category String
|
|
6367
6587
|
* @since 3.10.0
|
|
6368
6588
|
*/
|
|
6369
6589
|
export const Trimmed = /*#__PURE__*/String.check(/*#__PURE__*/isTrimmed());
|
|
6370
6590
|
/**
|
|
6371
|
-
*
|
|
6591
|
+
* Schema that trims whitespace from a string.
|
|
6372
6592
|
*
|
|
6373
6593
|
* **Details**
|
|
6374
6594
|
*
|
|
@@ -6472,7 +6692,7 @@ export const StringFromUriComponent = /*#__PURE__*/String.annotate({
|
|
|
6472
6692
|
expected: "a URI component encoded string that will be decoded as a UTF-8 string"
|
|
6473
6693
|
}).pipe(/*#__PURE__*/decodeTo(String, Transformation.stringFromUriComponent));
|
|
6474
6694
|
/**
|
|
6475
|
-
*
|
|
6695
|
+
* Schema for property keys accepted by Effect schemas: finite `number`,
|
|
6476
6696
|
* `symbol`, or `string`.
|
|
6477
6697
|
*
|
|
6478
6698
|
* @category PropertyKey
|
|
@@ -6499,7 +6719,7 @@ export const StandardSchemaV1FailureResult = /*#__PURE__*/Struct({
|
|
|
6499
6719
|
}))
|
|
6500
6720
|
});
|
|
6501
6721
|
/**
|
|
6502
|
-
*
|
|
6722
|
+
* Schema for a boolean parsed from 0 or 1.
|
|
6503
6723
|
*
|
|
6504
6724
|
* **When to use**
|
|
6505
6725
|
*
|
|
@@ -6527,7 +6747,7 @@ const Base64String = /*#__PURE__*/String.annotate({
|
|
|
6527
6747
|
contentEncoding: "base64"
|
|
6528
6748
|
});
|
|
6529
6749
|
/**
|
|
6530
|
-
*
|
|
6750
|
+
* Schema for JavaScript `Uint8Array` objects.
|
|
6531
6751
|
*
|
|
6532
6752
|
* **Details**
|
|
6533
6753
|
*
|
|
@@ -6551,7 +6771,7 @@ export const Uint8Array = /*#__PURE__*/instanceOf(globalThis.Uint8Array, {
|
|
|
6551
6771
|
toArbitrary: () => fc => fc.uint8Array()
|
|
6552
6772
|
});
|
|
6553
6773
|
/**
|
|
6554
|
-
*
|
|
6774
|
+
* Schema that decodes a base64 encoded string into a
|
|
6555
6775
|
* `Uint8Array`.
|
|
6556
6776
|
*
|
|
6557
6777
|
* **Details**
|
|
@@ -6567,7 +6787,7 @@ export const Uint8Array = /*#__PURE__*/instanceOf(globalThis.Uint8Array, {
|
|
|
6567
6787
|
*/
|
|
6568
6788
|
export const Uint8ArrayFromBase64 = /*#__PURE__*/Base64String.pipe(/*#__PURE__*/decodeTo(Uint8Array, Transformation.uint8ArrayFromBase64String));
|
|
6569
6789
|
/**
|
|
6570
|
-
*
|
|
6790
|
+
* Schema that decodes a base64 (URL) encoded string into a
|
|
6571
6791
|
* `Uint8Array`.
|
|
6572
6792
|
*
|
|
6573
6793
|
* **Details**
|
|
@@ -6588,7 +6808,7 @@ export const Uint8ArrayFromBase64Url = /*#__PURE__*/String.annotate({
|
|
|
6588
6808
|
encode: /*#__PURE__*/Getter.encodeBase64Url()
|
|
6589
6809
|
}));
|
|
6590
6810
|
/**
|
|
6591
|
-
*
|
|
6811
|
+
* Schema that decodes a hex encoded string into a
|
|
6592
6812
|
* `Uint8Array`.
|
|
6593
6813
|
*
|
|
6594
6814
|
* **Details**
|
|
@@ -6609,7 +6829,7 @@ export const Uint8ArrayFromHex = /*#__PURE__*/String.annotate({
|
|
|
6609
6829
|
encode: /*#__PURE__*/Getter.encodeHex()
|
|
6610
6830
|
}));
|
|
6611
6831
|
/**
|
|
6612
|
-
*
|
|
6832
|
+
* Schema for `DateTime.Utc` values.
|
|
6613
6833
|
*
|
|
6614
6834
|
* **When to use**
|
|
6615
6835
|
*
|
|
@@ -6648,7 +6868,7 @@ export const DateTimeUtc = /*#__PURE__*/declare(u => DateTime.isDateTime(u) && D
|
|
|
6648
6868
|
toEquivalence: () => DateTime.Equivalence
|
|
6649
6869
|
});
|
|
6650
6870
|
/**
|
|
6651
|
-
*
|
|
6871
|
+
* Schema that decodes a `Date` into a `DateTime.Utc`.
|
|
6652
6872
|
*
|
|
6653
6873
|
* **When to use**
|
|
6654
6874
|
*
|
|
@@ -6676,7 +6896,7 @@ export const DateTimeUtcFromDate = /*#__PURE__*/DateValid.pipe(/*#__PURE__*/deco
|
|
|
6676
6896
|
encode: /*#__PURE__*/Getter.transform(DateTime.toDateUtc)
|
|
6677
6897
|
}));
|
|
6678
6898
|
/**
|
|
6679
|
-
*
|
|
6899
|
+
* Schema that decodes a date-time string into a `DateTime.Utc`.
|
|
6680
6900
|
*
|
|
6681
6901
|
* **Details**
|
|
6682
6902
|
*
|
|
@@ -6696,7 +6916,7 @@ export const DateTimeUtcFromString = /*#__PURE__*/String.annotate({
|
|
|
6696
6916
|
expected: "a string that will be decoded as a DateTime.Utc"
|
|
6697
6917
|
}).pipe(/*#__PURE__*/decodeTo(DateTimeUtc, Transformation.dateTimeUtcFromString));
|
|
6698
6918
|
/**
|
|
6699
|
-
*
|
|
6919
|
+
* Schema that decodes a number into a `DateTime.Utc`.
|
|
6700
6920
|
*
|
|
6701
6921
|
* **Details**
|
|
6702
6922
|
*
|
|
@@ -6714,7 +6934,7 @@ export const DateTimeUtcFromMillis = /*#__PURE__*/Number.pipe(/*#__PURE__*/decod
|
|
|
6714
6934
|
encode: /*#__PURE__*/Getter.transform(DateTime.toEpochMillis)
|
|
6715
6935
|
}));
|
|
6716
6936
|
/**
|
|
6717
|
-
*
|
|
6937
|
+
* Schema for `DateTime.TimeZone.Offset` values.
|
|
6718
6938
|
*
|
|
6719
6939
|
* **Details**
|
|
6720
6940
|
*
|
|
@@ -6747,7 +6967,7 @@ const TimeZoneNamedString = /*#__PURE__*/String.annotate({
|
|
|
6747
6967
|
expected: "an IANA time zone identifier"
|
|
6748
6968
|
});
|
|
6749
6969
|
/**
|
|
6750
|
-
*
|
|
6970
|
+
* Schema for `DateTime.TimeZone.Named` values.
|
|
6751
6971
|
*
|
|
6752
6972
|
* **Details**
|
|
6753
6973
|
*
|
|
@@ -6774,7 +6994,7 @@ export const TimeZoneNamed = /*#__PURE__*/declare(DateTime.isTimeZoneNamed, {
|
|
|
6774
6994
|
toEquivalence: () => (a, b) => a.id === b.id
|
|
6775
6995
|
});
|
|
6776
6996
|
/**
|
|
6777
|
-
*
|
|
6997
|
+
* Schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
6778
6998
|
*
|
|
6779
6999
|
* **Details**
|
|
6780
7000
|
*
|
|
@@ -6792,7 +7012,7 @@ const TimeZoneString = /*#__PURE__*/String.annotate({
|
|
|
6792
7012
|
expected: "a time zone string (IANA identifier or offset like +03:00)"
|
|
6793
7013
|
});
|
|
6794
7014
|
/**
|
|
6795
|
-
*
|
|
7015
|
+
* Schema for `DateTime.TimeZone` values.
|
|
6796
7016
|
*
|
|
6797
7017
|
* **Details**
|
|
6798
7018
|
*
|
|
@@ -6823,7 +7043,7 @@ export const TimeZone = /*#__PURE__*/declare(DateTime.isTimeZone, {
|
|
|
6823
7043
|
toEquivalence: () => (a, b) => DateTime.zoneToString(a) === DateTime.zoneToString(b)
|
|
6824
7044
|
});
|
|
6825
7045
|
/**
|
|
6826
|
-
*
|
|
7046
|
+
* Schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
6827
7047
|
*
|
|
6828
7048
|
* **Details**
|
|
6829
7049
|
*
|
|
@@ -6841,7 +7061,7 @@ const DateTimeZonedString = /*#__PURE__*/String.annotate({
|
|
|
6841
7061
|
expected: "a zoned DateTime string (e.g. 2024-01-01T00:00:00.000+00:00[Europe/London])"
|
|
6842
7062
|
});
|
|
6843
7063
|
/**
|
|
6844
|
-
*
|
|
7064
|
+
* Schema for `DateTime.Zoned` values.
|
|
6845
7065
|
*
|
|
6846
7066
|
* **Details**
|
|
6847
7067
|
*
|
|
@@ -6878,7 +7098,7 @@ export const DateTimeZoned = /*#__PURE__*/declare(u => DateTime.isDateTime(u) &&
|
|
|
6878
7098
|
toEquivalence: () => DateTime.Equivalence
|
|
6879
7099
|
});
|
|
6880
7100
|
/**
|
|
6881
|
-
*
|
|
7101
|
+
* Schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
6882
7102
|
*
|
|
6883
7103
|
* **Details**
|
|
6884
7104
|
*
|
|
@@ -7063,9 +7283,12 @@ export const Class = identifier => (schema, annotations) => {
|
|
|
7063
7283
|
}));
|
|
7064
7284
|
};
|
|
7065
7285
|
/**
|
|
7066
|
-
*
|
|
7067
|
-
*
|
|
7068
|
-
*
|
|
7286
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
7287
|
+
*
|
|
7288
|
+
* **When to use**
|
|
7289
|
+
*
|
|
7290
|
+
* Use to define class instances that are validated by a schema and participate
|
|
7291
|
+
* in tagged union matching.
|
|
7069
7292
|
*
|
|
7070
7293
|
* **Details**
|
|
7071
7294
|
*
|
|
@@ -7131,9 +7354,13 @@ export const ErrorClass = identifier => (schema, annotations) => {
|
|
|
7131
7354
|
return self;
|
|
7132
7355
|
};
|
|
7133
7356
|
/**
|
|
7134
|
-
*
|
|
7135
|
-
*
|
|
7136
|
-
*
|
|
7357
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
7358
|
+
* `_tag` field.
|
|
7359
|
+
*
|
|
7360
|
+
* **When to use**
|
|
7361
|
+
*
|
|
7362
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
7363
|
+
* and matched as tagged union members.
|
|
7137
7364
|
*
|
|
7138
7365
|
* **Example** (Tagged error class)
|
|
7139
7366
|
*
|
|
@@ -7207,7 +7434,7 @@ export function toArbitrary(schema) {
|
|
|
7207
7434
|
// Formatter
|
|
7208
7435
|
// -----------------------------------------------------------------------------
|
|
7209
7436
|
/**
|
|
7210
|
-
*
|
|
7437
|
+
* Attaches a custom formatter used by `toFormatter`.
|
|
7211
7438
|
*
|
|
7212
7439
|
* **Details**
|
|
7213
7440
|
*
|
|
@@ -7374,8 +7601,12 @@ export function toFormatter(schema, options) {
|
|
|
7374
7601
|
// -----------------------------------------------------------------------------
|
|
7375
7602
|
/**
|
|
7376
7603
|
* Overrides the equivalence derivation for a schema by supplying a custom
|
|
7377
|
-
* `Equivalence`.
|
|
7378
|
-
*
|
|
7604
|
+
* `Equivalence`.
|
|
7605
|
+
*
|
|
7606
|
+
* **When to use**
|
|
7607
|
+
*
|
|
7608
|
+
* Use when the default structural equivalence derived by {@link toEquivalence}
|
|
7609
|
+
* is not appropriate for a type.
|
|
7379
7610
|
*
|
|
7380
7611
|
* @category Equivalence
|
|
7381
7612
|
* @since 4.0.0
|
|
@@ -7795,12 +8026,19 @@ export function toIsoFocus(_) {
|
|
|
7795
8026
|
return Optic_.id();
|
|
7796
8027
|
}
|
|
7797
8028
|
/**
|
|
7798
|
-
* Overrides
|
|
7799
|
-
*
|
|
7800
|
-
*
|
|
7801
|
-
*
|
|
8029
|
+
* Overrides a schema's derived ISO codec with an explicit target codec.
|
|
8030
|
+
*
|
|
8031
|
+
* **When to use**
|
|
8032
|
+
*
|
|
8033
|
+
* Use to provide a custom ISO transformation when the default derivation is not
|
|
7802
8034
|
* appropriate.
|
|
7803
8035
|
*
|
|
8036
|
+
* **Details**
|
|
8037
|
+
*
|
|
8038
|
+
* The resulting schema carries a custom `Iso` type parameter and uses the
|
|
8039
|
+
* provided `decode` and `encode` getters to transform between the schema type
|
|
8040
|
+
* and the target codec.
|
|
8041
|
+
*
|
|
7804
8042
|
* @category Optic
|
|
7805
8043
|
* @since 4.0.0
|
|
7806
8044
|
*/
|