effect 4.0.0-beta.65 → 4.0.0-beta.67
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 +113 -67
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +28 -18
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +404 -337
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +190 -146
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +167 -97
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +87 -47
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +62 -31
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +30 -15
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +20 -1
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +16 -0
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +236 -132
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +133 -57
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +77 -65
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +43 -36
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +1518 -575
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +661 -287
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +119 -10
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +45 -6
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +548 -379
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +238 -170
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +15 -8
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +8 -4
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +2 -4
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +2 -4
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +5 -4
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +9 -8
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +1 -1
- package/dist/ConfigProvider.js +1 -1
- package/dist/Console.d.ts +76 -50
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +69 -46
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +386 -138
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +144 -62
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +69 -48
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +96 -36
- package/dist/Cron.js.map +1 -1
- package/dist/Data.d.ts +3 -2
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +875 -444
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +376 -217
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +367 -174
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +145 -71
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +42 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +36 -0
- package/dist/Duration.d.ts +329 -185
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +174 -106
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2445 -2356
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +906 -758
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +38 -3
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -3
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +78 -28
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +75 -27
- package/dist/Encoding.js.map +1 -1
- package/dist/Equivalence.d.ts +14 -19
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +14 -19
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +66 -82
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +38 -29
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +96 -12
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +21 -6
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +7 -5
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +72 -40
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +39 -21
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +119 -58
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +122 -40
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +288 -160
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +176 -74
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +93 -52
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +97 -34
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +104 -73
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +53 -39
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +166 -88
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +68 -42
- package/dist/Filter.js.map +1 -1
- package/dist/Function.d.ts +154 -86
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +53 -37
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +682 -365
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +308 -157
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +29 -13
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +31 -18
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +25 -15
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +444 -256
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +223 -105
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +36 -17
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +75 -8
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +194 -104
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +93 -38
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +20 -9
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +16 -6
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +309 -149
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +129 -65
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +4 -3
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +4 -3
- package/dist/JsonPatch.js.map +1 -1
- package/dist/Latch.d.ts +98 -15
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +41 -10
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +412 -309
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +262 -181
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +95 -21
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +58 -14
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +92 -131
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +25 -15
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +155 -99
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +211 -184
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +75 -17
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +22 -16
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +133 -157
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +85 -76
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +325 -284
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +217 -212
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +117 -58
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +52 -29
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +52 -30
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +94 -38
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +92 -49
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +123 -71
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +99 -62
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +79 -60
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +3 -0
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +36 -39
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +34 -20
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +116 -64
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +54 -30
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +1 -2
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +0 -1
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +38 -53
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +87 -11
- package/dist/Option.js.map +1 -1
- package/dist/Ordering.d.ts +43 -28
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +4 -2
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +225 -40
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +113 -17
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +77 -13
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +48 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +71 -15
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +59 -12
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +74 -6
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +68 -5
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +66 -31
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +26 -24
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +16 -21
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +9 -14
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +9 -2
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +7 -1
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +364 -262
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +245 -174
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +94 -25
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +61 -13
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +284 -150
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +216 -113
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +54 -35
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +36 -24
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +151 -141
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +66 -20
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +69 -32
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +33 -16
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +273 -129
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +117 -57
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +3 -3
- package/dist/Redactable.js +2 -2
- package/dist/Redacted.d.ts +63 -33
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +30 -14
- package/dist/Redacted.js.map +1 -1
- package/dist/Ref.d.ts +81 -52
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +54 -35
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +73 -31
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +66 -30
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +11 -5
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +11 -5
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +158 -34
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +67 -12
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +261 -116
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +77 -41
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +13 -7
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +44 -6
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +26 -16
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +6 -6
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +43 -18
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +35 -16
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +545 -576
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +261 -247
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +43 -6
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +33 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +815 -294
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +287 -193
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +24 -15
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +13 -9
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +26 -13
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +24 -11
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +1 -8
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +194 -25
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +220 -26
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +2 -2
- package/dist/SchemaTransformation.d.ts +61 -41
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +56 -33
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +7 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +23 -0
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +102 -43
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +57 -23
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +138 -46
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +80 -19
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +28 -8
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +25 -5
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +64 -28
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +22 -13
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +458 -200
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +240 -89
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +43 -6
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +33 -4
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +1899 -1186
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +868 -525
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +171 -95
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +125 -67
- package/dist/String.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +308 -203
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +125 -76
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +13 -5
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +13 -5
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +278 -62
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +116 -23
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +26 -2
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +4 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +39 -7
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +10 -4
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +229 -55
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +94 -18
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +213 -142
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +88 -60
- package/dist/Trie.js.map +1 -1
- package/dist/TxChunk.d.ts +182 -146
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +73 -56
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +43 -29
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +22 -15
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +362 -222
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +171 -98
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +178 -104
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +84 -43
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +93 -62
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +54 -36
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +77 -49
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +60 -37
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +279 -241
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +147 -101
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +69 -46
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +48 -32
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +69 -40
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +35 -20
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +101 -54
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +76 -34
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +72 -48
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +33 -22
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +34 -34
- package/dist/UndefinedOr.d.ts +48 -25
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +28 -25
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +71 -116
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +20 -6
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +4 -0
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +4 -0
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +81 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -32
- package/dist/index.js.map +1 -1
- package/dist/internal/concurrency.js +2 -2
- package/dist/internal/concurrency.js.map +1 -1
- package/dist/internal/core.js +8 -20
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +20 -19
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/executionPlan.js +2 -2
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/option.js +5 -8
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/result.js +5 -8
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/schema/schema.js +1 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +6 -3
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +6 -3
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +39 -34
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +42 -12
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +39 -30
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +25 -10
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.js +7 -7
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +197 -130
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +166 -102
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
- package/dist/unstable/ai/Chat.d.ts +65 -41
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +51 -33
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +9 -8
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +28 -18
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +18 -11
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +36 -30
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +21 -15
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +339 -119
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +264 -98
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +53 -19
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +65 -17
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +13 -7
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +11 -9
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
- package/dist/unstable/ai/Prompt.d.ts +194 -168
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +75 -66
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +153 -140
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +43 -48
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +27 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +42 -32
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +14 -10
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +13 -8
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +10 -6
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +153 -84
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +97 -44
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +33 -42
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +35 -36
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +42 -24
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +42 -24
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +226 -134
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +101 -65
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +72 -26
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +86 -23
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +43 -13
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +30 -6
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +218 -117
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +45 -31
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +7 -7
- package/dist/unstable/cli/Completions.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +235 -142
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +111 -71
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +42 -14
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +30 -7
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +35 -10
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/HelpDoc.js +21 -0
- package/dist/unstable/cli/Param.d.ts +79 -31
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +161 -99
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +79 -42
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +66 -35
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +178 -47
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +111 -31
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +13 -0
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +7 -7
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +12 -10
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/config.d.ts +3 -0
- package/dist/unstable/cli/internal/config.d.ts.map +1 -1
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/lexer.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +35 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +56 -7
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +56 -7
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +39 -5
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +61 -8
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +36 -3
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +11 -3
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +75 -16
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +78 -13
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +30 -2
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +18 -3
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +15 -2
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +24 -2
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +40 -8
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +43 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +11 -4
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +27 -3
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +24 -2
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +105 -23
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +88 -14
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +88 -13
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +31 -6
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts +24 -3
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +21 -2
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +102 -13
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +86 -10
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +71 -11
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +101 -12
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +64 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +47 -17
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +47 -17
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +34 -2
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +40 -12
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +31 -4
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +38 -4
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +73 -10
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +70 -9
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +51 -5
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +47 -4
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +10 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +35 -4
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +67 -10
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +23 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +15 -1
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +15 -1
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +21 -1
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +89 -19
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +48 -13
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +29 -2
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +18 -1
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +18 -1
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/internal/hash.js +12 -0
- package/dist/unstable/cluster/internal/hash.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +26 -3
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +26 -3
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +32 -5
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +102 -20
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +21 -1
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +81 -12
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +75 -9
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +149 -21
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +97 -13
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +109 -18
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +69 -13
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +115 -30
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +22 -2
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +24 -6
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +108 -16
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +151 -31
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +111 -20
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +96 -22
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +72 -16
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +54 -8
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +17 -3
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +156 -77
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +93 -39
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +40 -7
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +27 -4
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +33 -4
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay.d.ts +1 -1
- package/dist/unstable/http/FindMyWay.js +1 -1
- package/dist/unstable/http/Headers.d.ts +182 -36
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +86 -16
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +114 -26
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +100 -22
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +205 -96
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +85 -39
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +68 -12
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +71 -9
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +153 -47
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +44 -11
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +42 -16
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +33 -13
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +44 -6
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +35 -5
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +23 -1
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +70 -31
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +34 -3
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +35 -4
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +194 -45
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +122 -28
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +151 -22
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +77 -12
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +90 -10
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +82 -8
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +112 -31
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +43 -5
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +209 -38
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +22 -4
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +47 -5
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +178 -28
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +130 -20
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Node.js +1 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Search.js +1 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Web.js +1 -1
- package/dist/unstable/http/Multipasta.d.ts +1 -1
- package/dist/unstable/http/Multipasta.js +1 -1
- package/dist/unstable/http/Template.d.ts +53 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +26 -0
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +56 -42
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +29 -15
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +233 -49
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +116 -23
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +14 -8
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +47 -9
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +43 -7
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +98 -1
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +113 -22
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -6
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +9 -2
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +28 -3
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +73 -15
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +33 -3
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js +14 -3
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +32 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +29 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +32 -2
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +49 -12
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +47 -5
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +28 -3
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +32 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +7 -5
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.d.ts +2 -1
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +2 -1
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +81 -21
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +76 -15
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +22 -5
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +24 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +60 -13
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +97 -16
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +90 -14
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +82 -17
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +26 -5
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +36 -4
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +89 -109
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +74 -23
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +11 -6
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.d.ts +2 -1
- package/dist/unstable/process/index.d.ts.map +1 -1
- package/dist/unstable/process/index.js +2 -1
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +121 -36
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +539 -130
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +256 -62
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +29 -3
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +69 -10
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +29 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +28 -5
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +35 -3
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +61 -7
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +255 -56
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +44 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +81 -19
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +53 -13
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +26 -2
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +3 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +23 -7
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +39 -3
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +34 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +56 -12
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +73 -23
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +70 -23
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +20 -1
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +20 -1
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +17 -5
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +8 -0
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +8 -0
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +130 -52
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +79 -34
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +104 -24
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +22 -6
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +167 -34
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +124 -29
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +58 -10
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +43 -5
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts +35 -4
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +45 -5
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +34 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +38 -1
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +31 -0
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +22 -0
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +99 -0
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +114 -0
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +26 -5
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +8 -4
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +56 -13
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +44 -10
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +29 -8
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +29 -8
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.d.ts +3 -0
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.js +23 -0
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +124 -0
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +82 -0
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +1 -1
- package/dist/unstable/sql/index.js +1 -1
- package/dist/unstable/workers/Transferable.d.ts +65 -13
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +53 -10
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +60 -8
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +43 -4
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +31 -9
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +44 -7
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +24 -1
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.d.ts +1 -1
- package/dist/unstable/workers/index.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +61 -10
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +21 -6
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +12 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +22 -2
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +76 -13
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +145 -0
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -0
- package/dist/unstable/workflow/DurableQueue.js +200 -0
- package/dist/unstable/workflow/DurableQueue.js.map +1 -0
- package/dist/unstable/workflow/Workflow.d.ts +100 -31
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +76 -20
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +16 -4
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +2 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/dist/unstable/workflow/index.d.ts +4 -0
- package/dist/unstable/workflow/index.d.ts.map +1 -1
- package/dist/unstable/workflow/index.js +4 -0
- package/dist/unstable/workflow/index.js.map +1 -1
- package/package.json +11 -11
- package/src/Array.ts +113 -67
- package/src/BigDecimal.ts +404 -337
- package/src/BigInt.ts +167 -97
- package/src/Boolean.ts +62 -31
- package/src/Brand.ts +20 -1
- package/src/Cache.ts +331 -164
- package/src/Cause.ts +77 -65
- package/src/Channel.ts +1585 -607
- package/src/ChannelSchema.ts +137 -12
- package/src/Chunk.ts +549 -380
- package/src/Clock.ts +15 -8
- package/src/Combiner.ts +2 -4
- package/src/Config.ts +12 -10
- package/src/ConfigProvider.ts +1 -1
- package/src/Console.ts +88 -58
- package/src/Context.ts +397 -149
- package/src/Cron.ts +111 -48
- package/src/Data.ts +3 -2
- package/src/DateTime.ts +876 -445
- package/src/Deferred.ts +367 -174
- package/src/Differ.ts +42 -0
- package/src/Duration.ts +329 -185
- package/src/Effect.ts +2474 -2395
- package/src/Effectable.ts +39 -4
- package/src/Encoding.ts +78 -28
- package/src/Equivalence.ts +14 -19
- package/src/ErrorReporter.ts +66 -82
- package/src/ExecutionPlan.ts +97 -13
- package/src/Exit.ts +7 -5
- package/src/Fiber.ts +72 -40
- package/src/FiberHandle.ts +158 -58
- package/src/FiberMap.ts +329 -164
- package/src/FiberSet.ts +130 -52
- package/src/FileSystem.ts +106 -74
- package/src/Filter.ts +166 -88
- package/src/Function.ts +154 -86
- package/src/Graph.ts +682 -365
- package/src/HKT.ts +29 -13
- package/src/Hash.ts +31 -18
- package/src/HashMap.ts +444 -256
- package/src/HashRing.ts +94 -17
- package/src/HashSet.ts +194 -104
- package/src/Inspectable.ts +22 -10
- package/src/Iterable.ts +309 -149
- package/src/JsonPatch.ts +4 -3
- package/src/Latch.ts +98 -15
- package/src/Layer.ts +488 -345
- package/src/LayerMap.ts +98 -25
- package/src/LogLevel.ts +92 -131
- package/src/Logger.ts +357 -288
- package/src/ManagedRuntime.ts +75 -17
- package/src/Match.ts +133 -157
- package/src/Metric.ts +355 -304
- package/src/MutableHashMap.ts +161 -84
- package/src/MutableHashSet.ts +122 -52
- package/src/MutableList.ts +141 -81
- package/src/MutableRef.ts +130 -90
- package/src/Newtype.ts +3 -0
- package/src/NonEmptyIterable.ts +36 -39
- package/src/Number.ts +116 -64
- package/src/Optic.ts +1 -2
- package/src/Option.ts +41 -53
- package/src/Ordering.ts +43 -28
- package/src/PartitionedSemaphore.ts +225 -40
- package/src/Path.ts +77 -13
- package/src/Pipeable.ts +76 -21
- package/src/PlatformError.ts +74 -6
- package/src/Pool.ts +94 -31
- package/src/Predicate.ts +16 -21
- package/src/PrimaryKey.ts +9 -2
- package/src/PubSub.ts +364 -262
- package/src/Pull.ts +94 -25
- package/src/Queue.ts +284 -150
- package/src/Random.ts +54 -35
- package/src/RcMap.ts +151 -141
- package/src/RcRef.ts +69 -32
- package/src/Record.ts +273 -129
- package/src/Redactable.ts +3 -3
- package/src/Redacted.ts +63 -33
- package/src/Ref.ts +161 -104
- package/src/References.ts +73 -31
- package/src/RegExp.ts +11 -5
- package/src/Request.ts +158 -34
- package/src/RequestResolver.ts +277 -119
- package/src/Resource.ts +45 -7
- package/src/Result.ts +31 -18
- package/src/Runtime.ts +45 -19
- package/src/Schedule.ts +575 -600
- package/src/Scheduler.ts +43 -6
- package/src/Schema.ts +845 -319
- package/src/SchemaAST.ts +25 -16
- package/src/SchemaGetter.ts +32 -17
- package/src/SchemaIssue.ts +1 -8
- package/src/SchemaParser.ts +262 -38
- package/src/SchemaTransformation.ts +61 -41
- package/src/SchemaUtils.ts +23 -0
- package/src/Scope.ts +102 -43
- package/src/ScopedCache.ts +192 -56
- package/src/ScopedRef.ts +28 -8
- package/src/Semaphore.ts +64 -28
- package/src/Sink.ts +458 -200
- package/src/Stdio.ts +43 -6
- package/src/Stream.ts +2043 -1256
- package/src/String.ts +171 -95
- package/src/SubscriptionRef.ts +308 -203
- package/src/Symbol.ts +13 -5
- package/src/SynchronizedRef.ts +278 -62
- package/src/Take.ts +26 -2
- package/src/Terminal.ts +40 -7
- package/src/Tracer.ts +229 -55
- package/src/Trie.ts +213 -142
- package/src/TxChunk.ts +182 -146
- package/src/TxDeferred.ts +43 -29
- package/src/TxHashMap.ts +370 -230
- package/src/TxHashSet.ts +250 -152
- package/src/TxPriorityQueue.ts +96 -64
- package/src/TxPubSub.ts +77 -49
- package/src/TxQueue.ts +279 -241
- package/src/TxReentrantLock.ts +70 -47
- package/src/TxRef.ts +70 -41
- package/src/TxSemaphore.ts +101 -54
- package/src/TxSubscriptionRef.ts +72 -48
- package/src/Types.ts +34 -34
- package/src/UndefinedOr.ts +48 -25
- package/src/Unify.ts +71 -116
- package/src/Utils.ts +4 -0
- package/src/index.ts +81 -32
- package/src/internal/concurrency.ts +2 -2
- package/src/internal/core.ts +12 -23
- package/src/internal/effect.ts +25 -29
- package/src/internal/executionPlan.ts +2 -2
- package/src/internal/option.ts +5 -8
- package/src/internal/result.ts +5 -8
- package/src/internal/schema/schema.ts +1 -1
- package/src/testing/FastCheck.ts +6 -3
- package/src/testing/TestClock.ts +63 -34
- package/src/testing/TestConsole.ts +49 -30
- package/src/testing/TestSchema.ts +8 -8
- package/src/unstable/ai/AiError.ts +187 -120
- package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
- package/src/unstable/ai/Chat.ts +69 -43
- package/src/unstable/ai/EmbeddingModel.ts +12 -11
- package/src/unstable/ai/IdGenerator.ts +28 -18
- package/src/unstable/ai/LanguageModel.ts +47 -46
- package/src/unstable/ai/McpSchema.ts +339 -119
- package/src/unstable/ai/McpServer.ts +78 -21
- package/src/unstable/ai/Model.ts +23 -18
- package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
- package/src/unstable/ai/Prompt.ts +210 -184
- package/src/unstable/ai/Response.ts +159 -147
- package/src/unstable/ai/ResponseIdTracker.ts +43 -4
- package/src/unstable/ai/Telemetry.ts +42 -32
- package/src/unstable/ai/Tokenizer.ts +13 -8
- package/src/unstable/ai/Tool.ts +154 -85
- package/src/unstable/ai/Toolkit.ts +81 -84
- package/src/unstable/ai/index.ts +42 -24
- package/src/unstable/cli/Argument.ts +226 -134
- package/src/unstable/cli/CliError.ts +96 -26
- package/src/unstable/cli/CliOutput.ts +43 -13
- package/src/unstable/cli/Command.ts +225 -125
- package/src/unstable/cli/Completions.ts +7 -7
- package/src/unstable/cli/Flag.ts +235 -142
- package/src/unstable/cli/GlobalFlag.ts +42 -14
- package/src/unstable/cli/HelpDoc.ts +35 -10
- package/src/unstable/cli/Param.ts +328 -190
- package/src/unstable/cli/Primitive.ts +79 -42
- package/src/unstable/cli/Prompt.ts +210 -58
- package/src/unstable/cli/internal/ansi.ts +13 -0
- package/src/unstable/cli/internal/command.ts +17 -15
- package/src/unstable/cli/internal/config.ts +3 -0
- package/src/unstable/cli/internal/lexer.ts +11 -0
- package/src/unstable/cluster/ClusterCron.ts +35 -1
- package/src/unstable/cluster/ClusterError.ts +56 -7
- package/src/unstable/cluster/ClusterMetrics.ts +39 -5
- package/src/unstable/cluster/ClusterSchema.ts +61 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +36 -3
- package/src/unstable/cluster/DeliverAt.ts +39 -4
- package/src/unstable/cluster/Entity.ts +110 -19
- package/src/unstable/cluster/EntityAddress.ts +30 -2
- package/src/unstable/cluster/EntityId.ts +18 -3
- package/src/unstable/cluster/EntityProxy.ts +34 -2
- package/src/unstable/cluster/EntityProxyServer.ts +44 -8
- package/src/unstable/cluster/EntityResource.ts +43 -6
- package/src/unstable/cluster/EntityType.ts +27 -3
- package/src/unstable/cluster/Envelope.ts +128 -23
- package/src/unstable/cluster/HttpRunner.ts +88 -13
- package/src/unstable/cluster/K8sHttpClient.ts +49 -6
- package/src/unstable/cluster/MachineId.ts +24 -3
- package/src/unstable/cluster/Message.ts +102 -13
- package/src/unstable/cluster/MessageStorage.ts +128 -22
- package/src/unstable/cluster/Reply.ts +101 -12
- package/src/unstable/cluster/Runner.ts +47 -17
- package/src/unstable/cluster/RunnerAddress.ts +34 -2
- package/src/unstable/cluster/RunnerHealth.ts +40 -12
- package/src/unstable/cluster/RunnerServer.ts +31 -4
- package/src/unstable/cluster/RunnerStorage.ts +42 -5
- package/src/unstable/cluster/Runners.ts +73 -10
- package/src/unstable/cluster/ShardId.ts +51 -5
- package/src/unstable/cluster/Sharding.ts +35 -4
- package/src/unstable/cluster/ShardingConfig.ts +76 -11
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
- package/src/unstable/cluster/SingleRunner.ts +23 -1
- package/src/unstable/cluster/Singleton.ts +15 -1
- package/src/unstable/cluster/SingletonAddress.ts +21 -1
- package/src/unstable/cluster/Snowflake.ts +89 -19
- package/src/unstable/cluster/SocketRunner.ts +29 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
- package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
- package/src/unstable/cluster/TestRunner.ts +18 -1
- package/src/unstable/cluster/internal/hash.ts +12 -0
- package/src/unstable/devtools/DevTools.ts +26 -3
- package/src/unstable/devtools/DevToolsClient.ts +32 -5
- package/src/unstable/devtools/DevToolsSchema.ts +201 -44
- package/src/unstable/devtools/DevToolsServer.ts +27 -2
- package/src/unstable/encoding/Msgpack.ts +97 -12
- package/src/unstable/encoding/Ndjson.ts +149 -21
- package/src/unstable/encoding/Sse.ts +109 -18
- package/src/unstable/eventlog/Event.ts +131 -30
- package/src/unstable/eventlog/EventGroup.ts +50 -17
- package/src/unstable/eventlog/EventJournal.ts +120 -20
- package/src/unstable/eventlog/EventLog.ts +151 -31
- package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
- package/src/unstable/eventlog/EventLogMessage.ts +92 -18
- package/src/unstable/eventlog/EventLogRemote.ts +54 -8
- package/src/unstable/eventlog/EventLogServer.ts +33 -3
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
- package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
- package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
- package/src/unstable/http/Cookies.ts +156 -77
- package/src/unstable/http/Etag.ts +40 -7
- package/src/unstable/http/FetchHttpClient.ts +33 -4
- package/src/unstable/http/FindMyWay.ts +1 -1
- package/src/unstable/http/Headers.ts +252 -50
- package/src/unstable/http/HttpBody.ts +130 -28
- package/src/unstable/http/HttpClient.ts +206 -97
- package/src/unstable/http/HttpClientError.ts +80 -12
- package/src/unstable/http/HttpClientRequest.ts +320 -102
- package/src/unstable/http/HttpClientResponse.ts +59 -16
- package/src/unstable/http/HttpEffect.ts +66 -18
- package/src/unstable/http/HttpIncomingMessage.ts +47 -7
- package/src/unstable/http/HttpMethod.ts +35 -5
- package/src/unstable/http/HttpMiddleware.ts +63 -16
- package/src/unstable/http/HttpPlatform.ts +35 -4
- package/src/unstable/http/HttpRouter.ts +221 -57
- package/src/unstable/http/HttpServer.ts +152 -23
- package/src/unstable/http/HttpServerError.ts +90 -10
- package/src/unstable/http/HttpServerRequest.ts +136 -32
- package/src/unstable/http/HttpServerRespondable.ts +49 -6
- package/src/unstable/http/HttpServerResponse.ts +395 -72
- package/src/unstable/http/HttpStaticServer.ts +22 -4
- package/src/unstable/http/HttpTraceContext.ts +53 -6
- package/src/unstable/http/Multipart.ts +179 -29
- package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
- package/src/unstable/http/Multipasta/Node.ts +1 -1
- package/src/unstable/http/Multipasta/Search.ts +1 -1
- package/src/unstable/http/Multipasta/Web.ts +1 -1
- package/src/unstable/http/Multipasta.ts +1 -1
- package/src/unstable/http/Template.ts +53 -0
- package/src/unstable/http/Url.ts +56 -42
- package/src/unstable/http/UrlParams.ts +233 -49
- package/src/unstable/httpapi/HttpApi.ts +49 -14
- package/src/unstable/httpapi/HttpApiBuilder.ts +86 -20
- package/src/unstable/httpapi/HttpApiClient.ts +80 -16
- package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
- package/src/unstable/httpapi/HttpApiError.ts +100 -1
- package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
- package/src/unstable/httpapi/HttpApiMiddleware.ts +113 -23
- package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
- package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
- package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
- package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
- package/src/unstable/httpapi/HttpApiTest.ts +31 -3
- package/src/unstable/httpapi/OpenApi.ts +115 -15
- package/src/unstable/observability/Otlp.ts +33 -3
- package/src/unstable/observability/OtlpExporter.ts +32 -1
- package/src/unstable/observability/OtlpLogger.ts +31 -2
- package/src/unstable/observability/OtlpMetrics.ts +37 -4
- package/src/unstable/observability/OtlpResource.ts +68 -12
- package/src/unstable/observability/OtlpSerialization.ts +28 -3
- package/src/unstable/observability/OtlpTracer.ts +38 -2
- package/src/unstable/observability/PrometheusMetrics.ts +32 -12
- package/src/unstable/observability/index.ts +2 -1
- package/src/unstable/persistence/KeyValueStore.ts +108 -28
- package/src/unstable/persistence/Persistable.ts +76 -15
- package/src/unstable/persistence/PersistedCache.ts +27 -2
- package/src/unstable/persistence/PersistedQueue.ts +98 -16
- package/src/unstable/persistence/Persistence.ts +97 -16
- package/src/unstable/persistence/RateLimiter.ts +98 -22
- package/src/unstable/persistence/Redis.ts +42 -5
- package/src/unstable/process/ChildProcess.ts +100 -79
- package/src/unstable/process/ChildProcessSpawner.ts +22 -11
- package/src/unstable/process/index.ts +2 -1
- package/src/unstable/reactivity/AsyncResult.ts +202 -61
- package/src/unstable/reactivity/Atom.ts +597 -143
- package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
- package/src/unstable/reactivity/AtomRef.ts +51 -7
- package/src/unstable/reactivity/AtomRegistry.ts +141 -22
- package/src/unstable/reactivity/AtomRpc.ts +36 -2
- package/src/unstable/reactivity/Hydration.ts +45 -5
- package/src/unstable/reactivity/Reactivity.ts +95 -13
- package/src/unstable/rpc/Rpc.ts +255 -56
- package/src/unstable/rpc/RpcClient.ts +108 -20
- package/src/unstable/rpc/RpcClientError.ts +26 -2
- package/src/unstable/rpc/RpcGroup.ts +51 -8
- package/src/unstable/rpc/RpcMessage.ts +128 -32
- package/src/unstable/rpc/RpcMiddleware.ts +100 -20
- package/src/unstable/rpc/RpcSchema.ts +38 -4
- package/src/unstable/rpc/RpcSerialization.ts +60 -13
- package/src/unstable/rpc/RpcServer.ts +108 -25
- package/src/unstable/rpc/RpcTest.ts +20 -1
- package/src/unstable/rpc/RpcWorker.ts +42 -8
- package/src/unstable/rpc/Utils.ts +31 -0
- package/src/unstable/schema/Model.ts +148 -52
- package/src/unstable/schema/VariantSchema.ts +104 -24
- package/src/unstable/socket/Socket.ts +168 -35
- package/src/unstable/socket/SocketServer.ts +58 -10
- package/src/unstable/sql/Migrator.ts +57 -5
- package/src/unstable/sql/SqlClient.ts +55 -2
- package/src/unstable/sql/SqlConnection.ts +31 -0
- package/src/unstable/sql/SqlError.ts +117 -0
- package/src/unstable/sql/SqlModel.ts +26 -5
- package/src/unstable/sql/SqlResolver.ts +56 -13
- package/src/unstable/sql/SqlSchema.ts +29 -8
- package/src/unstable/sql/SqlStream.ts +23 -0
- package/src/unstable/sql/Statement.ts +141 -0
- package/src/unstable/sql/index.ts +1 -1
- package/src/unstable/workers/Transferable.ts +65 -13
- package/src/unstable/workers/Worker.ts +60 -8
- package/src/unstable/workers/WorkerError.ts +50 -9
- package/src/unstable/workers/WorkerRunner.ts +32 -3
- package/src/unstable/workers/index.ts +1 -1
- package/src/unstable/workflow/Activity.ts +62 -11
- package/src/unstable/workflow/DurableClock.ts +26 -3
- package/src/unstable/workflow/DurableDeferred.ts +146 -31
- package/src/unstable/workflow/DurableQueue.ts +366 -0
- package/src/unstable/workflow/Workflow.ts +122 -32
- package/src/unstable/workflow/WorkflowEngine.ts +40 -5
- package/src/unstable/workflow/WorkflowProxy.ts +32 -2
- package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
- package/src/unstable/workflow/index.ts +5 -0
package/dist/Schema.d.ts
CHANGED
|
@@ -206,6 +206,8 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
|
|
|
206
206
|
check(...checks: readonly [AST.Check<this["Type"]>, ...Array<AST.Check<this["Type"]>>]): this["Rebuild"];
|
|
207
207
|
rebuild(ast: this["ast"]): this["Rebuild"];
|
|
208
208
|
/**
|
|
209
|
+
* Constructs a value from the make input representation.
|
|
210
|
+
*
|
|
209
211
|
* @throws {Error} The issue is contained in the error cause.
|
|
210
212
|
*/
|
|
211
213
|
make(input: this["~type.make.in"], options?: MakeOptions): this["Type"];
|
|
@@ -886,49 +888,59 @@ export declare const asserts: typeof Parser.asserts;
|
|
|
886
888
|
* succeeds with the decoded value or fails with a {@link SchemaError}. Use this
|
|
887
889
|
* when the input type is not statically known. Prefer {@link decodeEffect} when
|
|
888
890
|
* the input is already typed as the schema's `Encoded` type.
|
|
891
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
892
|
+
* application options override creation options.
|
|
889
893
|
*
|
|
890
894
|
* @category Decoding
|
|
891
895
|
* @since 4.0.0
|
|
892
896
|
*/
|
|
893
|
-
export declare function decodeUnknownEffect<S extends Top>(schema: S): (input: unknown, options?: AST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
|
|
897
|
+
export declare function decodeUnknownEffect<S extends Top>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
|
|
894
898
|
/**
|
|
895
899
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
896
900
|
* returning an `Effect` that succeeds with the decoded value or fails with a
|
|
897
901
|
* {@link SchemaError}. Use this when the input is already typed; for `unknown`
|
|
898
902
|
* input use {@link decodeUnknownEffect}.
|
|
903
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
904
|
+
* application options override creation options.
|
|
899
905
|
*
|
|
900
906
|
* @category Decoding
|
|
901
907
|
* @since 4.0.0
|
|
902
908
|
*/
|
|
903
|
-
export declare const decodeEffect: <S extends Top>(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
|
|
909
|
+
export declare const decodeEffect: <S extends Top>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Effect.Effect<S["Type"], SchemaError, S["DecodingServices"]>;
|
|
904
910
|
/**
|
|
905
911
|
* Decodes an `unknown` input against a schema synchronously, returning an
|
|
906
912
|
* `Exit` that is either a `Success` with the decoded value or a `Failure` with
|
|
907
913
|
* a {@link SchemaError}. Only usable with schemas that have no
|
|
908
914
|
* `DecodingServices` requirement. Prefer {@link decodeExit} when the input is
|
|
909
915
|
* already typed as the schema's `Encoded` type.
|
|
916
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
917
|
+
* application options override creation options.
|
|
910
918
|
*
|
|
911
919
|
* @category Decoding
|
|
912
920
|
* @since 4.0.0
|
|
913
921
|
*/
|
|
914
|
-
export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
|
|
922
|
+
export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
|
|
915
923
|
/**
|
|
916
924
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
917
925
|
* synchronously, returning an `Exit` that is either a `Success` with the
|
|
918
926
|
* decoded value or a `Failure` with a {@link SchemaError}. Only usable with
|
|
919
927
|
* schemas that have no `DecodingServices` requirement. For `unknown` input use
|
|
920
928
|
* {@link decodeUnknownExit}.
|
|
929
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
930
|
+
* application options override creation options.
|
|
921
931
|
*
|
|
922
932
|
* @category Decoding
|
|
923
933
|
* @since 4.0.0
|
|
924
934
|
*/
|
|
925
|
-
export declare const decodeExit: <S extends Decoder<unknown>>(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
|
|
935
|
+
export declare const decodeExit: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
|
|
926
936
|
/**
|
|
927
937
|
* Decodes an `unknown` input against a schema, returning an `Option` that is
|
|
928
938
|
* `Some` with the decoded value on success or `None` on failure. Prefer this
|
|
929
939
|
* over {@link decodeUnknownExit} or {@link decodeUnknownEffect} when you only
|
|
930
940
|
* need to know whether decoding succeeded and don't need error details. For
|
|
931
941
|
* typed input use {@link decodeOption}.
|
|
942
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
943
|
+
* application options override creation options.
|
|
932
944
|
*
|
|
933
945
|
* @category Decoding
|
|
934
946
|
* @since 4.0.0
|
|
@@ -938,27 +950,43 @@ export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
|
|
|
938
950
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
939
951
|
* returning an `Option` that is `Some` with the decoded value on success or
|
|
940
952
|
* `None` on failure. For `unknown` input use {@link decodeUnknownOption}.
|
|
953
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
954
|
+
* application options override creation options.
|
|
941
955
|
*
|
|
942
956
|
* @category Decoding
|
|
943
957
|
* @since 4.0.0
|
|
944
958
|
*/
|
|
945
|
-
export declare const decodeOption: <S extends Decoder<unknown>>(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Option_.Option<S["Type"]>;
|
|
959
|
+
export declare const decodeOption: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Option_.Option<S["Type"]>;
|
|
946
960
|
/**
|
|
947
|
-
* Decodes an `unknown` input against a schema, returning a `
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
961
|
+
* Decodes an `unknown` input against a schema, returning a `Result` that
|
|
962
|
+
* succeeds with the decoded value or fails with a schema issue. For typed input
|
|
963
|
+
* use {@link decodeResult}.
|
|
964
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
965
|
+
* application options override creation options.
|
|
951
966
|
*
|
|
952
967
|
* @category Decoding
|
|
953
968
|
* @since 4.0.0
|
|
954
969
|
*/
|
|
955
970
|
export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult;
|
|
956
971
|
/**
|
|
972
|
+
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
973
|
+
* returning a `Result` that succeeds with the decoded value or fails with a
|
|
974
|
+
* schema issue. For `unknown` input use {@link decodeUnknownResult}.
|
|
975
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
976
|
+
* application options override creation options.
|
|
977
|
+
*
|
|
957
978
|
* @category Decoding
|
|
958
979
|
* @since 4.0.0
|
|
959
980
|
*/
|
|
960
|
-
export declare const decodeResult: <S extends Decoder<unknown>>(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Result_.Result<S["Type"], Issue.Issue>;
|
|
981
|
+
export declare const decodeResult: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Result_.Result<S["Type"], Issue.Issue>;
|
|
961
982
|
/**
|
|
983
|
+
* Decodes an `unknown` input against a schema, returning a `Promise` that
|
|
984
|
+
* resolves with the decoded value or rejects with a schema issue. Useful for
|
|
985
|
+
* integrating with Promise-based APIs. For typed input use
|
|
986
|
+
* {@link decodePromise}.
|
|
987
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
988
|
+
* application options override creation options.
|
|
989
|
+
*
|
|
962
990
|
* @category Decoding
|
|
963
991
|
* @since 4.0.0
|
|
964
992
|
*/
|
|
@@ -966,19 +994,27 @@ export declare const decodeUnknownPromise: typeof Parser.decodeUnknownPromise;
|
|
|
966
994
|
/**
|
|
967
995
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
968
996
|
* returning a `Promise` that resolves with the decoded value or rejects with a
|
|
969
|
-
*
|
|
997
|
+
* schema issue. For `unknown` input use `decodeUnknownPromise`.
|
|
998
|
+
*
|
|
999
|
+
* **Details**
|
|
1000
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
1001
|
+
* application options override creation options.
|
|
970
1002
|
*
|
|
971
1003
|
* @category Decoding
|
|
972
1004
|
* @since 4.0.0
|
|
973
1005
|
*/
|
|
974
1006
|
export declare const decodePromise: typeof Parser.decodePromise;
|
|
975
1007
|
/**
|
|
976
|
-
* Decodes an `unknown` input against a schema synchronously,
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
1008
|
+
* Decodes an `unknown` input against a schema synchronously, returning the
|
|
1009
|
+
* decoded value or throwing an `Error` whose cause contains the schema issue.
|
|
1010
|
+
* Use this when you want to validate data at a boundary and treat a schema
|
|
1011
|
+
* mismatch as an exception. For typed input use `decodeSync`.
|
|
1012
|
+
*
|
|
1013
|
+
* **Details**
|
|
1014
|
+
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
1015
|
+
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
1016
|
+
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
1017
|
+
* decoder or when applying it; application options override creation options.
|
|
982
1018
|
*
|
|
983
1019
|
* **Example** (Decoding with a transformation schema)
|
|
984
1020
|
*
|
|
@@ -1003,18 +1039,25 @@ export declare const decodePromise: typeof Parser.decodePromise;
|
|
|
1003
1039
|
export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
|
|
1004
1040
|
/**
|
|
1005
1041
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
1006
|
-
* synchronously,
|
|
1007
|
-
* use
|
|
1042
|
+
* synchronously, returning the decoded value or throwing an `Error` whose cause
|
|
1043
|
+
* contains the schema issue. For `unknown` input use `decodeUnknownSync`.
|
|
1044
|
+
*
|
|
1045
|
+
* **Details**
|
|
1046
|
+
* Only service-free schemas can be decoded synchronously. Options may be
|
|
1047
|
+
* provided either when creating the decoder or when applying it; application
|
|
1048
|
+
* options override creation options.
|
|
1008
1049
|
*
|
|
1009
1050
|
* @category Decoding
|
|
1010
1051
|
* @since 4.0.0
|
|
1011
1052
|
*/
|
|
1012
|
-
export declare const decodeSync: <S extends Decoder<unknown>>(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => S["Type"];
|
|
1053
|
+
export declare const decodeSync: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => S["Type"];
|
|
1013
1054
|
/**
|
|
1014
1055
|
* Encodes an `unknown` input against a schema, returning an `Effect` that
|
|
1015
1056
|
* succeeds with the encoded value or fails with a {@link SchemaError}. Use this
|
|
1016
1057
|
* when the input type is not statically known. Prefer {@link encodeEffect} when
|
|
1017
1058
|
* the input is already typed as the schema's `Type`.
|
|
1059
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1060
|
+
* application options override creation options.
|
|
1018
1061
|
*
|
|
1019
1062
|
* **Example** (Encoding a value to a string)
|
|
1020
1063
|
*
|
|
@@ -1030,45 +1073,53 @@ export declare const decodeSync: <S extends Decoder<unknown>>(schema: S) => (inp
|
|
|
1030
1073
|
* @category Encoding
|
|
1031
1074
|
* @since 4.0.0
|
|
1032
1075
|
*/
|
|
1033
|
-
export declare function encodeUnknownEffect<S extends Top>(schema: S): (input: unknown, options?: AST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
|
|
1076
|
+
export declare function encodeUnknownEffect<S extends Top>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
|
|
1034
1077
|
/**
|
|
1035
1078
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1036
1079
|
* `Effect` that succeeds with the encoded value or fails with a
|
|
1037
1080
|
* {@link SchemaError}. Use this when the input is already typed; for `unknown`
|
|
1038
1081
|
* input use {@link encodeUnknownEffect}.
|
|
1082
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1083
|
+
* application options override creation options.
|
|
1039
1084
|
*
|
|
1040
1085
|
* @category Encoding
|
|
1041
1086
|
* @since 4.0.0
|
|
1042
1087
|
*/
|
|
1043
|
-
export declare const encodeEffect: <S extends Top>(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
|
|
1088
|
+
export declare const encodeEffect: <S extends Top>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]>;
|
|
1044
1089
|
/**
|
|
1045
1090
|
* Encodes an `unknown` input against a schema synchronously, returning an
|
|
1046
1091
|
* `Exit` that is either a `Success` with the encoded value or a `Failure` with
|
|
1047
1092
|
* a {@link SchemaError}. Only usable with schemas that have no
|
|
1048
1093
|
* `EncodingServices` requirement. Prefer {@link encodeExit} when the input is
|
|
1049
1094
|
* already typed as the schema's `Type`.
|
|
1095
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1096
|
+
* application options override creation options.
|
|
1050
1097
|
*
|
|
1051
1098
|
* @category Encoding
|
|
1052
1099
|
* @since 4.0.0
|
|
1053
1100
|
*/
|
|
1054
|
-
export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
|
|
1101
|
+
export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
|
|
1055
1102
|
/**
|
|
1056
1103
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1057
1104
|
* returning an `Exit` that is either a `Success` with the encoded value or a
|
|
1058
1105
|
* `Failure` with a {@link SchemaError}. Only usable with schemas that have no
|
|
1059
1106
|
* `EncodingServices` requirement. For `unknown` input use
|
|
1060
1107
|
* {@link encodeUnknownExit}.
|
|
1108
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1109
|
+
* application options override creation options.
|
|
1061
1110
|
*
|
|
1062
1111
|
* @category Encoding
|
|
1063
1112
|
* @since 4.0.0
|
|
1064
1113
|
*/
|
|
1065
|
-
export declare const encodeExit: <S extends Encoder<unknown>>(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
|
|
1114
|
+
export declare const encodeExit: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
|
|
1066
1115
|
/**
|
|
1067
1116
|
* Encodes an `unknown` input against a schema, returning an `Option` that is
|
|
1068
1117
|
* `Some` with the encoded value on success or `None` on failure. Prefer this
|
|
1069
1118
|
* over {@link encodeUnknownExit} or {@link encodeUnknownEffect} when you only
|
|
1070
1119
|
* need to know whether encoding succeeded and don't need error details. For
|
|
1071
1120
|
* typed input use {@link encodeOption}.
|
|
1121
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1122
|
+
* application options override creation options.
|
|
1072
1123
|
*
|
|
1073
1124
|
* @category Encoding
|
|
1074
1125
|
* @since 4.0.0
|
|
@@ -1078,40 +1129,58 @@ export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
|
|
|
1078
1129
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1079
1130
|
* `Option` that is `Some` with the encoded value on success or `None` on
|
|
1080
1131
|
* failure. For `unknown` input use {@link encodeUnknownOption}.
|
|
1132
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1133
|
+
* application options override creation options.
|
|
1081
1134
|
*
|
|
1082
1135
|
* @category Encoding
|
|
1083
1136
|
* @since 4.0.0
|
|
1084
1137
|
*/
|
|
1085
|
-
export declare const encodeOption: <S extends Encoder<unknown>>(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Option_.Option<S["Encoded"]>;
|
|
1138
|
+
export declare const encodeOption: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Option_.Option<S["Encoded"]>;
|
|
1086
1139
|
/**
|
|
1087
|
-
* Encodes an `unknown` input against a schema, returning a `
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
1090
|
-
*
|
|
1140
|
+
* Encodes an `unknown` input against a schema, returning a `Result` that
|
|
1141
|
+
* succeeds with the encoded value or fails with a schema issue. For typed input
|
|
1142
|
+
* use {@link encodeResult}.
|
|
1143
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1144
|
+
* application options override creation options.
|
|
1091
1145
|
*
|
|
1092
1146
|
* @category Encoding
|
|
1093
1147
|
* @since 4.0.0
|
|
1094
1148
|
*/
|
|
1095
1149
|
export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult;
|
|
1096
1150
|
/**
|
|
1151
|
+
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1152
|
+
* `Result` that succeeds with the encoded value or fails with a schema issue.
|
|
1153
|
+
* For `unknown` input use {@link encodeUnknownResult}.
|
|
1154
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1155
|
+
* application options override creation options.
|
|
1156
|
+
*
|
|
1097
1157
|
* @category Encoding
|
|
1098
1158
|
* @since 4.0.0
|
|
1099
1159
|
*/
|
|
1100
|
-
export declare const encodeResult: <S extends Encoder<unknown>>(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Result_.Result<S["Encoded"], Issue.Issue>;
|
|
1160
|
+
export declare const encodeResult: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Result_.Result<S["Encoded"], Issue.Issue>;
|
|
1101
1161
|
/**
|
|
1162
|
+
* Encodes an `unknown` input against a schema, returning a `Promise` that
|
|
1163
|
+
* resolves with the encoded value or rejects with a schema issue. Useful for
|
|
1164
|
+
* integrating with Promise-based APIs. For typed input use
|
|
1165
|
+
* {@link encodePromise}.
|
|
1166
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1167
|
+
* application options override creation options.
|
|
1168
|
+
*
|
|
1102
1169
|
* @category Encoding
|
|
1103
1170
|
* @since 4.0.0
|
|
1104
1171
|
*/
|
|
1105
|
-
export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema: S) => (input: unknown, options?: AST.ParseOptions) => Promise<S["Encoded"]>;
|
|
1172
|
+
export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: unknown, options?: AST.ParseOptions) => Promise<S["Encoded"]>;
|
|
1106
1173
|
/**
|
|
1107
1174
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1108
1175
|
* `Promise` that resolves with the encoded value or rejects with a
|
|
1109
1176
|
* {@link SchemaError}. For `unknown` input use {@link encodeUnknownPromise}.
|
|
1177
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1178
|
+
* application options override creation options.
|
|
1110
1179
|
*
|
|
1111
1180
|
* @category Encoding
|
|
1112
1181
|
* @since 4.0.0
|
|
1113
1182
|
*/
|
|
1114
|
-
export declare const encodePromise: <S extends Encoder<unknown>>(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Promise<S["Encoded"]>;
|
|
1183
|
+
export declare const encodePromise: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Promise<S["Encoded"]>;
|
|
1115
1184
|
/**
|
|
1116
1185
|
* Encodes an `unknown` input against a schema synchronously, throwing a
|
|
1117
1186
|
* {@link SchemaError} on failure. Use this when you want to serialize data at a
|
|
@@ -1119,6 +1188,8 @@ export declare const encodePromise: <S extends Encoder<unknown>>(schema: S) => (
|
|
|
1119
1188
|
* non-throwing alternatives see {@link encodeUnknownOption},
|
|
1120
1189
|
* {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For typed input
|
|
1121
1190
|
* use {@link encodeSync}.
|
|
1191
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1192
|
+
* application options override creation options.
|
|
1122
1193
|
*
|
|
1123
1194
|
* @category Encoding
|
|
1124
1195
|
* @since 4.0.0
|
|
@@ -1128,11 +1199,13 @@ export declare const encodeUnknownSync: typeof Parser.encodeUnknownSync;
|
|
|
1128
1199
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1129
1200
|
* throwing a {@link SchemaError} on failure. For `unknown` input use
|
|
1130
1201
|
* {@link encodeUnknownSync}.
|
|
1202
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
1203
|
+
* application options override creation options.
|
|
1131
1204
|
*
|
|
1132
1205
|
* @category Encoding
|
|
1133
1206
|
* @since 4.0.0
|
|
1134
1207
|
*/
|
|
1135
|
-
export declare const encodeSync: <S extends Encoder<unknown>>(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => S["Encoded"];
|
|
1208
|
+
export declare const encodeSync: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => S["Encoded"];
|
|
1136
1209
|
/**
|
|
1137
1210
|
* Creates a schema from an AST (Abstract Syntax Tree) node.
|
|
1138
1211
|
*
|
|
@@ -1407,25 +1480,41 @@ export declare function Literal<L extends AST.LiteralValue>(literal: L): Literal
|
|
|
1407
1480
|
*/
|
|
1408
1481
|
export declare namespace TemplateLiteral {
|
|
1409
1482
|
/**
|
|
1483
|
+
* Constraint for schema parts that can appear inside a `TemplateLiteral`.
|
|
1484
|
+
*
|
|
1485
|
+
* **Details**
|
|
1486
|
+
* The schema's encoded value must be a `string`, `number`, or `bigint` so it can
|
|
1487
|
+
* be converted into a template literal string segment.
|
|
1488
|
+
*
|
|
1410
1489
|
* @since 4.0.0
|
|
1411
1490
|
*/
|
|
1412
1491
|
interface SchemaPart extends Top {
|
|
1413
1492
|
readonly Encoded: string | number | bigint;
|
|
1414
1493
|
}
|
|
1415
1494
|
/**
|
|
1495
|
+
* Literal value that can be used directly as a part of a `TemplateLiteral`.
|
|
1496
|
+
*
|
|
1416
1497
|
* @since 4.0.0
|
|
1417
1498
|
*/
|
|
1418
1499
|
type LiteralPart = string | number | bigint;
|
|
1419
1500
|
/**
|
|
1501
|
+
* A single part of a `TemplateLiteral`, either an interpolated schema part or a
|
|
1502
|
+
* literal `string`, `number`, or `bigint`.
|
|
1503
|
+
*
|
|
1420
1504
|
* @since 4.0.0
|
|
1421
1505
|
*/
|
|
1422
1506
|
type Part = SchemaPart | LiteralPart;
|
|
1423
1507
|
/**
|
|
1508
|
+
* Ordered list of parts used to construct a `TemplateLiteral` schema.
|
|
1509
|
+
*
|
|
1424
1510
|
* @since 4.0.0
|
|
1425
1511
|
*/
|
|
1426
1512
|
type Parts = ReadonlyArray<Part>;
|
|
1427
1513
|
type AppendType<Template extends string, Next> = Next extends LiteralPart ? `${Template}${Next}` : Next extends Codec<unknown, infer E extends LiteralPart, unknown, unknown> ? `${Template}${E}` : never;
|
|
1428
1514
|
/**
|
|
1515
|
+
* Computes the encoded string literal type produced by concatenating the encoded
|
|
1516
|
+
* forms of all template literal parts.
|
|
1517
|
+
*
|
|
1429
1518
|
* @since 4.0.0
|
|
1430
1519
|
*/
|
|
1431
1520
|
type Encoded<Parts> = Parts extends readonly [...infer Init, infer Last] ? AppendType<Encoded<Init>, Last> : ``;
|
|
@@ -1463,6 +1552,12 @@ export declare function TemplateLiteral<const Parts extends TemplateLiteral.Part
|
|
|
1463
1552
|
*/
|
|
1464
1553
|
export declare namespace TemplateLiteralParser {
|
|
1465
1554
|
/**
|
|
1555
|
+
* Computes the decoded tuple type produced by `TemplateLiteralParser`.
|
|
1556
|
+
*
|
|
1557
|
+
* **Details**
|
|
1558
|
+
* Literal parts contribute their literal value to the tuple. Schema parts
|
|
1559
|
+
* contribute their decoded `Type`.
|
|
1560
|
+
*
|
|
1466
1561
|
* @since 4.0.0
|
|
1467
1562
|
*/
|
|
1468
1563
|
type Type<Parts> = Parts extends readonly [infer Head, ...infer Tail] ? readonly [
|
|
@@ -1497,8 +1592,8 @@ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> exte
|
|
|
1497
1592
|
*/
|
|
1498
1593
|
export declare function TemplateLiteralParser<const Parts extends TemplateLiteral.Parts>(parts: Parts): TemplateLiteralParser<Parts>;
|
|
1499
1594
|
/**
|
|
1500
|
-
* Represents a schema derived from a TypeScript
|
|
1501
|
-
* accepting any of its values.
|
|
1595
|
+
* Represents a schema derived from a TypeScript enum object or an enum-like
|
|
1596
|
+
* `as const` object, accepting any of its values.
|
|
1502
1597
|
*
|
|
1503
1598
|
* @see {@link Enum} for the constructor function.
|
|
1504
1599
|
* @since 4.0.0
|
|
@@ -1768,28 +1863,41 @@ export declare namespace Struct {
|
|
|
1768
1863
|
} ? K : never;
|
|
1769
1864
|
}[keyof Fields];
|
|
1770
1865
|
type Type_<F extends Fields, O extends keyof F = TypeOptionalKeys<F>, M extends keyof F = TypeMutableKeys<F>> = {
|
|
1771
|
-
readonly [K in
|
|
1866
|
+
readonly [K in keyof F as K extends M | O ? never : K]: F[K]["Type"];
|
|
1772
1867
|
} & {
|
|
1773
|
-
readonly [K in
|
|
1868
|
+
readonly [K in keyof F as K extends O ? K extends M ? never : K : never]?: F[K]["Type"];
|
|
1774
1869
|
} & {
|
|
1775
|
-
[K in
|
|
1870
|
+
-readonly [K in keyof F as K extends M ? K extends O ? never : K : never]: F[K]["Type"];
|
|
1776
1871
|
} & {
|
|
1777
|
-
[K in M & O]?: F[K]["Type"];
|
|
1872
|
+
-readonly [K in keyof F as K extends M & O ? K : never]?: F[K]["Type"];
|
|
1778
1873
|
};
|
|
1779
1874
|
/**
|
|
1875
|
+
* Computes the decoded object type for a struct field map.
|
|
1876
|
+
*
|
|
1877
|
+
* **Details**
|
|
1878
|
+
* Field schemas contribute their decoded `Type`. `optionalKey` and `optional`
|
|
1879
|
+
* produce optional properties, while `mutableKey` produces writable properties.
|
|
1880
|
+
*
|
|
1780
1881
|
* @since 4.0.0
|
|
1781
1882
|
*/
|
|
1782
1883
|
type Type<F extends Fields> = Simplify<Type_<F>>;
|
|
1783
1884
|
type Iso_<F extends Fields, O extends keyof F = TypeOptionalKeys<F>, M extends keyof F = TypeMutableKeys<F>> = {
|
|
1784
|
-
readonly [K in
|
|
1885
|
+
readonly [K in keyof F as K extends M | O ? never : K]: F[K]["Iso"];
|
|
1785
1886
|
} & {
|
|
1786
|
-
readonly [K in
|
|
1887
|
+
readonly [K in keyof F as K extends O ? K extends M ? never : K : never]?: F[K]["Iso"];
|
|
1787
1888
|
} & {
|
|
1788
|
-
[K in
|
|
1889
|
+
-readonly [K in keyof F as K extends M ? K extends O ? never : K : never]: F[K]["Iso"];
|
|
1789
1890
|
} & {
|
|
1790
|
-
[K in M & O]?: F[K]["Iso"];
|
|
1891
|
+
-readonly [K in keyof F as K extends M & O ? K : never]?: F[K]["Iso"];
|
|
1791
1892
|
};
|
|
1792
1893
|
/**
|
|
1894
|
+
* Computes the iso object type for a struct field map from each field schema's
|
|
1895
|
+
* `Iso` type.
|
|
1896
|
+
*
|
|
1897
|
+
* **Details**
|
|
1898
|
+
* The resulting property optionality and mutability follow the same field
|
|
1899
|
+
* modifiers used by `Struct.Type`.
|
|
1900
|
+
*
|
|
1793
1901
|
* @since 4.0.0
|
|
1794
1902
|
*/
|
|
1795
1903
|
type Iso<F extends Fields> = Simplify<Iso_<F>>;
|
|
@@ -1804,25 +1912,38 @@ export declare namespace Struct {
|
|
|
1804
1912
|
} ? K : never;
|
|
1805
1913
|
}[keyof Fields];
|
|
1806
1914
|
type Encoded_<F extends Fields, O extends keyof F = EncodedOptionalKeys<F>, M extends keyof F = EncodedMutableKeys<F>> = {
|
|
1807
|
-
readonly [K in
|
|
1915
|
+
readonly [K in keyof F as K extends M | O ? never : K]: F[K]["Encoded"];
|
|
1808
1916
|
} & {
|
|
1809
|
-
readonly [K in
|
|
1917
|
+
readonly [K in keyof F as K extends O ? K extends M ? never : K : never]?: F[K]["Encoded"];
|
|
1810
1918
|
} & {
|
|
1811
|
-
[K in
|
|
1919
|
+
-readonly [K in keyof F as K extends M ? K extends O ? never : K : never]: F[K]["Encoded"];
|
|
1812
1920
|
} & {
|
|
1813
|
-
[K in M & O]?: F[K]["Encoded"];
|
|
1921
|
+
-readonly [K in keyof F as K extends M & O ? K : never]?: F[K]["Encoded"];
|
|
1814
1922
|
};
|
|
1815
1923
|
/**
|
|
1924
|
+
* Computes the encoded object type for a struct field map.
|
|
1925
|
+
*
|
|
1926
|
+
* **Details**
|
|
1927
|
+
* Field schemas contribute their `Encoded` type. Encoded-side optionality and
|
|
1928
|
+
* mutability modifiers determine whether properties are optional or writable in
|
|
1929
|
+
* the encoded shape.
|
|
1930
|
+
*
|
|
1816
1931
|
* @since 4.0.0
|
|
1817
1932
|
*/
|
|
1818
1933
|
type Encoded<F extends Fields> = Simplify<Encoded_<F>>;
|
|
1819
1934
|
/**
|
|
1935
|
+
* Union of all decoding service requirements needed by the schemas in a struct
|
|
1936
|
+
* field map.
|
|
1937
|
+
*
|
|
1820
1938
|
* @since 4.0.0
|
|
1821
1939
|
*/
|
|
1822
1940
|
type DecodingServices<F extends Fields> = {
|
|
1823
1941
|
readonly [K in keyof F]: F[K]["DecodingServices"];
|
|
1824
1942
|
}[keyof F];
|
|
1825
1943
|
/**
|
|
1944
|
+
* Union of all encoding service requirements needed by the schemas in a struct
|
|
1945
|
+
* field map.
|
|
1946
|
+
*
|
|
1826
1947
|
* @since 4.0.0
|
|
1827
1948
|
*/
|
|
1828
1949
|
type EncodingServices<F extends Fields> = {
|
|
@@ -1839,11 +1960,24 @@ export declare namespace Struct {
|
|
|
1839
1960
|
readonly [K in keyof F as K extends O ? K : never]?: F[K]["~type.make"];
|
|
1840
1961
|
};
|
|
1841
1962
|
/**
|
|
1963
|
+
* Computes the input object type accepted when constructing a struct value.
|
|
1964
|
+
*
|
|
1965
|
+
* **Details**
|
|
1966
|
+
* Required fields use each field schema's `~type.make` input. Fields marked
|
|
1967
|
+
* optional or with a constructor default may be omitted.
|
|
1968
|
+
*
|
|
1842
1969
|
* @since 4.0.0
|
|
1843
1970
|
*/
|
|
1844
1971
|
type MakeIn<F extends Fields> = Simplify<MakeIn_<F>>;
|
|
1845
1972
|
}
|
|
1846
1973
|
/**
|
|
1974
|
+
* Schema type returned by `Schema.Struct` for an object with a fixed set of
|
|
1975
|
+
* schema-defined fields.
|
|
1976
|
+
*
|
|
1977
|
+
* **Details**
|
|
1978
|
+
* The `fields` property exposes the original field map for reuse, and
|
|
1979
|
+
* `mapFields` creates a new struct schema by transforming that field map.
|
|
1980
|
+
*
|
|
1847
1981
|
* @since 4.0.0
|
|
1848
1982
|
*/
|
|
1849
1983
|
export interface Struct<Fields extends Struct.Fields> extends Bottom<Struct.Type<Fields>, Struct.Encoded<Fields>, Struct.DecodingServices<Fields>, Struct.EncodingServices<Fields>, AST.Objects, Struct<Fields>, Struct.MakeIn<Fields>, Struct.Iso<Fields>> {
|
|
@@ -2032,6 +2166,12 @@ derive: {
|
|
|
2032
2166
|
*/
|
|
2033
2167
|
export declare namespace Record {
|
|
2034
2168
|
/**
|
|
2169
|
+
* Constraint for schemas that can be used as record keys.
|
|
2170
|
+
*
|
|
2171
|
+
* **Details**
|
|
2172
|
+
* The key schema must decode and encode property keys (`string`, `number`, or
|
|
2173
|
+
* `symbol`) so it can describe object property names.
|
|
2174
|
+
*
|
|
2035
2175
|
* @since 4.0.0
|
|
2036
2176
|
*/
|
|
2037
2177
|
interface Key extends Codec<PropertyKey, PropertyKey, unknown, unknown> {
|
|
@@ -2039,6 +2179,14 @@ export declare namespace Record {
|
|
|
2039
2179
|
readonly "Iso": PropertyKey;
|
|
2040
2180
|
}
|
|
2041
2181
|
/**
|
|
2182
|
+
* Computes the decoded object type for a record schema from its key and value
|
|
2183
|
+
* schemas.
|
|
2184
|
+
*
|
|
2185
|
+
* **Details**
|
|
2186
|
+
* The key schema supplies the property keys and the value schema supplies each
|
|
2187
|
+
* property's decoded `Type`. Optional and mutable value schemas affect the
|
|
2188
|
+
* resulting property optionality and writability.
|
|
2189
|
+
*
|
|
2042
2190
|
* @since 4.0.0
|
|
2043
2191
|
*/
|
|
2044
2192
|
type Type<Key extends Record.Key, Value extends Top> = Value extends {
|
|
@@ -2057,6 +2205,9 @@ export declare namespace Record {
|
|
|
2057
2205
|
readonly [P in Key["Type"]]: Value["Type"];
|
|
2058
2206
|
};
|
|
2059
2207
|
/**
|
|
2208
|
+
* Computes the iso object type for a record schema from the key schema's `Iso`
|
|
2209
|
+
* keys and the value schema's `Iso` values.
|
|
2210
|
+
*
|
|
2060
2211
|
* @since 4.0.0
|
|
2061
2212
|
*/
|
|
2062
2213
|
type Iso<Key extends Record.Key, Value extends Top> = Value extends {
|
|
@@ -2075,6 +2226,13 @@ export declare namespace Record {
|
|
|
2075
2226
|
readonly [P in Key["Iso"]]: Value["Iso"];
|
|
2076
2227
|
};
|
|
2077
2228
|
/**
|
|
2229
|
+
* Computes the encoded object type for a record schema from the key and value
|
|
2230
|
+
* schemas' encoded types.
|
|
2231
|
+
*
|
|
2232
|
+
* **Details**
|
|
2233
|
+
* Encoded-side optionality and mutability on the value schema determine whether
|
|
2234
|
+
* the encoded record properties are optional or writable.
|
|
2235
|
+
*
|
|
2078
2236
|
* @since 4.0.0
|
|
2079
2237
|
*/
|
|
2080
2238
|
type Encoded<Key extends Record.Key, Value extends Top> = Value extends {
|
|
@@ -2093,14 +2251,27 @@ export declare namespace Record {
|
|
|
2093
2251
|
readonly [P in Key["Encoded"]]: Value["Encoded"];
|
|
2094
2252
|
};
|
|
2095
2253
|
/**
|
|
2254
|
+
* Union of the decoding service requirements of a record's key schema and value
|
|
2255
|
+
* schema.
|
|
2256
|
+
*
|
|
2096
2257
|
* @since 4.0.0
|
|
2097
2258
|
*/
|
|
2098
2259
|
type DecodingServices<Key extends Record.Key, Value extends Top> = Key["DecodingServices"] | Value["DecodingServices"];
|
|
2099
2260
|
/**
|
|
2261
|
+
* Union of the encoding service requirements of a record's key schema and value
|
|
2262
|
+
* schema.
|
|
2263
|
+
*
|
|
2100
2264
|
* @since 4.0.0
|
|
2101
2265
|
*/
|
|
2102
2266
|
type EncodingServices<Key extends Record.Key, Value extends Top> = Key["EncodingServices"] | Value["EncodingServices"];
|
|
2103
2267
|
/**
|
|
2268
|
+
* Computes the input object type accepted when constructing a record value.
|
|
2269
|
+
*
|
|
2270
|
+
* **Details**
|
|
2271
|
+
* Keys use the key schema's `~type.make` type and values use the value schema's
|
|
2272
|
+
* `~type.make` type. Value optionality and mutability determine whether
|
|
2273
|
+
* properties are optional or writable.
|
|
2274
|
+
*
|
|
2104
2275
|
* @since 4.0.0
|
|
2105
2276
|
*/
|
|
2106
2277
|
type MakeIn<Key extends Record.Key, Value extends Top> = Value extends {
|
|
@@ -2166,47 +2337,72 @@ export declare function Record<Key extends Record.Key, Value extends Top>(key: K
|
|
|
2166
2337
|
*/
|
|
2167
2338
|
export declare namespace StructWithRest {
|
|
2168
2339
|
/**
|
|
2340
|
+
* Constraint for object-like schemas that can be used as the fixed portion of a
|
|
2341
|
+
* `StructWithRest` schema.
|
|
2342
|
+
*
|
|
2169
2343
|
* @since 4.0.0
|
|
2170
2344
|
*/
|
|
2171
2345
|
type Objects = Top & {
|
|
2172
2346
|
readonly ast: AST.Objects;
|
|
2173
2347
|
};
|
|
2174
2348
|
/**
|
|
2349
|
+
* Readonly list of record schemas that provide the additional index signatures
|
|
2350
|
+
* for a `StructWithRest` schema.
|
|
2351
|
+
*
|
|
2175
2352
|
* @since 4.0.0
|
|
2176
2353
|
*/
|
|
2177
2354
|
type Records = ReadonlyArray<$Record<Record.Key, Top>>;
|
|
2178
2355
|
type MergeTuple<T extends ReadonlyArray<unknown>> = T extends readonly [infer Head, ...infer Tail] ? Head & MergeTuple<Tail> : {};
|
|
2179
2356
|
/**
|
|
2357
|
+
* Computes the decoded type for `StructWithRest` by intersecting the base object
|
|
2358
|
+
* schema's decoded `Type` with the decoded types of all rest record schemas.
|
|
2359
|
+
*
|
|
2180
2360
|
* @since 4.0.0
|
|
2181
2361
|
*/
|
|
2182
2362
|
type Type<S extends Objects, Records extends StructWithRest.Records> = S["Type"] & MergeTuple<{
|
|
2183
2363
|
readonly [K in keyof Records]: Records[K]["Type"];
|
|
2184
2364
|
}>;
|
|
2185
2365
|
/**
|
|
2366
|
+
* Computes the iso type for `StructWithRest` by intersecting the base object
|
|
2367
|
+
* schema's `Iso` type with the `Iso` types of all rest record schemas.
|
|
2368
|
+
*
|
|
2186
2369
|
* @since 4.0.0
|
|
2187
2370
|
*/
|
|
2188
2371
|
type Iso<S extends Objects, Records extends StructWithRest.Records> = S["Iso"] & MergeTuple<{
|
|
2189
2372
|
readonly [K in keyof Records]: Records[K]["Iso"];
|
|
2190
2373
|
}>;
|
|
2191
2374
|
/**
|
|
2375
|
+
* Computes the encoded type for `StructWithRest` by intersecting the base object
|
|
2376
|
+
* schema's encoded type with the encoded types of all rest record schemas.
|
|
2377
|
+
*
|
|
2192
2378
|
* @since 4.0.0
|
|
2193
2379
|
*/
|
|
2194
2380
|
type Encoded<S extends Objects, Records extends StructWithRest.Records> = S["Encoded"] & MergeTuple<{
|
|
2195
2381
|
readonly [K in keyof Records]: Records[K]["Encoded"];
|
|
2196
2382
|
}>;
|
|
2197
2383
|
/**
|
|
2384
|
+
* Union of the decoding service requirements of the base object schema and all
|
|
2385
|
+
* rest record schemas.
|
|
2386
|
+
*
|
|
2198
2387
|
* @since 4.0.0
|
|
2199
2388
|
*/
|
|
2200
2389
|
type DecodingServices<S extends Objects, Records extends StructWithRest.Records> = S["DecodingServices"] | {
|
|
2201
2390
|
[K in keyof Records]: Records[K]["DecodingServices"];
|
|
2202
2391
|
}[number];
|
|
2203
2392
|
/**
|
|
2393
|
+
* Union of the encoding service requirements of the base object schema and all
|
|
2394
|
+
* rest record schemas.
|
|
2395
|
+
*
|
|
2204
2396
|
* @since 4.0.0
|
|
2205
2397
|
*/
|
|
2206
2398
|
type EncodingServices<S extends Objects, Records extends StructWithRest.Records> = S["EncodingServices"] | {
|
|
2207
2399
|
[K in keyof Records]: Records[K]["EncodingServices"];
|
|
2208
2400
|
}[number];
|
|
2209
2401
|
/**
|
|
2402
|
+
* Computes the input type accepted when constructing a `StructWithRest` value by
|
|
2403
|
+
* intersecting the base object's make input with the make inputs of all rest
|
|
2404
|
+
* record schemas.
|
|
2405
|
+
*
|
|
2210
2406
|
* @since 4.0.0
|
|
2211
2407
|
*/
|
|
2212
2408
|
type MakeIn<S extends Objects, Records extends StructWithRest.Records> = S["~type.make"] & MergeTuple<{
|
|
@@ -2257,6 +2453,9 @@ export declare function StructWithRest<const S extends StructWithRest.Objects, c
|
|
|
2257
2453
|
*/
|
|
2258
2454
|
export declare namespace Tuple {
|
|
2259
2455
|
/**
|
|
2456
|
+
* Constraint for the readonly array of element schemas used to define a
|
|
2457
|
+
* fixed-length `Tuple` schema.
|
|
2458
|
+
*
|
|
2260
2459
|
* @since 4.0.0
|
|
2261
2460
|
*/
|
|
2262
2461
|
type Elements = ReadonlyArray<Top>;
|
|
@@ -2266,6 +2465,12 @@ export declare namespace Tuple {
|
|
|
2266
2465
|
readonly "~type.optionality": "optional";
|
|
2267
2466
|
} ? Type_<Tail, readonly [...Out, T?]> : Type_<Tail, readonly [...Out, T]> : Out : Out;
|
|
2268
2467
|
/**
|
|
2468
|
+
* Computes the decoded tuple type for a tuple element schema array.
|
|
2469
|
+
*
|
|
2470
|
+
* **Details**
|
|
2471
|
+
* Each element contributes its decoded `Type`; optional element schemas produce
|
|
2472
|
+
* optional tuple positions.
|
|
2473
|
+
*
|
|
2269
2474
|
* @since 4.0.0
|
|
2270
2475
|
*/
|
|
2271
2476
|
type Type<E extends Elements> = Type_<E>;
|
|
@@ -2275,6 +2480,9 @@ export declare namespace Tuple {
|
|
|
2275
2480
|
readonly "~type.optionality": "optional";
|
|
2276
2481
|
} ? Iso_<Tail, readonly [...Out, T?]> : Iso_<Tail, readonly [...Out, T]> : Out : Out;
|
|
2277
2482
|
/**
|
|
2483
|
+
* Computes the iso tuple type for a tuple element schema array from each
|
|
2484
|
+
* element schema's `Iso` type.
|
|
2485
|
+
*
|
|
2278
2486
|
* @since 4.0.0
|
|
2279
2487
|
*/
|
|
2280
2488
|
type Iso<E extends Elements> = Iso_<E>;
|
|
@@ -2284,14 +2492,26 @@ export declare namespace Tuple {
|
|
|
2284
2492
|
readonly "~encoded.optionality": "optional";
|
|
2285
2493
|
} ? Encoded_<Tail, readonly [...Out, T?]> : Encoded_<Tail, readonly [...Out, T]> : Out : Out;
|
|
2286
2494
|
/**
|
|
2495
|
+
* Computes the encoded tuple type for a tuple element schema array.
|
|
2496
|
+
*
|
|
2497
|
+
* **Details**
|
|
2498
|
+
* Each element contributes its `Encoded` type; encoded-side optional element
|
|
2499
|
+
* schemas produce optional tuple positions.
|
|
2500
|
+
*
|
|
2287
2501
|
* @since 4.0.0
|
|
2288
2502
|
*/
|
|
2289
2503
|
type Encoded<E extends Elements> = Encoded_<E>;
|
|
2290
2504
|
/**
|
|
2505
|
+
* Union of all decoding service requirements needed by the tuple element
|
|
2506
|
+
* schemas.
|
|
2507
|
+
*
|
|
2291
2508
|
* @since 4.0.0
|
|
2292
2509
|
*/
|
|
2293
2510
|
type DecodingServices<E extends Elements> = E[number]["DecodingServices"];
|
|
2294
2511
|
/**
|
|
2512
|
+
* Union of all encoding service requirements needed by the tuple element
|
|
2513
|
+
* schemas.
|
|
2514
|
+
*
|
|
2295
2515
|
* @since 4.0.0
|
|
2296
2516
|
*/
|
|
2297
2517
|
type EncodingServices<E extends Elements> = E[number]["EncodingServices"];
|
|
@@ -2303,6 +2523,12 @@ export declare namespace Tuple {
|
|
|
2303
2523
|
readonly "~type.constructor.default": "with-default";
|
|
2304
2524
|
} ? MakeIn_<Tail, readonly [...Out, T?]> : MakeIn_<Tail, readonly [...Out, T]> : Out : Out;
|
|
2305
2525
|
/**
|
|
2526
|
+
* Computes the input tuple type accepted when constructing a tuple value.
|
|
2527
|
+
*
|
|
2528
|
+
* **Details**
|
|
2529
|
+
* Each element uses its `~type.make` input type. Optional elements and elements
|
|
2530
|
+
* with constructor defaults produce optional tuple positions.
|
|
2531
|
+
*
|
|
2306
2532
|
* @since 4.0.0
|
|
2307
2533
|
*/
|
|
2308
2534
|
type MakeIn<E extends Elements> = MakeIn_<E>;
|
|
@@ -2363,6 +2589,9 @@ export declare function Tuple<const Elements extends ReadonlyArray<Top>>(element
|
|
|
2363
2589
|
*/
|
|
2364
2590
|
export declare namespace TupleWithRest {
|
|
2365
2591
|
/**
|
|
2592
|
+
* Constraint for tuple-like schemas that can be used as the fixed leading
|
|
2593
|
+
* portion of a `TupleWithRest` schema.
|
|
2594
|
+
*
|
|
2366
2595
|
* @since 4.0.0
|
|
2367
2596
|
*/
|
|
2368
2597
|
type TupleType = Top & {
|
|
@@ -2373,10 +2602,23 @@ export declare namespace TupleWithRest {
|
|
|
2373
2602
|
readonly "Iso": ReadonlyArray<unknown>;
|
|
2374
2603
|
};
|
|
2375
2604
|
/**
|
|
2605
|
+
* Non-empty list of schemas used for the rest portion of a `TupleWithRest`.
|
|
2606
|
+
*
|
|
2607
|
+
* **Details**
|
|
2608
|
+
* The first schema describes the repeated rest element. Additional schemas, when
|
|
2609
|
+
* present, describe trailing tuple elements after the repeated rest segment.
|
|
2610
|
+
*
|
|
2376
2611
|
* @since 4.0.0
|
|
2377
2612
|
*/
|
|
2378
2613
|
type Rest = readonly [Top, ...Array<Top>];
|
|
2379
2614
|
/**
|
|
2615
|
+
* Computes the decoded tuple type for a `TupleWithRest`.
|
|
2616
|
+
*
|
|
2617
|
+
* **Details**
|
|
2618
|
+
* The output starts with the fixed tuple elements, continues with zero or more
|
|
2619
|
+
* values decoded by the first rest schema, and includes any trailing rest schemas
|
|
2620
|
+
* as fixed tuple positions.
|
|
2621
|
+
*
|
|
2380
2622
|
* @since 4.0.0
|
|
2381
2623
|
*/
|
|
2382
2624
|
type Type<T extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Top, ...infer Tail extends ReadonlyArray<Top>] ? Readonly<[
|
|
@@ -2387,6 +2629,13 @@ export declare namespace TupleWithRest {
|
|
|
2387
2629
|
}
|
|
2388
2630
|
]> : T;
|
|
2389
2631
|
/**
|
|
2632
|
+
* Computes the iso tuple type for a `TupleWithRest`.
|
|
2633
|
+
*
|
|
2634
|
+
* **Details**
|
|
2635
|
+
* The output starts with the fixed tuple's `Iso` elements, continues with zero
|
|
2636
|
+
* or more values using the first rest schema's `Iso`, and includes any trailing
|
|
2637
|
+
* rest schemas as fixed tuple positions.
|
|
2638
|
+
*
|
|
2390
2639
|
* @since 4.0.0
|
|
2391
2640
|
*/
|
|
2392
2641
|
type Iso<T extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Top, ...infer Tail extends ReadonlyArray<Top>] ? Readonly<[
|
|
@@ -2397,6 +2646,13 @@ export declare namespace TupleWithRest {
|
|
|
2397
2646
|
}
|
|
2398
2647
|
]> : T;
|
|
2399
2648
|
/**
|
|
2649
|
+
* Computes the encoded tuple type for `TupleWithRest`.
|
|
2650
|
+
*
|
|
2651
|
+
* **Details**
|
|
2652
|
+
* The leading tuple's encoded elements are kept first. The encoded type of the
|
|
2653
|
+
* first rest schema may repeat zero or more times, and the encoded types of any
|
|
2654
|
+
* additional rest schemas become required trailing tuple elements.
|
|
2655
|
+
*
|
|
2400
2656
|
* @since 4.0.0
|
|
2401
2657
|
*/
|
|
2402
2658
|
type Encoded<E extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Top, ...infer Tail extends ReadonlyArray<Top>] ? readonly [
|
|
@@ -2407,6 +2663,13 @@ export declare namespace TupleWithRest {
|
|
|
2407
2663
|
}
|
|
2408
2664
|
] : E;
|
|
2409
2665
|
/**
|
|
2666
|
+
* Computes the constructor input tuple type for `TupleWithRest`.
|
|
2667
|
+
*
|
|
2668
|
+
* **Details**
|
|
2669
|
+
* The leading tuple's make input elements are kept first. The make input type of
|
|
2670
|
+
* the first rest schema may repeat zero or more times, and the make input types
|
|
2671
|
+
* of any additional rest schemas become required trailing tuple elements.
|
|
2672
|
+
*
|
|
2410
2673
|
* @since 4.0.0
|
|
2411
2674
|
*/
|
|
2412
2675
|
type MakeIn<M extends ReadonlyArray<unknown>, Rest extends TupleWithRest.Rest> = Rest extends readonly [infer Head extends Top, ...infer Tail extends ReadonlyArray<Top>] ? readonly [
|
|
@@ -2428,9 +2691,14 @@ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends T
|
|
|
2428
2691
|
readonly rest: Rest;
|
|
2429
2692
|
}
|
|
2430
2693
|
/**
|
|
2431
|
-
* Extends a fixed-length tuple schema with
|
|
2432
|
-
*
|
|
2433
|
-
*
|
|
2694
|
+
* Extends a fixed-length tuple schema with a variadic rest segment.
|
|
2695
|
+
*
|
|
2696
|
+
* **Details**
|
|
2697
|
+
* The resulting tuple starts with the fixed elements from `schema`. The first
|
|
2698
|
+
* schema in `rest` is the repeatable element schema, and any additional schemas
|
|
2699
|
+
* in `rest` are required trailing tuple elements after the variadic segment. For
|
|
2700
|
+
* example, `[Schema.Boolean, Schema.String]` represents zero or more booleans
|
|
2701
|
+
* followed by a final string.
|
|
2434
2702
|
*
|
|
2435
2703
|
* **Example** (Tuple with rest)
|
|
2436
2704
|
*
|
|
@@ -2453,7 +2721,12 @@ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends T
|
|
|
2453
2721
|
*/
|
|
2454
2722
|
export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Rest extends TupleWithRest.Rest>(schema: S, rest: Rest): TupleWithRest<S, Rest>;
|
|
2455
2723
|
/**
|
|
2456
|
-
*
|
|
2724
|
+
* Schema interface produced by `Schema.Array` for readonly arrays.
|
|
2725
|
+
*
|
|
2726
|
+
* **Details**
|
|
2727
|
+
* The decoded type is `ReadonlyArray<S["Type"]>`, the encoded type is
|
|
2728
|
+
* `ReadonlyArray<S["Encoded"]>`, and the element schema is available as
|
|
2729
|
+
* `schema`.
|
|
2457
2730
|
*
|
|
2458
2731
|
* @since 4.0.0
|
|
2459
2732
|
*/
|
|
@@ -2521,6 +2794,13 @@ interface NonEmptyArrayLambda extends Lambda {
|
|
|
2521
2794
|
*/
|
|
2522
2795
|
export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
2523
2796
|
/**
|
|
2797
|
+
* Schema interface returned by `ArrayEnsure`, which normalizes a single item or
|
|
2798
|
+
* an array of items into a readonly array.
|
|
2799
|
+
*
|
|
2800
|
+
* **Details**
|
|
2801
|
+
* The schema decodes from `S` or `Schema.Array(S)` and produces
|
|
2802
|
+
* `ReadonlyArray<S["Type"]>`.
|
|
2803
|
+
*
|
|
2524
2804
|
* @category Arrays
|
|
2525
2805
|
* @since 4.0.0
|
|
2526
2806
|
*/
|
|
@@ -2528,15 +2808,16 @@ export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>,
|
|
|
2528
2808
|
readonly "Rebuild": ArrayEnsure<S>;
|
|
2529
2809
|
}
|
|
2530
2810
|
/**
|
|
2531
|
-
*
|
|
2811
|
+
* Creates a schema that accepts either a value decoded by `schema` or an array
|
|
2812
|
+
* decoded by `Schema.Array(schema)`, then returns an array.
|
|
2532
2813
|
*
|
|
2533
|
-
*
|
|
2534
|
-
*
|
|
2535
|
-
*
|
|
2814
|
+
* **Details**
|
|
2815
|
+
* The single-value branch is tried before the array branch. If `schema` itself
|
|
2816
|
+
* accepts arrays, an array input can be treated as one value and wrapped in a
|
|
2817
|
+
* one-element array.
|
|
2536
2818
|
*
|
|
2537
|
-
*
|
|
2538
|
-
*
|
|
2539
|
-
* - arrays with more than one element are encoded as arrays
|
|
2819
|
+
* During encoding, one-element arrays are encoded as the single element. Empty
|
|
2820
|
+
* arrays and arrays with two or more elements are encoded as arrays.
|
|
2540
2821
|
*
|
|
2541
2822
|
* @category Arrays
|
|
2542
2823
|
* @since 4.0.0
|
|
@@ -2813,6 +3094,12 @@ export interface refine<T extends S["Type"], S extends Top> extends Bottom<T, S[
|
|
|
2813
3094
|
* Narrows the TypeScript type of a schema's output via a type guard predicate,
|
|
2814
3095
|
* attaching the guard as a runtime filter check.
|
|
2815
3096
|
*
|
|
3097
|
+
* The `annotations` parameter annotates the filter created by the refinement.
|
|
3098
|
+
* With the default formatter, failed refinements use `message` first,
|
|
3099
|
+
* `expected` second, and `<filter>` when neither is provided. `identifier`
|
|
3100
|
+
* names type-level failures before the refinement runs; it does not name the
|
|
3101
|
+
* failed refinement itself.
|
|
3102
|
+
*
|
|
2816
3103
|
* @category Filtering
|
|
2817
3104
|
* @since 4.0.0
|
|
2818
3105
|
*/
|
|
@@ -2959,10 +3246,13 @@ export declare function catchEncoding<S extends Top>(f: (issue: Issue.Issue) =>
|
|
|
2959
3246
|
*/
|
|
2960
3247
|
export declare function catchEncodingWithContext<S extends Top, R = never>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue, R>): (self: S) => middlewareEncoding<S, S["EncodingServices"] | R>;
|
|
2961
3248
|
/**
|
|
2962
|
-
*
|
|
3249
|
+
* Schema type produced by `decodeTo` when a custom transformation composes a
|
|
3250
|
+
* `From` schema with a `To` schema.
|
|
2963
3251
|
*
|
|
2964
|
-
*
|
|
2965
|
-
*
|
|
3252
|
+
* **Details**
|
|
3253
|
+
* `Type` is `To["Type"]` and `Encoded` is `From["Encoded"]`. Decoding services
|
|
3254
|
+
* are `To["DecodingServices"] | From["DecodingServices"] | RD`; encoding
|
|
3255
|
+
* services are `To["EncodingServices"] | From["EncodingServices"] | RE`.
|
|
2966
3256
|
*
|
|
2967
3257
|
* @see {@link compose} for the passthrough (no transformation) variant
|
|
2968
3258
|
* @since 4.0.0
|
|
@@ -3134,7 +3424,14 @@ export interface WithoutConstructorDefault {
|
|
|
3134
3424
|
readonly "~type.constructor.default": "no-default";
|
|
3135
3425
|
}
|
|
3136
3426
|
/**
|
|
3137
|
-
*
|
|
3427
|
+
* Schema type returned by `withConstructorDefault` after attaching a default used
|
|
3428
|
+
* by constructor helpers.
|
|
3429
|
+
*
|
|
3430
|
+
* **Details**
|
|
3431
|
+
* The default affects `make` and related constructor helpers only; decoding and
|
|
3432
|
+
* encoding still use the original schema behavior. The schema is marked as
|
|
3433
|
+
* already having a constructor default so another constructor default cannot be
|
|
3434
|
+
* added.
|
|
3138
3435
|
*
|
|
3139
3436
|
* @see {@link withConstructorDefault} for the constructor
|
|
3140
3437
|
* @since 4.0.0
|
|
@@ -3166,7 +3463,7 @@ export interface withConstructorDefault<S extends Top & WithoutConstructorDefaul
|
|
|
3166
3463
|
*
|
|
3167
3464
|
* @since 4.0.0
|
|
3168
3465
|
*/
|
|
3169
|
-
export declare function withConstructorDefault<S extends Top & WithoutConstructorDefault>(defaultValue: Effect.Effect<S["~type.make.in"]>): (schema: S) => withConstructorDefault<S>;
|
|
3466
|
+
export declare function withConstructorDefault<S extends Top & WithoutConstructorDefault>(defaultValue: Effect.Effect<S["~type.make.in"], SchemaError>): (schema: S) => withConstructorDefault<S>;
|
|
3170
3467
|
/**
|
|
3171
3468
|
* The type produced by {@link withDecodingDefaultKey}: a schema whose `Encoded`
|
|
3172
3469
|
* side is `optionalKey` and that fills in a default `Encoded` value during decoding.
|
|
@@ -3174,8 +3471,8 @@ export declare function withConstructorDefault<S extends Top & WithoutConstructo
|
|
|
3174
3471
|
* @see {@link withDecodingDefaultKey} for the constructor
|
|
3175
3472
|
* @since 4.0.0
|
|
3176
3473
|
*/
|
|
3177
|
-
export interface withDecodingDefaultKey<S extends Top> extends decodeTo<S, optionalKey<toEncoded<S
|
|
3178
|
-
readonly "Rebuild": withDecodingDefaultKey<S>;
|
|
3474
|
+
export interface withDecodingDefaultKey<S extends Top, R = never> extends decodeTo<S, optionalKey<toEncoded<S>>, R> {
|
|
3475
|
+
readonly "Rebuild": withDecodingDefaultKey<S, R>;
|
|
3179
3476
|
}
|
|
3180
3477
|
/**
|
|
3181
3478
|
* Options for {@link withDecodingDefaultKey} and {@link withDecodingDefault}.
|
|
@@ -3220,7 +3517,7 @@ export type DecodingDefaultOptions = {
|
|
|
3220
3517
|
* @see {@link withDecodingDefaultTypeKey} for the variant where the default is a `Type` value
|
|
3221
3518
|
* @since 4.0.0
|
|
3222
3519
|
*/
|
|
3223
|
-
export declare function withDecodingDefaultKey<S extends Top>(defaultValue: Effect.Effect<S["Encoded"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultKey<S>;
|
|
3520
|
+
export declare function withDecodingDefaultKey<S extends Top, R = never>(defaultValue: Effect.Effect<S["Encoded"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultKey<S, R>;
|
|
3224
3521
|
/**
|
|
3225
3522
|
* The type produced by {@link withDecodingDefaultTypeKey}: a schema whose
|
|
3226
3523
|
* `Encoded` side is `optionalKey` and that fills in a default `Type` value
|
|
@@ -3229,8 +3526,8 @@ export declare function withDecodingDefaultKey<S extends Top>(defaultValue: Effe
|
|
|
3229
3526
|
* @see {@link withDecodingDefaultTypeKey} for the constructor
|
|
3230
3527
|
* @since 4.0.0
|
|
3231
3528
|
*/
|
|
3232
|
-
export interface withDecodingDefaultTypeKey<S extends Top> extends decodeTo<withDecodingDefaultKey<toType<S
|
|
3233
|
-
readonly "Rebuild": withDecodingDefaultTypeKey<S>;
|
|
3529
|
+
export interface withDecodingDefaultTypeKey<S extends Top, R = never> extends decodeTo<withDecodingDefaultKey<toType<S>, R>, optionalKey<S>> {
|
|
3530
|
+
readonly "Rebuild": withDecodingDefaultTypeKey<S, R>;
|
|
3234
3531
|
}
|
|
3235
3532
|
/**
|
|
3236
3533
|
* Makes a struct key optional on the `Encoded` side (`optionalKey`, so the
|
|
@@ -3251,7 +3548,7 @@ export interface withDecodingDefaultTypeKey<S extends Top> extends decodeTo<with
|
|
|
3251
3548
|
* @see {@link withDecodingDefaultType} for the value-level variant
|
|
3252
3549
|
* @since 4.0.0
|
|
3253
3550
|
*/
|
|
3254
|
-
export declare function withDecodingDefaultTypeKey<S extends Top>(defaultValue: Effect.Effect<S["Type"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultTypeKey<S>;
|
|
3551
|
+
export declare function withDecodingDefaultTypeKey<S extends Top, R = never>(defaultValue: Effect.Effect<S["Type"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultTypeKey<S, R>;
|
|
3255
3552
|
/**
|
|
3256
3553
|
* The type produced by {@link withDecodingDefault}: a schema whose `Encoded`
|
|
3257
3554
|
* side is `optional` and that fills in a default `Encoded` value during decoding.
|
|
@@ -3259,8 +3556,8 @@ export declare function withDecodingDefaultTypeKey<S extends Top>(defaultValue:
|
|
|
3259
3556
|
* @see {@link withDecodingDefault} for the constructor
|
|
3260
3557
|
* @since 4.0.0
|
|
3261
3558
|
*/
|
|
3262
|
-
export interface withDecodingDefault<S extends Top> extends decodeTo<S, optional<toEncoded<S
|
|
3263
|
-
readonly "Rebuild": withDecodingDefault<S>;
|
|
3559
|
+
export interface withDecodingDefault<S extends Top, R = never> extends decodeTo<S, optional<toEncoded<S>>, R> {
|
|
3560
|
+
readonly "Rebuild": withDecodingDefault<S, R>;
|
|
3264
3561
|
}
|
|
3265
3562
|
/**
|
|
3266
3563
|
* Wraps the `Encoded` side with `optional` (key absent **or** `undefined`)
|
|
@@ -3293,7 +3590,7 @@ export interface withDecodingDefault<S extends Top> extends decodeTo<S, optional
|
|
|
3293
3590
|
* @see {@link withDecodingDefaultType} for the variant where the default is a `Type` value
|
|
3294
3591
|
* @since 4.0.0
|
|
3295
3592
|
*/
|
|
3296
|
-
export declare function withDecodingDefault<S extends Top>(defaultValue: Effect.Effect<S["Encoded"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefault<S>;
|
|
3593
|
+
export declare function withDecodingDefault<S extends Top, R = never>(defaultValue: Effect.Effect<S["Encoded"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefault<S, R>;
|
|
3297
3594
|
/**
|
|
3298
3595
|
* The type produced by {@link withDecodingDefaultType}: a schema whose
|
|
3299
3596
|
* `Encoded` side is `optional` and that fills in a default `Type` value during
|
|
@@ -3302,8 +3599,8 @@ export declare function withDecodingDefault<S extends Top>(defaultValue: Effect.
|
|
|
3302
3599
|
* @see {@link withDecodingDefaultType} for the constructor
|
|
3303
3600
|
* @since 4.0.0
|
|
3304
3601
|
*/
|
|
3305
|
-
export interface withDecodingDefaultType<S extends Top> extends decodeTo<withDecodingDefault<toType<S
|
|
3306
|
-
readonly "Rebuild": withDecodingDefaultType<S>;
|
|
3602
|
+
export interface withDecodingDefaultType<S extends Top, R = never> extends decodeTo<withDecodingDefault<toType<S>, R>, optional<S>> {
|
|
3603
|
+
readonly "Rebuild": withDecodingDefaultType<S, R>;
|
|
3307
3604
|
}
|
|
3308
3605
|
/**
|
|
3309
3606
|
* Wraps the `Encoded` side with `optional` (key absent **or** `undefined`)
|
|
@@ -3324,7 +3621,7 @@ export interface withDecodingDefaultType<S extends Top> extends decodeTo<withDec
|
|
|
3324
3621
|
* @see {@link withDecodingDefaultTypeKey} for the key-level variant
|
|
3325
3622
|
* @since 4.0.0
|
|
3326
3623
|
*/
|
|
3327
|
-
export declare function withDecodingDefaultType<S extends Top>(defaultValue: Effect.Effect<S["Type"]>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultType<S>;
|
|
3624
|
+
export declare function withDecodingDefaultType<S extends Top, R = never>(defaultValue: Effect.Effect<S["Type"], SchemaError, R>, options?: DecodingDefaultOptions): (self: S) => withDecodingDefaultType<S, R>;
|
|
3328
3625
|
/**
|
|
3329
3626
|
* The type produced by {@link tag} — a literal schema with a constructor default.
|
|
3330
3627
|
*
|
|
@@ -3380,7 +3677,7 @@ export declare function tag<Tag extends AST.LiteralValue>(literal: Tag): tag<Tag
|
|
|
3380
3677
|
* @see {@link tag} for the variant that keeps the tag during encoding
|
|
3381
3678
|
* @since 4.0.0
|
|
3382
3679
|
*/
|
|
3383
|
-
export declare function tagDefaultOmit<Tag extends AST.LiteralValue>(literal: Tag): withDecodingDefaultKey<tag<Tag
|
|
3680
|
+
export declare function tagDefaultOmit<Tag extends AST.LiteralValue>(literal: Tag): withDecodingDefaultKey<tag<Tag>, never>;
|
|
3384
3681
|
/**
|
|
3385
3682
|
* The type produced by {@link TaggedStruct} — a {@link Struct} with an extra `_tag` field of type {@link tag}.
|
|
3386
3683
|
*
|
|
@@ -3641,9 +3938,17 @@ export declare function link<T>(): <To extends Top>(encodeTo: To, transformation
|
|
|
3641
3938
|
readonly encode: Getter.Getter<NoInfer<To["Type"]>, T>;
|
|
3642
3939
|
}) => AST.Link;
|
|
3643
3940
|
/**
|
|
3644
|
-
* Creates a custom filter
|
|
3645
|
-
*
|
|
3646
|
-
*
|
|
3941
|
+
* Creates a custom validation filter from a predicate function.
|
|
3942
|
+
*
|
|
3943
|
+
* **Details**
|
|
3944
|
+
* The predicate receives the decoded input value, the schema AST, and parse
|
|
3945
|
+
* options, and returns a `FilterOutput`. Non-success outputs are normalized into
|
|
3946
|
+
* schema issues. The `annotations` parameter annotates the filter itself; with
|
|
3947
|
+
* the default formatter, failures use `message` first, `expected` second, and
|
|
3948
|
+
* `<filter>` when neither is provided.
|
|
3949
|
+
*
|
|
3950
|
+
* When `abort` is `true`, parsing stops after this filter fails instead of
|
|
3951
|
+
* collecting later check failures.
|
|
3647
3952
|
*
|
|
3648
3953
|
* **Example** (Failure at a nested path)
|
|
3649
3954
|
*
|
|
@@ -3791,34 +4096,29 @@ export declare const isPattern: (regExp: globalThis.RegExp, annotations?: Annota
|
|
|
3791
4096
|
*/
|
|
3792
4097
|
export declare const isStringFinite: (annotations?: Annotations.Filter) => AST.Filter<string>;
|
|
3793
4098
|
/**
|
|
3794
|
-
* Validates that a string
|
|
3795
|
-
*
|
|
3796
|
-
* **JSON Schema**
|
|
4099
|
+
* Validates that a string is a signed base-10 integer literal for Effect's
|
|
4100
|
+
* BigInt string encoding.
|
|
3797
4101
|
*
|
|
3798
|
-
*
|
|
3799
|
-
*
|
|
3800
|
-
*
|
|
3801
|
-
*
|
|
4102
|
+
* **Details**
|
|
4103
|
+
* The check uses the pattern `^-?\d+$`. It does not accept leading `+`, decimal
|
|
4104
|
+
* points, exponent notation, separators, or non-decimal inputs such as
|
|
4105
|
+
* hexadecimal strings.
|
|
3802
4106
|
*
|
|
3803
|
-
*
|
|
3804
|
-
*
|
|
4107
|
+
* **JSON Schema**
|
|
4108
|
+
* This check corresponds to a `pattern` constraint with the same signed
|
|
4109
|
+
* base-10 integer pattern.
|
|
3805
4110
|
*
|
|
3806
4111
|
* @category String checks
|
|
3807
4112
|
* @since 4.0.0
|
|
3808
4113
|
*/
|
|
3809
4114
|
export declare const isStringBigInt: (annotations?: Annotations.Filter) => AST.Filter<string>;
|
|
3810
4115
|
/**
|
|
3811
|
-
* Validates that a string
|
|
3812
|
-
*
|
|
3813
|
-
* **JSON Schema**
|
|
4116
|
+
* Validates that a string has the `Symbol(description)` format used by Effect's
|
|
4117
|
+
* symbol string encoding.
|
|
3814
4118
|
*
|
|
3815
|
-
*
|
|
3816
|
-
*
|
|
3817
|
-
*
|
|
3818
|
-
* **Arbitrary**
|
|
3819
|
-
*
|
|
3820
|
-
* When generating test data with fast-check, this applies a `patterns`
|
|
3821
|
-
* constraint to ensure generated strings match the Symbol string pattern.
|
|
4119
|
+
* **Details**
|
|
4120
|
+
* The check uses the pattern `^Symbol\((.*)\)$`. It is not a general test for
|
|
4121
|
+
* whether a string can be passed to JavaScript's `Symbol()` function.
|
|
3822
4122
|
*
|
|
3823
4123
|
* @category String checks
|
|
3824
4124
|
* @since 4.0.0
|
|
@@ -3897,119 +4197,84 @@ export declare function isBase64(annotations?: Annotations.Filter): AST.Filter<s
|
|
|
3897
4197
|
*/
|
|
3898
4198
|
export declare function isBase64Url(annotations?: Annotations.Filter): AST.Filter<string>;
|
|
3899
4199
|
/**
|
|
3900
|
-
* Validates that a string starts with the specified prefix.
|
|
3901
|
-
*
|
|
3902
|
-
* **JSON Schema**
|
|
3903
|
-
*
|
|
3904
|
-
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
3905
|
-
* strings starting with the specified prefix.
|
|
3906
|
-
*
|
|
3907
|
-
* **Arbitrary**
|
|
4200
|
+
* Validates at runtime that a string starts with the specified literal prefix.
|
|
3908
4201
|
*
|
|
3909
|
-
*
|
|
3910
|
-
*
|
|
4202
|
+
* **Notes**
|
|
4203
|
+
* The JSON Schema and arbitrary metadata are built from `^${startsWith}` without
|
|
4204
|
+
* escaping regexp metacharacters. If the prefix contains regexp syntax, generated
|
|
4205
|
+
* patterns may not be equivalent to the runtime `startsWith` check.
|
|
3911
4206
|
*
|
|
3912
4207
|
* @category String checks
|
|
3913
4208
|
* @since 4.0.0
|
|
3914
4209
|
*/
|
|
3915
4210
|
export declare function isStartsWith(startsWith: string, annotations?: Annotations.Filter): AST.Filter<string>;
|
|
3916
4211
|
/**
|
|
3917
|
-
* Validates that a string ends with the specified suffix.
|
|
3918
|
-
*
|
|
3919
|
-
* **JSON Schema**
|
|
3920
|
-
*
|
|
3921
|
-
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
3922
|
-
* strings ending with the specified suffix.
|
|
3923
|
-
*
|
|
3924
|
-
* **Arbitrary**
|
|
4212
|
+
* Validates at runtime that a string ends with the specified literal suffix.
|
|
3925
4213
|
*
|
|
3926
|
-
*
|
|
3927
|
-
*
|
|
4214
|
+
* **Notes**
|
|
4215
|
+
* The JSON Schema and arbitrary metadata are built from `${endsWith}$` without
|
|
4216
|
+
* escaping regexp metacharacters. If the suffix contains regexp syntax, generated
|
|
4217
|
+
* patterns may not be equivalent to the runtime `endsWith` check.
|
|
3928
4218
|
*
|
|
3929
4219
|
* @category String checks
|
|
3930
4220
|
* @since 4.0.0
|
|
3931
4221
|
*/
|
|
3932
4222
|
export declare function isEndsWith(endsWith: string, annotations?: Annotations.Filter): AST.Filter<string>;
|
|
3933
4223
|
/**
|
|
3934
|
-
* Validates that a string contains the specified substring.
|
|
3935
|
-
*
|
|
3936
|
-
* **JSON Schema**
|
|
3937
|
-
*
|
|
3938
|
-
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
3939
|
-
* strings containing the specified substring.
|
|
3940
|
-
*
|
|
3941
|
-
* **Arbitrary**
|
|
4224
|
+
* Validates at runtime that a string contains the specified literal substring.
|
|
3942
4225
|
*
|
|
3943
|
-
*
|
|
3944
|
-
*
|
|
4226
|
+
* **Notes**
|
|
4227
|
+
* The JSON Schema and arbitrary metadata use the substring as a raw regexp
|
|
4228
|
+
* pattern. If the substring contains regexp syntax, generated patterns may not be
|
|
4229
|
+
* equivalent to the runtime `includes` check.
|
|
3945
4230
|
*
|
|
3946
4231
|
* @category String checks
|
|
3947
4232
|
* @since 4.0.0
|
|
3948
4233
|
*/
|
|
3949
4234
|
export declare function isIncludes(includes: string, annotations?: Annotations.Filter): AST.Filter<string>;
|
|
3950
4235
|
/**
|
|
3951
|
-
* Validates that a string
|
|
4236
|
+
* Validates that a string is unchanged by JavaScript's `toUpperCase()`.
|
|
3952
4237
|
*
|
|
3953
|
-
* **
|
|
3954
|
-
*
|
|
3955
|
-
*
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
3958
|
-
* **Arbitrary**
|
|
3959
|
-
*
|
|
3960
|
-
* When generating test data with fast-check, this applies a `patterns`
|
|
3961
|
-
* constraint to ensure generated strings contain only uppercase characters.
|
|
4238
|
+
* **Details**
|
|
4239
|
+
* This accepts empty strings and characters that do not have lowercase forms,
|
|
4240
|
+
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
4241
|
+
* change when uppercased.
|
|
3962
4242
|
*
|
|
3963
4243
|
* @category String checks
|
|
3964
4244
|
* @since 4.0.0
|
|
3965
4245
|
*/
|
|
3966
4246
|
export declare function isUppercased(annotations?: Annotations.Filter): AST.Filter<string>;
|
|
3967
4247
|
/**
|
|
3968
|
-
* Validates that a string
|
|
4248
|
+
* Validates that a string is unchanged by JavaScript's `toLowerCase()`.
|
|
3969
4249
|
*
|
|
3970
|
-
* **
|
|
3971
|
-
*
|
|
3972
|
-
*
|
|
3973
|
-
*
|
|
3974
|
-
*
|
|
3975
|
-
* **Arbitrary**
|
|
3976
|
-
*
|
|
3977
|
-
* When generating test data with fast-check, this applies a `patterns`
|
|
3978
|
-
* constraint to ensure generated strings contain only lowercase characters.
|
|
4250
|
+
* **Details**
|
|
4251
|
+
* This accepts empty strings and characters that do not have uppercase forms,
|
|
4252
|
+
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
4253
|
+
* change when lowercased.
|
|
3979
4254
|
*
|
|
3980
4255
|
* @category String checks
|
|
3981
4256
|
* @since 4.0.0
|
|
3982
4257
|
*/
|
|
3983
4258
|
export declare function isLowercased(annotations?: Annotations.Filter): AST.Filter<string>;
|
|
3984
4259
|
/**
|
|
3985
|
-
* Validates that
|
|
4260
|
+
* Validates that the first character of a string is unchanged by
|
|
4261
|
+
* `toUpperCase()`.
|
|
3986
4262
|
*
|
|
3987
|
-
* **
|
|
3988
|
-
*
|
|
3989
|
-
*
|
|
3990
|
-
* strings with the first character in uppercase.
|
|
3991
|
-
*
|
|
3992
|
-
* **Arbitrary**
|
|
3993
|
-
*
|
|
3994
|
-
* When generating test data with fast-check, this applies a `patterns`
|
|
3995
|
-
* constraint to ensure generated strings have the first character in uppercase.
|
|
4263
|
+
* **Details**
|
|
4264
|
+
* Empty strings pass. Strings whose first character has no lowercase form, such
|
|
4265
|
+
* as a digit, punctuation mark, or whitespace, also pass.
|
|
3996
4266
|
*
|
|
3997
4267
|
* @category String checks
|
|
3998
4268
|
* @since 4.0.0
|
|
3999
4269
|
*/
|
|
4000
4270
|
export declare function isCapitalized(annotations?: Annotations.Filter): AST.Filter<string>;
|
|
4001
4271
|
/**
|
|
4002
|
-
* Validates that
|
|
4272
|
+
* Validates that the first character of a string is unchanged by
|
|
4273
|
+
* `toLowerCase()`.
|
|
4003
4274
|
*
|
|
4004
|
-
* **
|
|
4005
|
-
*
|
|
4006
|
-
*
|
|
4007
|
-
* strings with the first character in lowercase.
|
|
4008
|
-
*
|
|
4009
|
-
* **Arbitrary**
|
|
4010
|
-
*
|
|
4011
|
-
* When generating test data with fast-check, this applies a `patterns`
|
|
4012
|
-
* constraint to ensure generated strings have the first character in lowercase.
|
|
4275
|
+
* **Details**
|
|
4276
|
+
* Empty strings pass. Strings whose first character has no uppercase form, such
|
|
4277
|
+
* as a digit, punctuation mark, or whitespace, also pass.
|
|
4013
4278
|
*
|
|
4014
4279
|
* @category String checks
|
|
4015
4280
|
* @since 4.0.0
|
|
@@ -4485,7 +4750,11 @@ export declare const isLessThanBigDecimal: (exclusiveMaximum: BigDecimal_.BigDec
|
|
|
4485
4750
|
*/
|
|
4486
4751
|
export declare const isLessThanOrEqualToBigDecimal: (maximum: BigDecimal_.BigDecimal, annotations?: Annotations.Filter) => AST.Filter<BigDecimal_.BigDecimal>;
|
|
4487
4752
|
/**
|
|
4488
|
-
* Validates that a BigDecimal is within a specified range.
|
|
4753
|
+
* Validates that a `BigDecimal` is within a specified range.
|
|
4754
|
+
*
|
|
4755
|
+
* **Details**
|
|
4756
|
+
* The minimum and maximum boundaries are inclusive by default. Pass
|
|
4757
|
+
* `exclusiveMinimum` or `exclusiveMaximum` to exclude either boundary.
|
|
4489
4758
|
*
|
|
4490
4759
|
* @category BigDecimal checks
|
|
4491
4760
|
* @since 4.0.0
|
|
@@ -4709,37 +4978,38 @@ export declare function isMaxProperties(maxProperties: number, annotations?: Ann
|
|
|
4709
4978
|
*/
|
|
4710
4979
|
export declare function isPropertiesLengthBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): AST.Filter<object>;
|
|
4711
4980
|
/**
|
|
4712
|
-
* Validates that
|
|
4713
|
-
*
|
|
4981
|
+
* Validates that every own property key of an object satisfies the encoded side
|
|
4982
|
+
* of the provided key schema.
|
|
4714
4983
|
*
|
|
4715
|
-
* **
|
|
4984
|
+
* **Details**
|
|
4985
|
+
* This check uses `Reflect.ownKeys`, so symbol keys are validated in addition to
|
|
4986
|
+
* string property names.
|
|
4716
4987
|
*
|
|
4717
|
-
*
|
|
4988
|
+
* **JSON Schema**
|
|
4989
|
+
* For string property names, this corresponds to the `propertyNames` constraint
|
|
4990
|
+
* in JSON Schema.
|
|
4718
4991
|
*
|
|
4719
4992
|
* @category Object checks
|
|
4720
4993
|
* @since 4.0.0
|
|
4721
4994
|
*/
|
|
4722
4995
|
export declare function isPropertyNames(keySchema: Top, annotations?: Annotations.Filter): AST.Filter<object>;
|
|
4723
4996
|
/**
|
|
4724
|
-
* Validates that all items in an array are unique according to
|
|
4725
|
-
* equivalence function.
|
|
4997
|
+
* Validates that all items in an array are unique according to Effect equality.
|
|
4726
4998
|
*
|
|
4727
4999
|
* **JSON Schema**
|
|
4728
|
-
*
|
|
4729
5000
|
* This check corresponds to the `uniqueItems: true` constraint in JSON Schema.
|
|
4730
5001
|
*
|
|
4731
5002
|
* **Arbitrary**
|
|
4732
|
-
*
|
|
4733
|
-
*
|
|
4734
|
-
* constraint using the provided equivalence function to ensure generated arrays
|
|
4735
|
-
* contain only unique items.
|
|
5003
|
+
* When generating test data with fast-check, this applies a comparator based on
|
|
5004
|
+
* Effect equality to ensure generated arrays contain only unique items.
|
|
4736
5005
|
*
|
|
4737
5006
|
* @category Array checks
|
|
4738
5007
|
* @since 4.0.0
|
|
4739
5008
|
*/
|
|
4740
5009
|
export declare function isUnique<T>(annotations?: Annotations.Filter): AST.Filter<readonly T[]>;
|
|
4741
5010
|
/**
|
|
4742
|
-
*
|
|
5011
|
+
* Type-level representation of the `NonEmptyString` schema, which validates
|
|
5012
|
+
* strings with a length of at least one.
|
|
4743
5013
|
*
|
|
4744
5014
|
* @category String
|
|
4745
5015
|
* @since 4.0.0
|
|
@@ -4756,7 +5026,8 @@ export interface NonEmptyString extends String {
|
|
|
4756
5026
|
*/
|
|
4757
5027
|
export declare const NonEmptyString: NonEmptyString;
|
|
4758
5028
|
/**
|
|
4759
|
-
*
|
|
5029
|
+
* Type-level representation of the `Char` schema, which validates strings whose
|
|
5030
|
+
* length is exactly one.
|
|
4760
5031
|
*
|
|
4761
5032
|
* @category String
|
|
4762
5033
|
* @since 4.0.0
|
|
@@ -4797,6 +5068,12 @@ export interface Option<A extends Top> extends declareConstructor<Option_.Option
|
|
|
4797
5068
|
readonly value: A;
|
|
4798
5069
|
}
|
|
4799
5070
|
/**
|
|
5071
|
+
* Iso representation used for `Option` schemas.
|
|
5072
|
+
*
|
|
5073
|
+
* **Details**
|
|
5074
|
+
* `None` is represented as `{ _tag: "None" }`, while `Some` is represented as
|
|
5075
|
+
* `{ _tag: "Some", value }` using the wrapped schema's `Iso` type.
|
|
5076
|
+
*
|
|
4800
5077
|
* @category Option
|
|
4801
5078
|
* @since 4.0.0
|
|
4802
5079
|
*/
|
|
@@ -4814,7 +5091,8 @@ export type OptionIso<A extends Top> = {
|
|
|
4814
5091
|
*/
|
|
4815
5092
|
export declare function Option<A extends Top>(value: A): Option<A>;
|
|
4816
5093
|
/**
|
|
4817
|
-
*
|
|
5094
|
+
* Type-level representation of a schema that decodes `null` as `None` and all
|
|
5095
|
+
* other values as `Some`.
|
|
4818
5096
|
*
|
|
4819
5097
|
* @category Option
|
|
4820
5098
|
* @since 4.0.0
|
|
@@ -4838,7 +5116,8 @@ export interface OptionFromNullOr<S extends Top> extends decodeTo<Option<toType<
|
|
|
4838
5116
|
*/
|
|
4839
5117
|
export declare function OptionFromNullOr<S extends Top>(schema: S): OptionFromNullOr<S>;
|
|
4840
5118
|
/**
|
|
4841
|
-
*
|
|
5119
|
+
* Type-level representation of a schema that decodes `undefined` as `None` and
|
|
5120
|
+
* all other values as `Some`.
|
|
4842
5121
|
*
|
|
4843
5122
|
* @category Option
|
|
4844
5123
|
* @since 4.0.0
|
|
@@ -4862,7 +5141,8 @@ export interface OptionFromUndefinedOr<S extends Top> extends decodeTo<Option<to
|
|
|
4862
5141
|
*/
|
|
4863
5142
|
export declare function OptionFromUndefinedOr<S extends Top>(schema: S): OptionFromUndefinedOr<S>;
|
|
4864
5143
|
/**
|
|
4865
|
-
*
|
|
5144
|
+
* Type-level representation of a schema that decodes `null` or `undefined` as
|
|
5145
|
+
* `None` and all other values as `Some`.
|
|
4866
5146
|
*
|
|
4867
5147
|
* @category Option
|
|
4868
5148
|
* @since 4.0.0
|
|
@@ -4888,7 +5168,8 @@ export declare function OptionFromNullishOr<S extends Top>(schema: S, options?:
|
|
|
4888
5168
|
onNoneEncoding: null | undefined;
|
|
4889
5169
|
}): OptionFromNullishOr<S>;
|
|
4890
5170
|
/**
|
|
4891
|
-
*
|
|
5171
|
+
* Type-level representation of a schema that decodes a missing object key as
|
|
5172
|
+
* `None` and a present key as `Some`.
|
|
4892
5173
|
*
|
|
4893
5174
|
* @category Option
|
|
4894
5175
|
* @since 4.0.0
|
|
@@ -4912,7 +5193,8 @@ export interface OptionFromOptionalKey<S extends Top> extends decodeTo<Option<to
|
|
|
4912
5193
|
*/
|
|
4913
5194
|
export declare function OptionFromOptionalKey<S extends Top>(schema: S): OptionFromOptionalKey<S>;
|
|
4914
5195
|
/**
|
|
4915
|
-
*
|
|
5196
|
+
* Type-level representation of a schema that decodes a missing key or
|
|
5197
|
+
* `undefined` value as `None` and other present values as `Some`.
|
|
4916
5198
|
*
|
|
4917
5199
|
* @category Option
|
|
4918
5200
|
* @since 4.0.0
|
|
@@ -4938,7 +5220,8 @@ export interface OptionFromOptional<S extends Top> extends decodeTo<Option<toTyp
|
|
|
4938
5220
|
*/
|
|
4939
5221
|
export declare function OptionFromOptional<S extends Top>(schema: S): OptionFromOptional<S>;
|
|
4940
5222
|
/**
|
|
4941
|
-
*
|
|
5223
|
+
* Type-level representation of a schema that decodes a missing key, `undefined`,
|
|
5224
|
+
* or `null` as `None` and all other present values as `Some`.
|
|
4942
5225
|
*
|
|
4943
5226
|
* @category Option
|
|
4944
5227
|
* @since 4.0.0
|
|
@@ -4981,6 +5264,12 @@ export interface Result<A extends Top, E extends Top> extends declareConstructor
|
|
|
4981
5264
|
readonly failure: E;
|
|
4982
5265
|
}
|
|
4983
5266
|
/**
|
|
5267
|
+
* Iso representation used for `Result` schemas.
|
|
5268
|
+
*
|
|
5269
|
+
* **Details**
|
|
5270
|
+
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
5271
|
+
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
5272
|
+
*
|
|
4984
5273
|
* @category Result
|
|
4985
5274
|
* @since 4.0.0
|
|
4986
5275
|
*/
|
|
@@ -5036,7 +5325,8 @@ export declare function Redacted<S extends Top>(value: S, options?: {
|
|
|
5036
5325
|
readonly label?: string | undefined;
|
|
5037
5326
|
}): Redacted<S>;
|
|
5038
5327
|
/**
|
|
5039
|
-
*
|
|
5328
|
+
* Type-level representation of a schema that decodes a raw value with the
|
|
5329
|
+
* provided schema and wraps the result in `Redacted`.
|
|
5040
5330
|
*
|
|
5041
5331
|
* @category Redacted
|
|
5042
5332
|
* @since 4.0.0
|
|
@@ -5064,10 +5354,14 @@ export declare function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
|
5064
5354
|
readonly label?: string | undefined;
|
|
5065
5355
|
}): RedactedFromValue<S>;
|
|
5066
5356
|
/**
|
|
5067
|
-
* Schema for a single `Cause.Reason
|
|
5068
|
-
*
|
|
5357
|
+
* Schema for a single `Cause.Reason`, representing one reason a fiber may fail:
|
|
5358
|
+
* a typed error (`Fail`), an unexpected defect (`Die`), or an interrupt
|
|
5069
5359
|
* (`Interrupt`).
|
|
5070
5360
|
*
|
|
5361
|
+
* **Details**
|
|
5362
|
+
* The `error` schema validates typed failures and the `defect` schema validates
|
|
5363
|
+
* unexpected defects.
|
|
5364
|
+
*
|
|
5071
5365
|
* @category CauseReason
|
|
5072
5366
|
* @since 4.0.0
|
|
5073
5367
|
*/
|
|
@@ -5077,6 +5371,12 @@ export interface CauseReason<E extends Top, D extends Top> extends declareConstr
|
|
|
5077
5371
|
readonly defect: D;
|
|
5078
5372
|
}
|
|
5079
5373
|
/**
|
|
5374
|
+
* Iso representation used for `CauseReason` schemas.
|
|
5375
|
+
*
|
|
5376
|
+
* **Details**
|
|
5377
|
+
* Failures are represented with a `Fail` tag and encoded error, defects with a
|
|
5378
|
+
* `Die` tag and encoded defect, and interrupts with an optional `fiberId`.
|
|
5379
|
+
*
|
|
5080
5380
|
* @category CauseReason
|
|
5081
5381
|
* @since 4.0.0
|
|
5082
5382
|
*/
|
|
@@ -5091,15 +5391,20 @@ export type CauseReasonIso<E extends Top, D extends Top> = {
|
|
|
5091
5391
|
readonly fiberId: number | undefined;
|
|
5092
5392
|
};
|
|
5093
5393
|
/**
|
|
5094
|
-
* Creates a schema for `Cause.Reason
|
|
5394
|
+
* Creates a schema for `Cause.Reason` values using separate schemas for typed
|
|
5395
|
+
* failures and unexpected defects.
|
|
5095
5396
|
*
|
|
5096
5397
|
* @category CauseReason
|
|
5097
5398
|
* @since 4.0.0
|
|
5098
5399
|
*/
|
|
5099
5400
|
export declare function CauseReason<E extends Top, D extends Top>(error: E, defect: D): CauseReason<E, D>;
|
|
5100
5401
|
/**
|
|
5101
|
-
* Schema for `Cause
|
|
5102
|
-
* combining typed errors, defects, and interrupts.
|
|
5402
|
+
* Schema for `Cause` values, represented as an ordered collection of failure
|
|
5403
|
+
* reasons combining typed errors, defects, and interrupts.
|
|
5404
|
+
*
|
|
5405
|
+
* **Details**
|
|
5406
|
+
* The `error` schema validates typed failures and the `defect` schema validates
|
|
5407
|
+
* unexpected defects.
|
|
5103
5408
|
*
|
|
5104
5409
|
* @category Cause
|
|
5105
5410
|
* @since 4.0.0
|
|
@@ -5110,19 +5415,23 @@ export interface Cause<E extends Top, D extends Top> extends declareConstructor<
|
|
|
5110
5415
|
readonly defect: D;
|
|
5111
5416
|
}
|
|
5112
5417
|
/**
|
|
5418
|
+
* Iso representation used for `Cause` schemas: an ordered array of
|
|
5419
|
+
* `CauseReasonIso` values.
|
|
5420
|
+
*
|
|
5113
5421
|
* @category Cause
|
|
5114
5422
|
* @since 4.0.0
|
|
5115
5423
|
*/
|
|
5116
5424
|
export type CauseIso<E extends Top, D extends Top> = ReadonlyArray<CauseReasonIso<E, D>>;
|
|
5117
5425
|
/**
|
|
5118
|
-
* Creates a schema for `Cause
|
|
5426
|
+
* Creates a schema for `Cause` values using separate schemas for typed failures
|
|
5427
|
+
* and unexpected defects.
|
|
5119
5428
|
*
|
|
5120
5429
|
* @category Cause
|
|
5121
5430
|
* @since 4.0.0
|
|
5122
5431
|
*/
|
|
5123
5432
|
export declare function Cause<E extends Top, D extends Top>(error: E, defect: D): Cause<E, D>;
|
|
5124
5433
|
/**
|
|
5125
|
-
*
|
|
5434
|
+
* Type-level representation of the schema for JavaScript `Error` instances.
|
|
5126
5435
|
*
|
|
5127
5436
|
* @category Error
|
|
5128
5437
|
* @since 4.0.0
|
|
@@ -5131,27 +5440,32 @@ export interface Error extends instanceOf<globalThis.Error> {
|
|
|
5131
5440
|
readonly "Rebuild": Error;
|
|
5132
5441
|
}
|
|
5133
5442
|
/**
|
|
5134
|
-
* A schema
|
|
5443
|
+
* A schema for JavaScript `Error` objects.
|
|
5135
5444
|
*
|
|
5136
|
-
*
|
|
5137
|
-
*
|
|
5445
|
+
* **Default JSON serializer**
|
|
5446
|
+
* Encodes an `Error` as an object with `message` and optional `name` properties,
|
|
5447
|
+
* and decodes that object back into an `Error`. The stack trace is omitted from
|
|
5448
|
+
* the encoded form for security.
|
|
5138
5449
|
*
|
|
5139
5450
|
* @category Schemas
|
|
5140
5451
|
* @since 4.0.0
|
|
5141
5452
|
*/
|
|
5142
5453
|
export declare const Error: Error;
|
|
5143
5454
|
/**
|
|
5144
|
-
* A schema
|
|
5455
|
+
* A schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
5456
|
+
* encoded form.
|
|
5145
5457
|
*
|
|
5146
|
-
*
|
|
5147
|
-
* `
|
|
5458
|
+
* **Default JSON serializer**
|
|
5459
|
+
* Encodes an `Error` as an object with `message`, optional `name`, and optional
|
|
5460
|
+
* `stack` properties, and decodes that object back into an `Error`.
|
|
5148
5461
|
*
|
|
5149
5462
|
* @category Schemas
|
|
5150
5463
|
* @since 4.0.0
|
|
5151
5464
|
*/
|
|
5152
5465
|
export declare const ErrorWithStack: Error;
|
|
5153
5466
|
/**
|
|
5154
|
-
*
|
|
5467
|
+
* Type-level representation of the `Defect` schema, which accepts JavaScript
|
|
5468
|
+
* `Error` values and arbitrary unknown defect values.
|
|
5155
5469
|
*
|
|
5156
5470
|
* @category Defect
|
|
5157
5471
|
* @since 4.0.0
|
|
@@ -5167,7 +5481,12 @@ export interface Defect extends Union<readonly [
|
|
|
5167
5481
|
readonly "Rebuild": Defect;
|
|
5168
5482
|
}
|
|
5169
5483
|
/**
|
|
5170
|
-
* A schema
|
|
5484
|
+
* A schema for defect values, accepting either JavaScript `Error` values encoded
|
|
5485
|
+
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
5486
|
+
*
|
|
5487
|
+
* **Default JSON serializer**
|
|
5488
|
+
* Unknown defects are serialized with `JSON.stringify` when possible and fall
|
|
5489
|
+
* back to Effect's formatted representation when JSON serialization fails.
|
|
5171
5490
|
*
|
|
5172
5491
|
* @category Constructors
|
|
5173
5492
|
* @since 4.0.0
|
|
@@ -5182,8 +5501,8 @@ export declare const Defect: Defect;
|
|
|
5182
5501
|
*/
|
|
5183
5502
|
export declare const DefectWithStack: Defect;
|
|
5184
5503
|
/**
|
|
5185
|
-
* Schema for `Exit
|
|
5186
|
-
*
|
|
5504
|
+
* Schema for `Exit` values, representing either a success with value `A` or a
|
|
5505
|
+
* failure with a `Cause` containing typed errors and defects.
|
|
5187
5506
|
*
|
|
5188
5507
|
* @category Exit
|
|
5189
5508
|
* @since 4.0.0
|
|
@@ -5195,6 +5514,12 @@ export interface Exit<A extends Top, E extends Top, D extends Top> extends decla
|
|
|
5195
5514
|
readonly defect: D;
|
|
5196
5515
|
}
|
|
5197
5516
|
/**
|
|
5517
|
+
* Iso representation used for `Exit` schemas.
|
|
5518
|
+
*
|
|
5519
|
+
* **Details**
|
|
5520
|
+
* Successful exits are represented as `{ _tag: "Success", value }`, while failed
|
|
5521
|
+
* exits are represented as `{ _tag: "Failure", cause }`.
|
|
5522
|
+
*
|
|
5198
5523
|
* @category Exit
|
|
5199
5524
|
* @since 4.0.0
|
|
5200
5525
|
*/
|
|
@@ -5206,14 +5531,16 @@ export type ExitIso<A extends Top, E extends Top, D extends Top> = {
|
|
|
5206
5531
|
readonly cause: CauseIso<E, D>;
|
|
5207
5532
|
};
|
|
5208
5533
|
/**
|
|
5209
|
-
* Creates a schema for `Exit
|
|
5534
|
+
* Creates a schema for `Exit` values using schemas for the success value, typed
|
|
5535
|
+
* failure, and unexpected defect channels.
|
|
5210
5536
|
*
|
|
5211
5537
|
* @category Exit
|
|
5212
5538
|
* @since 4.0.0
|
|
5213
5539
|
*/
|
|
5214
5540
|
export declare function Exit<A extends Top, E extends Top, D extends Top>(value: A, error: E, defect: D): Exit<A, E, D>;
|
|
5215
5541
|
/**
|
|
5216
|
-
*
|
|
5542
|
+
* Type-level representation of a `ReadonlyMap` schema whose keys and values are
|
|
5543
|
+
* validated by the provided schemas.
|
|
5217
5544
|
*
|
|
5218
5545
|
* @category ReadonlyMap
|
|
5219
5546
|
* @since 4.0.0
|
|
@@ -5224,6 +5551,9 @@ export interface $ReadonlyMap<Key extends Top, Value extends Top> extends declar
|
|
|
5224
5551
|
readonly value: Value;
|
|
5225
5552
|
}
|
|
5226
5553
|
/**
|
|
5554
|
+
* Iso representation used for `ReadonlyMap` schemas: an array of readonly
|
|
5555
|
+
* `[key, value]` tuples using each entry schema's `Iso` type.
|
|
5556
|
+
*
|
|
5227
5557
|
* @category ReadonlyMap
|
|
5228
5558
|
* @since 4.0.0
|
|
5229
5559
|
*/
|
|
@@ -5249,6 +5579,9 @@ export interface HashMap<Key extends Top, Value extends Top> extends declareCons
|
|
|
5249
5579
|
readonly value: Value;
|
|
5250
5580
|
}
|
|
5251
5581
|
/**
|
|
5582
|
+
* Iso representation used for `HashMap` schemas: an array of readonly
|
|
5583
|
+
* `[key, value]` tuples using each entry schema's `Iso` type.
|
|
5584
|
+
*
|
|
5252
5585
|
* @category HashMap
|
|
5253
5586
|
* @since 4.0.0
|
|
5254
5587
|
*/
|
|
@@ -5262,7 +5595,8 @@ export type HashMapIso<Key extends Top, Value extends Top> = ReadonlyArray<reado
|
|
|
5262
5595
|
*/
|
|
5263
5596
|
export declare function HashMap<Key extends Top, Value extends Top>(key: Key, value: Value): HashMap<Key, Value>;
|
|
5264
5597
|
/**
|
|
5265
|
-
*
|
|
5598
|
+
* Type-level representation of a `ReadonlySet` schema whose values are validated
|
|
5599
|
+
* by the provided element schema.
|
|
5266
5600
|
*
|
|
5267
5601
|
* @category ReadonlySet
|
|
5268
5602
|
* @since 4.0.0
|
|
@@ -5272,11 +5606,17 @@ export interface $ReadonlySet<Value extends Top> extends declareConstructor<glob
|
|
|
5272
5606
|
readonly value: Value;
|
|
5273
5607
|
}
|
|
5274
5608
|
/**
|
|
5609
|
+
* Iso representation used for `ReadonlySet` schemas: an array of element values
|
|
5610
|
+
* using the element schema's `Iso` type.
|
|
5611
|
+
*
|
|
5275
5612
|
* @category ReadonlySet
|
|
5276
5613
|
* @since 4.0.0
|
|
5277
5614
|
*/
|
|
5278
5615
|
export type ReadonlySetIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
5279
5616
|
/**
|
|
5617
|
+
* Creates a schema that validates a `ReadonlySet` whose values conform to the
|
|
5618
|
+
* provided element schema.
|
|
5619
|
+
*
|
|
5280
5620
|
* @category ReadonlySet
|
|
5281
5621
|
* @since 4.0.0
|
|
5282
5622
|
*/
|
|
@@ -5293,6 +5633,9 @@ export interface HashSet<Value extends Top> extends declareConstructor<HashSet_.
|
|
|
5293
5633
|
readonly value: Value;
|
|
5294
5634
|
}
|
|
5295
5635
|
/**
|
|
5636
|
+
* Iso representation used for `HashSet` schemas: an array of element values
|
|
5637
|
+
* using the element schema's `Iso` type.
|
|
5638
|
+
*
|
|
5296
5639
|
* @category HashSet
|
|
5297
5640
|
* @since 4.0.0
|
|
5298
5641
|
*/
|
|
@@ -5317,6 +5660,9 @@ export interface Chunk<Value extends Top> extends declareConstructor<Chunk_.Chun
|
|
|
5317
5660
|
readonly value: Value;
|
|
5318
5661
|
}
|
|
5319
5662
|
/**
|
|
5663
|
+
* Iso representation used for `Chunk` schemas: an array of element values using
|
|
5664
|
+
* the element schema's `Iso` type.
|
|
5665
|
+
*
|
|
5320
5666
|
* @category Chunk
|
|
5321
5667
|
* @since 4.0.0
|
|
5322
5668
|
*/
|
|
@@ -5330,7 +5676,7 @@ export type ChunkIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
|
5330
5676
|
*/
|
|
5331
5677
|
export declare function Chunk<Value extends Top>(value: Value): Chunk<Value>;
|
|
5332
5678
|
/**
|
|
5333
|
-
*
|
|
5679
|
+
* Type-level representation of the schema for JavaScript `RegExp` instances.
|
|
5334
5680
|
*
|
|
5335
5681
|
* @category RegExp
|
|
5336
5682
|
* @since 4.0.0
|
|
@@ -5348,7 +5694,7 @@ export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
|
5348
5694
|
*/
|
|
5349
5695
|
export declare const RegExp: RegExp;
|
|
5350
5696
|
/**
|
|
5351
|
-
*
|
|
5697
|
+
* Type-level representation of the schema for JavaScript `URL` instances.
|
|
5352
5698
|
*
|
|
5353
5699
|
* @category URL
|
|
5354
5700
|
* @since 4.0.0
|
|
@@ -5363,12 +5709,13 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
5363
5709
|
*
|
|
5364
5710
|
* - encodes `URL` as a `string`
|
|
5365
5711
|
*
|
|
5366
|
-
* @since 4.0.0
|
|
5367
5712
|
* @category URL
|
|
5713
|
+
* @since 4.0.0
|
|
5368
5714
|
*/
|
|
5369
5715
|
export declare const URL: URL;
|
|
5370
5716
|
/**
|
|
5371
|
-
*
|
|
5717
|
+
* Type-level representation of a transformation schema that decodes valid URL
|
|
5718
|
+
* strings into JavaScript `URL` instances.
|
|
5372
5719
|
*
|
|
5373
5720
|
* @category URL
|
|
5374
5721
|
* @since 4.0.0
|
|
@@ -5390,7 +5737,8 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
5390
5737
|
*/
|
|
5391
5738
|
export declare const URLFromString: URLFromString;
|
|
5392
5739
|
/**
|
|
5393
|
-
*
|
|
5740
|
+
* Type-level representation of the schema for JavaScript `Date` instances,
|
|
5741
|
+
* including invalid dates.
|
|
5394
5742
|
*
|
|
5395
5743
|
* @category Date
|
|
5396
5744
|
* @since 4.0.0
|
|
@@ -5401,9 +5749,10 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
5401
5749
|
/**
|
|
5402
5750
|
* A schema for JavaScript `Date` objects.
|
|
5403
5751
|
*
|
|
5404
|
-
* This schema accepts any `Date` instance, including invalid dates
|
|
5405
|
-
*
|
|
5406
|
-
*
|
|
5752
|
+
* This schema accepts any `Date` instance, including invalid dates. For
|
|
5753
|
+
* validating only valid dates, use `DateValid` instead. The default JSON
|
|
5754
|
+
* serializer encodes valid dates as ISO 8601 strings; invalid dates encode as
|
|
5755
|
+
* `"Invalid Date"`.
|
|
5407
5756
|
*
|
|
5408
5757
|
* **Example** (Date schema)
|
|
5409
5758
|
*
|
|
@@ -5419,7 +5768,8 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
5419
5768
|
*/
|
|
5420
5769
|
export declare const Date: Date;
|
|
5421
5770
|
/**
|
|
5422
|
-
*
|
|
5771
|
+
* Type-level representation of a transformation schema that decodes strings into
|
|
5772
|
+
* JavaScript `Date` instances.
|
|
5423
5773
|
*
|
|
5424
5774
|
* @category Date
|
|
5425
5775
|
* @since 4.0.0
|
|
@@ -5428,20 +5778,23 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
5428
5778
|
readonly "Rebuild": DateFromString;
|
|
5429
5779
|
}
|
|
5430
5780
|
/**
|
|
5431
|
-
* A transformation schema that
|
|
5781
|
+
* A transformation schema that decodes a string into a JavaScript `Date`.
|
|
5432
5782
|
*
|
|
5433
|
-
* Decoding
|
|
5434
|
-
*
|
|
5783
|
+
* **Decoding**
|
|
5784
|
+
* The string is passed to JavaScript `Date` construction and may decode to an
|
|
5785
|
+
* invalid `Date`. Compose with `DateValid` when invalid dates should be rejected.
|
|
5435
5786
|
*
|
|
5436
|
-
* Encoding
|
|
5437
|
-
*
|
|
5787
|
+
* **Encoding**
|
|
5788
|
+
* A valid `Date` is encoded as an ISO string; an invalid `Date` is encoded as
|
|
5789
|
+
* `"Invalid Date"`.
|
|
5438
5790
|
*
|
|
5439
5791
|
* @category Date
|
|
5440
5792
|
* @since 4.0.0
|
|
5441
5793
|
*/
|
|
5442
5794
|
export declare const DateFromString: DateFromString;
|
|
5443
5795
|
/**
|
|
5444
|
-
*
|
|
5796
|
+
* Type-level representation of the `DateValid` schema, which accepts only valid
|
|
5797
|
+
* JavaScript `Date` instances.
|
|
5445
5798
|
*
|
|
5446
5799
|
* @category Date
|
|
5447
5800
|
* @since 4.0.0
|
|
@@ -5460,7 +5813,7 @@ export interface DateValid extends Date {
|
|
|
5460
5813
|
*/
|
|
5461
5814
|
export declare const DateValid: DateValid;
|
|
5462
5815
|
/**
|
|
5463
|
-
*
|
|
5816
|
+
* Type-level representation of the schema for Effect `Duration` values.
|
|
5464
5817
|
*
|
|
5465
5818
|
* @category Duration
|
|
5466
5819
|
* @since 4.0.0
|
|
@@ -5490,7 +5843,8 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
5490
5843
|
*/
|
|
5491
5844
|
export declare const Duration: Duration;
|
|
5492
5845
|
/**
|
|
5493
|
-
*
|
|
5846
|
+
* Type-level representation of a transformation schema that decodes strings
|
|
5847
|
+
* accepted by `Duration.fromInput` into `Duration` values.
|
|
5494
5848
|
*
|
|
5495
5849
|
* @category Duration
|
|
5496
5850
|
* @since 4.0.0
|
|
@@ -5513,7 +5867,8 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
5513
5867
|
*/
|
|
5514
5868
|
export declare const DurationFromString: DurationFromString;
|
|
5515
5869
|
/**
|
|
5516
|
-
*
|
|
5870
|
+
* Type-level representation of a transformation schema that decodes non-negative
|
|
5871
|
+
* nanosecond `bigint` values into `Duration` values.
|
|
5517
5872
|
*
|
|
5518
5873
|
* @category Duration
|
|
5519
5874
|
* @since 4.0.0
|
|
@@ -5523,20 +5878,23 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
5523
5878
|
}
|
|
5524
5879
|
/**
|
|
5525
5880
|
* A transformation schema that decodes a non-negative `bigint` into a
|
|
5526
|
-
* `Duration`, treating the
|
|
5881
|
+
* `Duration`, treating the bigint as nanoseconds.
|
|
5527
5882
|
*
|
|
5528
|
-
* Decoding
|
|
5529
|
-
*
|
|
5883
|
+
* **Decoding**
|
|
5884
|
+
* A non-negative `bigint` representing nanoseconds is decoded as a `Duration`.
|
|
5530
5885
|
*
|
|
5531
|
-
* Encoding
|
|
5532
|
-
*
|
|
5886
|
+
* **Encoding**
|
|
5887
|
+
* Finite durations are encoded as a non-negative `bigint` number of nanoseconds.
|
|
5888
|
+
* Encoding fails when the duration cannot be represented as nanoseconds, such as
|
|
5889
|
+
* `Duration.infinity`.
|
|
5533
5890
|
*
|
|
5534
5891
|
* @category Duration
|
|
5535
5892
|
* @since 4.0.0
|
|
5536
5893
|
*/
|
|
5537
5894
|
export declare const DurationFromNanos: DurationFromNanos;
|
|
5538
5895
|
/**
|
|
5539
|
-
*
|
|
5896
|
+
* Type-level representation of a transformation schema that decodes
|
|
5897
|
+
* non-negative millisecond numbers into `Duration` values.
|
|
5540
5898
|
*
|
|
5541
5899
|
* @category Duration
|
|
5542
5900
|
* @since 4.0.0
|
|
@@ -5562,7 +5920,7 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
5562
5920
|
*/
|
|
5563
5921
|
export declare const DurationFromMillis: DurationFromMillis;
|
|
5564
5922
|
/**
|
|
5565
|
-
*
|
|
5923
|
+
* Type-level representation of the schema for Effect `BigDecimal` values.
|
|
5566
5924
|
*
|
|
5567
5925
|
* @category BigDecimal
|
|
5568
5926
|
* @since 4.0.0
|
|
@@ -5582,7 +5940,8 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
5582
5940
|
*/
|
|
5583
5941
|
export declare const BigDecimal: BigDecimal;
|
|
5584
5942
|
/**
|
|
5585
|
-
*
|
|
5943
|
+
* Type-level representation of a transformation schema that decodes strings into
|
|
5944
|
+
* `BigDecimal` values.
|
|
5586
5945
|
*
|
|
5587
5946
|
* @category BigDecimal
|
|
5588
5947
|
* @since 4.0.0
|
|
@@ -5604,7 +5963,8 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
5604
5963
|
*/
|
|
5605
5964
|
export declare const BigDecimalFromString: BigDecimalFromString;
|
|
5606
5965
|
/**
|
|
5607
|
-
*
|
|
5966
|
+
* Type-level representation of a transformation schema that decodes
|
|
5967
|
+
* JSON-encoded strings into `unknown` values.
|
|
5608
5968
|
*
|
|
5609
5969
|
* @category JSON
|
|
5610
5970
|
* @since 4.0.0
|
|
@@ -5637,7 +5997,8 @@ export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
|
5637
5997
|
*/
|
|
5638
5998
|
export declare const UnknownFromJsonString: UnknownFromJsonString;
|
|
5639
5999
|
/**
|
|
5640
|
-
*
|
|
6000
|
+
* Type-level representation of a schema that parses a JSON string and then
|
|
6001
|
+
* decodes the parsed value with the provided schema.
|
|
5641
6002
|
*
|
|
5642
6003
|
* @category JSON
|
|
5643
6004
|
* @since 4.0.0
|
|
@@ -5711,7 +6072,7 @@ export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
|
5711
6072
|
*/
|
|
5712
6073
|
export declare function fromJsonString<S extends Top>(schema: S): fromJsonString<S>;
|
|
5713
6074
|
/**
|
|
5714
|
-
*
|
|
6075
|
+
* Type-level representation of the schema for JavaScript `File` instances.
|
|
5715
6076
|
*
|
|
5716
6077
|
* @category File
|
|
5717
6078
|
* @since 4.0.0
|
|
@@ -5730,7 +6091,7 @@ export interface File extends instanceOf<globalThis.File> {
|
|
|
5730
6091
|
*/
|
|
5731
6092
|
export declare const File: File;
|
|
5732
6093
|
/**
|
|
5733
|
-
*
|
|
6094
|
+
* Type-level representation of the schema for JavaScript `FormData` instances.
|
|
5734
6095
|
*
|
|
5735
6096
|
* @category FormData
|
|
5736
6097
|
* @since 4.0.0
|
|
@@ -5749,7 +6110,8 @@ export interface FormData extends instanceOf<globalThis.FormData> {
|
|
|
5749
6110
|
*/
|
|
5750
6111
|
export declare const FormData: FormData;
|
|
5751
6112
|
/**
|
|
5752
|
-
*
|
|
6113
|
+
* Type-level representation of a schema that parses `FormData` into a tree
|
|
6114
|
+
* record and then decodes it with the provided schema.
|
|
5753
6115
|
*
|
|
5754
6116
|
* @category FormData
|
|
5755
6117
|
* @since 4.0.0
|
|
@@ -5842,7 +6204,8 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
5842
6204
|
*/
|
|
5843
6205
|
export declare function fromFormData<S extends Top>(schema: S): fromFormData<S>;
|
|
5844
6206
|
/**
|
|
5845
|
-
*
|
|
6207
|
+
* Type-level representation of the schema for JavaScript `URLSearchParams`
|
|
6208
|
+
* instances.
|
|
5846
6209
|
*
|
|
5847
6210
|
* @category URLSearchParams
|
|
5848
6211
|
* @since 4.0.0
|
|
@@ -5860,7 +6223,8 @@ export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams>
|
|
|
5860
6223
|
*/
|
|
5861
6224
|
export declare const URLSearchParams: URLSearchParams;
|
|
5862
6225
|
/**
|
|
5863
|
-
*
|
|
6226
|
+
* Type-level representation of a schema that parses `URLSearchParams` into a
|
|
6227
|
+
* tree record and then decodes it with the provided schema.
|
|
5864
6228
|
*
|
|
5865
6229
|
* @category URLSearchParams
|
|
5866
6230
|
* @since 4.0.0
|
|
@@ -5944,7 +6308,8 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
5944
6308
|
*/
|
|
5945
6309
|
export declare function fromURLSearchParams<S extends Top>(schema: S): fromURLSearchParams<S>;
|
|
5946
6310
|
/**
|
|
5947
|
-
*
|
|
6311
|
+
* Type-level representation of the `Finite` number schema, which rejects `NaN`,
|
|
6312
|
+
* `Infinity`, and `-Infinity`.
|
|
5948
6313
|
*
|
|
5949
6314
|
* @category Number
|
|
5950
6315
|
* @since 4.0.0
|
|
@@ -5960,7 +6325,8 @@ export interface Finite extends Number {
|
|
|
5960
6325
|
*/
|
|
5961
6326
|
export declare const Finite: Finite;
|
|
5962
6327
|
/**
|
|
5963
|
-
*
|
|
6328
|
+
* Type-level representation of the `Int` schema, which accepts only finite
|
|
6329
|
+
* integer numbers.
|
|
5964
6330
|
*
|
|
5965
6331
|
* @category Number
|
|
5966
6332
|
* @since 4.0.0
|
|
@@ -5976,7 +6342,8 @@ export interface Int extends Number {
|
|
|
5976
6342
|
*/
|
|
5977
6343
|
export declare const Int: Int;
|
|
5978
6344
|
/**
|
|
5979
|
-
*
|
|
6345
|
+
* Type-level representation of a transformation schema that decodes strings into
|
|
6346
|
+
* numbers using JavaScript number coercion.
|
|
5980
6347
|
*
|
|
5981
6348
|
* @category Number
|
|
5982
6349
|
* @since 4.0.0
|
|
@@ -5985,20 +6352,24 @@ export interface NumberFromString extends decodeTo<Finite, String> {
|
|
|
5985
6352
|
readonly "Rebuild": NumberFromString;
|
|
5986
6353
|
}
|
|
5987
6354
|
/**
|
|
5988
|
-
* A transformation schema that parses a string into a number
|
|
6355
|
+
* A transformation schema that parses a string into a `number` using JavaScript
|
|
6356
|
+
* number coercion.
|
|
5989
6357
|
*
|
|
5990
|
-
* Decoding
|
|
5991
|
-
*
|
|
6358
|
+
* **Decoding**
|
|
6359
|
+
* A `string` is decoded as a number, including possible non-finite values such as
|
|
6360
|
+
* `NaN`, `Infinity`, and `-Infinity`. Use `FiniteFromString` to reject non-finite
|
|
6361
|
+
* numbers.
|
|
5992
6362
|
*
|
|
5993
|
-
* Encoding
|
|
5994
|
-
*
|
|
6363
|
+
* **Encoding**
|
|
6364
|
+
* A number is encoded as a `string`.
|
|
5995
6365
|
*
|
|
5996
6366
|
* @category Number
|
|
5997
6367
|
* @since 4.0.0
|
|
5998
6368
|
*/
|
|
5999
6369
|
export declare const NumberFromString: NumberFromString;
|
|
6000
6370
|
/**
|
|
6001
|
-
*
|
|
6371
|
+
* Type-level representation of a transformation schema that decodes strings into
|
|
6372
|
+
* finite numbers.
|
|
6002
6373
|
*
|
|
6003
6374
|
* @category Number
|
|
6004
6375
|
* @since 4.0.0
|
|
@@ -6021,7 +6392,8 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
6021
6392
|
*/
|
|
6022
6393
|
export declare const FiniteFromString: FiniteFromString;
|
|
6023
6394
|
/**
|
|
6024
|
-
*
|
|
6395
|
+
* Type-level representation of a transformation schema that decodes strings into
|
|
6396
|
+
* `bigint` values.
|
|
6025
6397
|
*
|
|
6026
6398
|
* @category BigInt
|
|
6027
6399
|
* @since 4.0.0
|
|
@@ -6043,7 +6415,8 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
6043
6415
|
*/
|
|
6044
6416
|
export declare const BigIntFromString: BigIntFromString;
|
|
6045
6417
|
/**
|
|
6046
|
-
*
|
|
6418
|
+
* Schema interface for `Trimmed`, representing strings with no leading or
|
|
6419
|
+
* trailing whitespace.
|
|
6047
6420
|
*
|
|
6048
6421
|
* @category String
|
|
6049
6422
|
* @since 4.0.0
|
|
@@ -6059,7 +6432,8 @@ export interface Trimmed extends String {
|
|
|
6059
6432
|
*/
|
|
6060
6433
|
export declare const Trimmed: Trimmed;
|
|
6061
6434
|
/**
|
|
6062
|
-
*
|
|
6435
|
+
* Schema interface for `Trim`, a transformation that trims leading and trailing
|
|
6436
|
+
* whitespace while decoding and encodes the trimmed string unchanged.
|
|
6063
6437
|
*
|
|
6064
6438
|
* @category String
|
|
6065
6439
|
* @since 4.0.0
|
|
@@ -6081,7 +6455,8 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
6081
6455
|
*/
|
|
6082
6456
|
export declare const Trim: Trim;
|
|
6083
6457
|
/**
|
|
6084
|
-
*
|
|
6458
|
+
* Schema interface for `StringFromBase64`, a transformation between RFC4648
|
|
6459
|
+
* base64-encoded strings and UTF-8 strings.
|
|
6085
6460
|
*
|
|
6086
6461
|
* @category String
|
|
6087
6462
|
* @since 4.0.0
|
|
@@ -6103,7 +6478,8 @@ export interface StringFromBase64 extends decodeTo<String, String> {
|
|
|
6103
6478
|
*/
|
|
6104
6479
|
export declare const StringFromBase64: StringFromBase64;
|
|
6105
6480
|
/**
|
|
6106
|
-
*
|
|
6481
|
+
* Schema interface for `StringFromBase64Url`, a transformation between URL-safe
|
|
6482
|
+
* base64-encoded strings and UTF-8 strings.
|
|
6107
6483
|
*
|
|
6108
6484
|
* @category String
|
|
6109
6485
|
* @since 4.0.0
|
|
@@ -6125,7 +6501,8 @@ export interface StringFromBase64Url extends decodeTo<String, String> {
|
|
|
6125
6501
|
*/
|
|
6126
6502
|
export declare const StringFromBase64Url: StringFromBase64Url;
|
|
6127
6503
|
/**
|
|
6128
|
-
*
|
|
6504
|
+
* Schema interface for `StringFromHex`, a transformation between hex-encoded
|
|
6505
|
+
* strings and UTF-8 strings.
|
|
6129
6506
|
*
|
|
6130
6507
|
* @category String
|
|
6131
6508
|
* @since 4.0.0
|
|
@@ -6147,7 +6524,8 @@ export interface StringFromHex extends decodeTo<String, String> {
|
|
|
6147
6524
|
*/
|
|
6148
6525
|
export declare const StringFromHex: StringFromHex;
|
|
6149
6526
|
/**
|
|
6150
|
-
*
|
|
6527
|
+
* Schema interface for `StringFromUriComponent`, a transformation between
|
|
6528
|
+
* URI-component encoded strings and UTF-8 strings.
|
|
6151
6529
|
*
|
|
6152
6530
|
* @category String
|
|
6153
6531
|
* @since 4.0.0
|
|
@@ -6188,13 +6566,19 @@ export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
|
6188
6566
|
*/
|
|
6189
6567
|
export declare const StringFromUriComponent: StringFromUriComponent;
|
|
6190
6568
|
/**
|
|
6191
|
-
* A union schema for
|
|
6569
|
+
* A union schema for property keys accepted by Effect schemas: finite `number`,
|
|
6570
|
+
* `symbol`, or `string`.
|
|
6192
6571
|
*
|
|
6193
6572
|
* @category PropertyKey
|
|
6194
6573
|
* @since 4.0.0
|
|
6195
6574
|
*/
|
|
6196
6575
|
export declare const PropertyKey: Union<readonly [Finite, Symbol, String]>;
|
|
6197
6576
|
/**
|
|
6577
|
+
* Schema for a Standard Schema v1 failure result.
|
|
6578
|
+
*
|
|
6579
|
+
* The result contains an `issues` array where each issue has a message and an
|
|
6580
|
+
* optional path made of property keys or keyed path segments.
|
|
6581
|
+
*
|
|
6198
6582
|
* @category StandardSchema
|
|
6199
6583
|
* @since 4.0.0
|
|
6200
6584
|
*/
|
|
@@ -6207,7 +6591,8 @@ export declare const StandardSchemaV1FailureResult: Struct<{
|
|
|
6207
6591
|
}>>;
|
|
6208
6592
|
}>;
|
|
6209
6593
|
/**
|
|
6210
|
-
*
|
|
6594
|
+
* Schema interface for `BooleanFromBit`, a transformation between bit literals
|
|
6595
|
+
* `0 | 1` and boolean values.
|
|
6211
6596
|
*
|
|
6212
6597
|
* @category Boolean
|
|
6213
6598
|
* @since 4.0.0
|
|
@@ -6223,7 +6608,8 @@ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0,
|
|
|
6223
6608
|
*/
|
|
6224
6609
|
export declare const BooleanFromBit: BooleanFromBit;
|
|
6225
6610
|
/**
|
|
6226
|
-
*
|
|
6611
|
+
* Schema interface for `Uint8Array`, representing JavaScript `Uint8Array`
|
|
6612
|
+
* instances with base64 JSON encoding.
|
|
6227
6613
|
*
|
|
6228
6614
|
* @category Uint8Array
|
|
6229
6615
|
* @since 4.0.0
|
|
@@ -6243,7 +6629,8 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
6243
6629
|
*/
|
|
6244
6630
|
export declare const Uint8Array: Uint8Array;
|
|
6245
6631
|
/**
|
|
6246
|
-
*
|
|
6632
|
+
* Schema interface for `Uint8ArrayFromBase64`, a transformation between
|
|
6633
|
+
* base64-encoded strings and `Uint8Array` values.
|
|
6247
6634
|
*
|
|
6248
6635
|
* @category Uint8Array
|
|
6249
6636
|
* @since 4.0.0
|
|
@@ -6266,7 +6653,8 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
6266
6653
|
*/
|
|
6267
6654
|
export declare const Uint8ArrayFromBase64: Uint8ArrayFromBase64;
|
|
6268
6655
|
/**
|
|
6269
|
-
*
|
|
6656
|
+
* Schema interface for `Uint8ArrayFromBase64Url`, a transformation between
|
|
6657
|
+
* URL-safe base64-encoded strings and `Uint8Array` values.
|
|
6270
6658
|
*
|
|
6271
6659
|
* @category Uint8Array
|
|
6272
6660
|
* @since 4.0.0
|
|
@@ -6289,7 +6677,8 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
6289
6677
|
*/
|
|
6290
6678
|
export declare const Uint8ArrayFromBase64Url: Uint8ArrayFromBase64Url;
|
|
6291
6679
|
/**
|
|
6292
|
-
*
|
|
6680
|
+
* Schema interface for `Uint8ArrayFromHex`, a transformation between
|
|
6681
|
+
* hex-encoded strings and `Uint8Array` values.
|
|
6293
6682
|
*
|
|
6294
6683
|
* @category Uint8Array
|
|
6295
6684
|
* @since 4.0.0
|
|
@@ -6312,7 +6701,8 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
6312
6701
|
*/
|
|
6313
6702
|
export declare const Uint8ArrayFromHex: Uint8ArrayFromHex;
|
|
6314
6703
|
/**
|
|
6315
|
-
*
|
|
6704
|
+
* Schema interface for `DateTimeUtc`, representing `DateTime.Utc` values with
|
|
6705
|
+
* UTC ISO string JSON encoding.
|
|
6316
6706
|
*
|
|
6317
6707
|
* @category DateTime
|
|
6318
6708
|
* @since 4.0.0
|
|
@@ -6332,7 +6722,8 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
6332
6722
|
*/
|
|
6333
6723
|
export declare const DateTimeUtc: DateTimeUtc;
|
|
6334
6724
|
/**
|
|
6335
|
-
*
|
|
6725
|
+
* Schema interface for `DateTimeUtcFromDate`, a transformation from valid
|
|
6726
|
+
* JavaScript `Date` values to `DateTime.Utc`.
|
|
6336
6727
|
*
|
|
6337
6728
|
* @category DateTime
|
|
6338
6729
|
* @since 4.0.0
|
|
@@ -6354,7 +6745,8 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
6354
6745
|
*/
|
|
6355
6746
|
export declare const DateTimeUtcFromDate: DateTimeUtcFromDate;
|
|
6356
6747
|
/**
|
|
6357
|
-
*
|
|
6748
|
+
* Schema interface for `DateTimeUtcFromString`, a transformation from date-time
|
|
6749
|
+
* strings to `DateTime.Utc`.
|
|
6358
6750
|
*
|
|
6359
6751
|
* @category DateTime
|
|
6360
6752
|
* @since 4.0.0
|
|
@@ -6363,22 +6755,24 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
6363
6755
|
readonly "Rebuild": DateTimeUtcFromString;
|
|
6364
6756
|
}
|
|
6365
6757
|
/**
|
|
6366
|
-
* A transformation schema that decodes a string into a `DateTime.Utc`.
|
|
6758
|
+
* A transformation schema that decodes a date-time string into a `DateTime.Utc`.
|
|
6367
6759
|
*
|
|
6368
6760
|
* Decoding:
|
|
6369
|
-
*
|
|
6370
|
-
*
|
|
6761
|
+
*
|
|
6762
|
+
* - A string accepted by `DateTime.make` is parsed and normalized to UTC. Strings
|
|
6763
|
+
* without an explicit zone are interpreted as UTC.
|
|
6371
6764
|
*
|
|
6372
6765
|
* Encoding:
|
|
6373
|
-
*
|
|
6374
|
-
*
|
|
6766
|
+
*
|
|
6767
|
+
* - A `DateTime.Utc` is encoded as a UTC ISO 8601 string.
|
|
6375
6768
|
*
|
|
6376
6769
|
* @category DateTime
|
|
6377
6770
|
* @since 4.0.0
|
|
6378
6771
|
*/
|
|
6379
6772
|
export declare const DateTimeUtcFromString: DateTimeUtcFromString;
|
|
6380
6773
|
/**
|
|
6381
|
-
*
|
|
6774
|
+
* Schema interface for `DateTimeUtcFromMillis`, a transformation between epoch
|
|
6775
|
+
* milliseconds and `DateTime.Utc` values.
|
|
6382
6776
|
*
|
|
6383
6777
|
* @category DateTime
|
|
6384
6778
|
* @since 4.0.0
|
|
@@ -6400,7 +6794,8 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
6400
6794
|
*/
|
|
6401
6795
|
export declare const DateTimeUtcFromMillis: DateTimeUtcFromMillis;
|
|
6402
6796
|
/**
|
|
6403
|
-
*
|
|
6797
|
+
* Schema interface for `TimeZoneOffset`, representing
|
|
6798
|
+
* `DateTime.TimeZone.Offset` values encoded as offset milliseconds.
|
|
6404
6799
|
*
|
|
6405
6800
|
* @category DateTime
|
|
6406
6801
|
* @since 4.0.0
|
|
@@ -6420,7 +6815,8 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
6420
6815
|
*/
|
|
6421
6816
|
export declare const TimeZoneOffset: TimeZoneOffset;
|
|
6422
6817
|
/**
|
|
6423
|
-
*
|
|
6818
|
+
* Schema interface for `TimeZoneNamed`, representing
|
|
6819
|
+
* `DateTime.TimeZone.Named` values encoded as IANA time zone identifiers.
|
|
6424
6820
|
*
|
|
6425
6821
|
* @category DateTime
|
|
6426
6822
|
* @since 4.0.0
|
|
@@ -6440,7 +6836,8 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
6440
6836
|
*/
|
|
6441
6837
|
export declare const TimeZoneNamed: TimeZoneNamed;
|
|
6442
6838
|
/**
|
|
6443
|
-
*
|
|
6839
|
+
* Schema interface for `TimeZoneNamedFromString`, a transformation between IANA
|
|
6840
|
+
* time zone identifier strings and `DateTime.TimeZone.Named` values.
|
|
6444
6841
|
*
|
|
6445
6842
|
* @category DateTime
|
|
6446
6843
|
* @since 4.0.0
|
|
@@ -6462,7 +6859,8 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
6462
6859
|
*/
|
|
6463
6860
|
export declare const TimeZoneNamedFromString: TimeZoneNamedFromString;
|
|
6464
6861
|
/**
|
|
6465
|
-
*
|
|
6862
|
+
* Schema interface for `TimeZone`, representing `DateTime.TimeZone` values
|
|
6863
|
+
* encoded as either IANA identifiers or numeric offset strings.
|
|
6466
6864
|
*
|
|
6467
6865
|
* @category DateTime
|
|
6468
6866
|
* @since 4.0.0
|
|
@@ -6483,7 +6881,8 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
6483
6881
|
*/
|
|
6484
6882
|
export declare const TimeZone: TimeZone;
|
|
6485
6883
|
/**
|
|
6486
|
-
*
|
|
6884
|
+
* Schema interface for `TimeZoneFromString`, a transformation from IANA
|
|
6885
|
+
* identifier or offset strings to `DateTime.TimeZone` values.
|
|
6487
6886
|
*
|
|
6488
6887
|
* @category DateTime
|
|
6489
6888
|
* @since 4.0.0
|
|
@@ -6505,7 +6904,8 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
6505
6904
|
*/
|
|
6506
6905
|
export declare const TimeZoneFromString: TimeZoneFromString;
|
|
6507
6906
|
/**
|
|
6508
|
-
*
|
|
6907
|
+
* Schema interface for `DateTimeZoned`, representing `DateTime.Zoned` values
|
|
6908
|
+
* with ISO offset or named-zone string JSON encoding.
|
|
6509
6909
|
*
|
|
6510
6910
|
* @category DateTime
|
|
6511
6911
|
* @since 4.0.0
|
|
@@ -6518,7 +6918,9 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
6518
6918
|
*
|
|
6519
6919
|
* **Default JSON serializer**
|
|
6520
6920
|
*
|
|
6521
|
-
* - encodes
|
|
6921
|
+
* - encodes offset zones as an ISO date-time with a numeric offset, such as
|
|
6922
|
+
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM`
|
|
6923
|
+
* - encodes named zones by appending the IANA identifier in brackets, such as
|
|
6522
6924
|
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`
|
|
6523
6925
|
*
|
|
6524
6926
|
* @category DateTime
|
|
@@ -6526,7 +6928,8 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
6526
6928
|
*/
|
|
6527
6929
|
export declare const DateTimeZoned: DateTimeZoned;
|
|
6528
6930
|
/**
|
|
6529
|
-
*
|
|
6931
|
+
* Schema interface for `DateTimeZonedFromString`, a transformation between
|
|
6932
|
+
* zoned date-time strings and `DateTime.Zoned` values.
|
|
6530
6933
|
*
|
|
6531
6934
|
* @category DateTime
|
|
6532
6935
|
* @since 4.0.0
|
|
@@ -7116,10 +7519,11 @@ export declare function toArbitraryLazy<S extends Top>(schema: S): LazyArbitrary
|
|
|
7116
7519
|
*/
|
|
7117
7520
|
export declare function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitrary<S["Type"]>;
|
|
7118
7521
|
/**
|
|
7119
|
-
*
|
|
7522
|
+
* Annotates a schema with a custom formatter used by `toFormatter`.
|
|
7120
7523
|
*
|
|
7121
|
-
*
|
|
7122
|
-
*
|
|
7524
|
+
* Use this when the formatter derived from the schema structure is not suitable.
|
|
7525
|
+
* The annotation is applied through this helper because adding it directly to
|
|
7526
|
+
* `Annotations.Bottom` would make schemas invariant.
|
|
7123
7527
|
*
|
|
7124
7528
|
* @category Formatter
|
|
7125
7529
|
* @since 4.0.0
|
|
@@ -7200,17 +7604,19 @@ export interface ToJsonSchemaOptions {
|
|
|
7200
7604
|
readonly generateDescriptions?: boolean | undefined;
|
|
7201
7605
|
}
|
|
7202
7606
|
/**
|
|
7203
|
-
* Returns a JSON Schema
|
|
7607
|
+
* Returns a JSON Schema document using draft 2020-12.
|
|
7204
7608
|
*
|
|
7205
|
-
*
|
|
7609
|
+
* The `options` parameter controls generation details such as additional
|
|
7610
|
+
* properties and synthesized check descriptions; it does not change the draft
|
|
7611
|
+
* target.
|
|
7206
7612
|
*
|
|
7207
7613
|
* @category JsonSchema
|
|
7208
7614
|
* @since 4.0.0
|
|
7209
7615
|
*/
|
|
7210
7616
|
export declare function toJsonSchemaDocument(schema: Top, options?: ToJsonSchemaOptions): JsonSchema.Document<"draft-2020-12">;
|
|
7211
7617
|
/**
|
|
7212
|
-
* Derives a canonical JSON codec from a schema. The encoded form is `
|
|
7213
|
-
*
|
|
7618
|
+
* Derives a canonical JSON codec from a schema. The encoded form is `Json`, and
|
|
7619
|
+
* decoding produces the schema's `Type`.
|
|
7214
7620
|
*
|
|
7215
7621
|
* @category Canonical Codecs
|
|
7216
7622
|
* @since 4.0.0
|
|
@@ -7267,9 +7673,11 @@ type XmlEncoderOptions = {
|
|
|
7267
7673
|
readonly sortKeys?: boolean | undefined;
|
|
7268
7674
|
};
|
|
7269
7675
|
/**
|
|
7270
|
-
* Derives an XML encoder from a codec.
|
|
7271
|
-
*
|
|
7272
|
-
*
|
|
7676
|
+
* Derives an XML encoder from a codec.
|
|
7677
|
+
*
|
|
7678
|
+
* The returned function encodes a value through `toCodecStringTree` and returns
|
|
7679
|
+
* an `Effect` that succeeds with the XML string or fails with `SchemaError` if
|
|
7680
|
+
* codec encoding fails.
|
|
7273
7681
|
*
|
|
7274
7682
|
* @category Canonical Codecs
|
|
7275
7683
|
* @since 4.0.0
|
|
@@ -7331,6 +7739,9 @@ export declare function overrideToCodecIso<S extends Top, Iso>(to: Codec<Iso>, t
|
|
|
7331
7739
|
*/
|
|
7332
7740
|
export declare function toDifferJsonPatch<T, E>(schema: Codec<T, E>): Differ<T, JsonPatch.JsonPatch>;
|
|
7333
7741
|
/**
|
|
7742
|
+
* Recursive tree type whose leaves are `Node` values and whose branches are
|
|
7743
|
+
* readonly arrays or string-keyed records of child trees.
|
|
7744
|
+
*
|
|
7334
7745
|
* @category Tree
|
|
7335
7746
|
* @since 4.0.0
|
|
7336
7747
|
*/
|
|
@@ -7398,6 +7809,9 @@ export interface JsonObject {
|
|
|
7398
7809
|
*/
|
|
7399
7810
|
export declare const Json: Codec<Json>;
|
|
7400
7811
|
/**
|
|
7812
|
+
* Recursive TypeScript type for mutable JSON values: `null`, `number`,
|
|
7813
|
+
* `boolean`, `string`, mutable arrays, or mutable string-keyed records.
|
|
7814
|
+
*
|
|
7401
7815
|
* @category JSON
|
|
7402
7816
|
* @since 4.0.0
|
|
7403
7817
|
*/
|
|
@@ -7508,6 +7922,15 @@ export declare namespace Annotations {
|
|
|
7508
7922
|
* @since 4.0.0
|
|
7509
7923
|
*/
|
|
7510
7924
|
interface Augment extends Annotations {
|
|
7925
|
+
/**
|
|
7926
|
+
* Human-readable description of what a value is expected to satisfy.
|
|
7927
|
+
*
|
|
7928
|
+
* For filter and refinement failures, the default formatter uses
|
|
7929
|
+
* `message` first, then `expected`, and finally falls back to `<filter>`.
|
|
7930
|
+
*
|
|
7931
|
+
* Use this to name a failed filter in the default message:
|
|
7932
|
+
* `Expected <expected>, got <actual>`.
|
|
7933
|
+
*/
|
|
7511
7934
|
readonly expected?: string | undefined;
|
|
7512
7935
|
readonly title?: string | undefined;
|
|
7513
7936
|
readonly description?: string | undefined;
|
|
@@ -7552,13 +7975,31 @@ export declare namespace Annotations {
|
|
|
7552
7975
|
*/
|
|
7553
7976
|
interface Bottom<T, TypeParameters extends ReadonlyArray<Top>> extends Documentation<T> {
|
|
7554
7977
|
/**
|
|
7555
|
-
*
|
|
7978
|
+
* Complete message to use when this schema node reports an issue.
|
|
7979
|
+
*
|
|
7980
|
+
* This replaces the default message for matching issue types instead of
|
|
7981
|
+
* only changing the expected label. For a filter or refinement failure,
|
|
7982
|
+
* annotate the filter with `message` to replace the whole filter failure
|
|
7983
|
+
* message, or `expected` to keep the default
|
|
7984
|
+
* `Expected <expected>, got <actual>` shape.
|
|
7556
7985
|
*/
|
|
7557
7986
|
readonly message?: string | undefined;
|
|
7558
7987
|
/**
|
|
7559
7988
|
* The message to use when a key is unexpected.
|
|
7560
7989
|
*/
|
|
7561
7990
|
readonly messageUnexpectedKey?: string | undefined;
|
|
7991
|
+
/**
|
|
7992
|
+
* Stable identifier for this schema node.
|
|
7993
|
+
*
|
|
7994
|
+
* Identifiers are used by schema tooling, including JSON Schema
|
|
7995
|
+
* generation, to name references. The default formatter also uses
|
|
7996
|
+
* `identifier` as the expected label for type-level failures, such as
|
|
7997
|
+
* `Expected UserId, got null`.
|
|
7998
|
+
*
|
|
7999
|
+
* `identifier` does not name a failed filter or refinement. If the base
|
|
8000
|
+
* type matches and a filter fails, put `expected` or `message` on the
|
|
8001
|
+
* filter/refinement instead.
|
|
8002
|
+
*/
|
|
7562
8003
|
readonly identifier?: string | undefined;
|
|
7563
8004
|
readonly parseOptions?: AST.ParseOptions | undefined;
|
|
7564
8005
|
/**
|
|
@@ -7572,16 +8013,24 @@ export declare namespace Annotations {
|
|
|
7572
8013
|
readonly toArbitrary?: ToArbitrary.Declaration<T, TypeParameters> | undefined;
|
|
7573
8014
|
}
|
|
7574
8015
|
/**
|
|
8016
|
+
* Helpers for projecting declaration type-parameter schemas into decoded or
|
|
8017
|
+
* encoded codec arrays used by annotation hooks.
|
|
8018
|
+
*
|
|
7575
8019
|
* @since 4.0.0
|
|
7576
8020
|
*/
|
|
7577
8021
|
namespace TypeParameters {
|
|
7578
8022
|
/**
|
|
8023
|
+
* Maps declaration type-parameter schemas to codecs for their decoded `Type`
|
|
8024
|
+
* values.
|
|
8025
|
+
*
|
|
7579
8026
|
* @since 4.0.0
|
|
7580
8027
|
*/
|
|
7581
8028
|
type Type<TypeParameters extends ReadonlyArray<Top>> = {
|
|
7582
8029
|
readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Type"]>;
|
|
7583
8030
|
};
|
|
7584
8031
|
/**
|
|
8032
|
+
* Maps declaration type-parameter schemas to codecs for their `Encoded` values.
|
|
8033
|
+
*
|
|
7585
8034
|
* @since 4.0.0
|
|
7586
8035
|
*/
|
|
7587
8036
|
type Encoded<TypeParameters extends ReadonlyArray<Top>> = {
|
|
@@ -7624,7 +8073,21 @@ export declare namespace Annotations {
|
|
|
7624
8073
|
* @since 4.0.0
|
|
7625
8074
|
*/
|
|
7626
8075
|
interface Filter extends Augment {
|
|
8076
|
+
/**
|
|
8077
|
+
* Complete message to use when this filter or refinement fails.
|
|
8078
|
+
*
|
|
8079
|
+
* The default formatter checks filter annotations in this order:
|
|
8080
|
+
* `message`, then `expected`, then `<filter>`.
|
|
8081
|
+
*/
|
|
7627
8082
|
readonly message?: string | undefined;
|
|
8083
|
+
/**
|
|
8084
|
+
* Stable identifier for the schema after this filter is attached.
|
|
8085
|
+
*
|
|
8086
|
+
* This can affect schema tooling such as JSON Schema generation and
|
|
8087
|
+
* type-level failures before the filter runs, but it does not name the
|
|
8088
|
+
* failed filter itself. For filter failure messages, use `expected` or
|
|
8089
|
+
* `message`.
|
|
8090
|
+
*/
|
|
7628
8091
|
readonly identifier?: string | undefined;
|
|
7629
8092
|
/**
|
|
7630
8093
|
* Optional metadata used to identify or extend the filter with custom data.
|
|
@@ -7641,38 +8104,59 @@ export declare namespace Annotations {
|
|
|
7641
8104
|
readonly "~structural"?: boolean | undefined;
|
|
7642
8105
|
}
|
|
7643
8106
|
/**
|
|
8107
|
+
* Types used by arbitrary-derivation annotations to configure `toArbitrary`
|
|
8108
|
+
* hooks and carry merged fast-check constraints.
|
|
8109
|
+
*
|
|
7644
8110
|
* @since 4.0.0
|
|
7645
8111
|
*/
|
|
7646
8112
|
namespace ToArbitrary {
|
|
7647
8113
|
/**
|
|
8114
|
+
* fast-check string constraints plus optional regular-expression pattern strings
|
|
8115
|
+
* used when deriving string arbitraries from schema checks.
|
|
8116
|
+
*
|
|
7648
8117
|
* @since 4.0.0
|
|
7649
8118
|
*/
|
|
7650
8119
|
interface StringConstraints extends FastCheck.StringSharedConstraints {
|
|
7651
8120
|
readonly patterns?: readonly [string, ...Array<string>];
|
|
7652
8121
|
}
|
|
7653
8122
|
/**
|
|
8123
|
+
* fast-check floating-point constraints plus `isInteger`, which switches
|
|
8124
|
+
* derived number arbitraries to integer generation.
|
|
8125
|
+
*
|
|
7654
8126
|
* @since 4.0.0
|
|
7655
8127
|
*/
|
|
7656
8128
|
interface NumberConstraints extends FastCheck.FloatConstraints {
|
|
7657
8129
|
readonly isInteger?: boolean;
|
|
7658
8130
|
}
|
|
7659
8131
|
/**
|
|
8132
|
+
* fast-check bigint constraints used when deriving arbitraries for bigint
|
|
8133
|
+
* schemas.
|
|
8134
|
+
*
|
|
7660
8135
|
* @since 4.0.0
|
|
7661
8136
|
*/
|
|
7662
8137
|
interface BigIntConstraints extends FastCheck.BigIntConstraints {
|
|
7663
8138
|
}
|
|
7664
8139
|
/**
|
|
8140
|
+
* fast-check array constraints plus an optional comparator used when deriving
|
|
8141
|
+
* unique-array arbitraries.
|
|
8142
|
+
*
|
|
7665
8143
|
* @since 4.0.0
|
|
7666
8144
|
*/
|
|
7667
8145
|
interface ArrayConstraints extends FastCheck.ArrayConstraints {
|
|
7668
8146
|
readonly comparator?: (a: any, b: any) => boolean;
|
|
7669
8147
|
}
|
|
7670
8148
|
/**
|
|
8149
|
+
* fast-check date constraints used when deriving arbitraries for `Date` and
|
|
8150
|
+
* DateTime schemas.
|
|
8151
|
+
*
|
|
7671
8152
|
* @since 4.0.0
|
|
7672
8153
|
*/
|
|
7673
8154
|
interface DateConstraints extends FastCheck.DateConstraints {
|
|
7674
8155
|
}
|
|
7675
8156
|
/**
|
|
8157
|
+
* Grouped arbitrary-generation constraints accumulated from schema checks and
|
|
8158
|
+
* passed to `toArbitrary` derivation.
|
|
8159
|
+
*
|
|
7676
8160
|
* @since 4.0.0
|
|
7677
8161
|
*/
|
|
7678
8162
|
interface Constraint {
|
|
@@ -7683,6 +8167,10 @@ export declare namespace Annotations {
|
|
|
7683
8167
|
readonly date?: DateConstraints | undefined;
|
|
7684
8168
|
}
|
|
7685
8169
|
/**
|
|
8170
|
+
* Context passed to arbitrary-derivation hooks, including accumulated
|
|
8171
|
+
* constraints and an `isSuspend` flag used to limit recursion for suspended
|
|
8172
|
+
* schemas.
|
|
8173
|
+
*
|
|
7686
8174
|
* @since 4.0.0
|
|
7687
8175
|
*/
|
|
7688
8176
|
interface Context {
|
|
@@ -7695,6 +8183,11 @@ export declare namespace Annotations {
|
|
|
7695
8183
|
readonly constraints?: ToArbitrary.Constraint | undefined;
|
|
7696
8184
|
}
|
|
7697
8185
|
/**
|
|
8186
|
+
* Hook signature for declaration schema arbitrary annotations.
|
|
8187
|
+
*
|
|
8188
|
+
* Given arbitraries for any type parameters, returns a function that receives the
|
|
8189
|
+
* fast-check module and derivation context and produces an arbitrary for `T`.
|
|
8190
|
+
*
|
|
7698
8191
|
* @since 4.0.0
|
|
7699
8192
|
*/
|
|
7700
8193
|
interface Declaration<T, TypeParameters extends ReadonlyArray<Top>> {
|
|
@@ -7704,10 +8197,17 @@ export declare namespace Annotations {
|
|
|
7704
8197
|
}
|
|
7705
8198
|
}
|
|
7706
8199
|
/**
|
|
8200
|
+
* Types used by formatter annotations to customize formatter derivation for
|
|
8201
|
+
* declaration schemas.
|
|
8202
|
+
*
|
|
7707
8203
|
* @since 4.0.0
|
|
7708
8204
|
*/
|
|
7709
8205
|
namespace ToFormatter {
|
|
7710
8206
|
/**
|
|
8207
|
+
* Hook signature for declaration schema formatter annotations.
|
|
8208
|
+
*
|
|
8209
|
+
* Given formatters for any type parameters, returns a formatter for `T`.
|
|
8210
|
+
*
|
|
7711
8211
|
* @since 4.0.0
|
|
7712
8212
|
*/
|
|
7713
8213
|
interface Declaration<T, TypeParameters extends ReadonlyArray<Top>> {
|
|
@@ -7717,10 +8217,17 @@ export declare namespace Annotations {
|
|
|
7717
8217
|
}
|
|
7718
8218
|
}
|
|
7719
8219
|
/**
|
|
8220
|
+
* Types used by equivalence annotations to customize equivalence derivation for
|
|
8221
|
+
* declaration schemas.
|
|
8222
|
+
*
|
|
7720
8223
|
* @since 4.0.0
|
|
7721
8224
|
*/
|
|
7722
8225
|
namespace ToEquivalence {
|
|
7723
8226
|
/**
|
|
8227
|
+
* Hook signature for declaration schema equivalence annotations.
|
|
8228
|
+
*
|
|
8229
|
+
* Given equivalences for any type parameters, returns an `Equivalence` for `T`.
|
|
8230
|
+
*
|
|
7724
8231
|
* @since 4.0.0
|
|
7725
8232
|
*/
|
|
7726
8233
|
interface Declaration<T, TypeParameters extends ReadonlyArray<Top>> {
|
|
@@ -7730,6 +8237,10 @@ export declare namespace Annotations {
|
|
|
7730
8237
|
}
|
|
7731
8238
|
}
|
|
7732
8239
|
/**
|
|
8240
|
+
* Annotations that can be attached to schema issues.
|
|
8241
|
+
*
|
|
8242
|
+
* The optional `message` field overrides the default issue message.
|
|
8243
|
+
*
|
|
7733
8244
|
* @category Model
|
|
7734
8245
|
* @since 4.0.0
|
|
7735
8246
|
*/
|
|
@@ -7737,7 +8248,10 @@ export declare namespace Annotations {
|
|
|
7737
8248
|
readonly message?: string | undefined;
|
|
7738
8249
|
}
|
|
7739
8250
|
/**
|
|
7740
|
-
*
|
|
8251
|
+
* Registry of metadata payloads emitted by built-in schema filters and checks.
|
|
8252
|
+
*
|
|
8253
|
+
* Do not augment this interface with custom metadata; extend `MetaDefinitions`
|
|
8254
|
+
* instead.
|
|
7741
8255
|
*
|
|
7742
8256
|
* @since 4.0.0
|
|
7743
8257
|
*/
|
|
@@ -7940,17 +8454,24 @@ export declare namespace Annotations {
|
|
|
7940
8454
|
};
|
|
7941
8455
|
}
|
|
7942
8456
|
/**
|
|
8457
|
+
* Union of all metadata payloads defined by `BuiltInMetaDefinitions`.
|
|
8458
|
+
*
|
|
7943
8459
|
* @since 4.0.0
|
|
7944
8460
|
*/
|
|
7945
8461
|
type BuiltInMeta = BuiltInMetaDefinitions[keyof BuiltInMetaDefinitions];
|
|
7946
8462
|
/**
|
|
7947
|
-
*
|
|
8463
|
+
* Augmentable registry of schema filter metadata payloads.
|
|
8464
|
+
*
|
|
8465
|
+
* Extend this interface to add custom values accepted by annotation `meta`
|
|
8466
|
+
* fields.
|
|
7948
8467
|
*
|
|
7949
8468
|
* @since 4.0.0
|
|
7950
8469
|
*/
|
|
7951
8470
|
interface MetaDefinitions extends BuiltInMetaDefinitions {
|
|
7952
8471
|
}
|
|
7953
8472
|
/**
|
|
8473
|
+
* Union of built-in and user-augmented schema filter metadata payloads.
|
|
8474
|
+
*
|
|
7954
8475
|
* @since 4.0.0
|
|
7955
8476
|
*/
|
|
7956
8477
|
type Meta = MetaDefinitions[keyof MetaDefinitions];
|