effect 4.0.0-beta.69 → 4.0.0-beta.70
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 +454 -0
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +152 -0
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +87 -33
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +37 -11
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +71 -14
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +35 -10
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +4 -0
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +4 -0
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +16 -11
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +16 -11
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +13 -1
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +8 -0
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +95 -3
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +56 -2
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +312 -0
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +126 -0
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +20 -0
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +12 -0
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +59 -22
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +29 -10
- package/dist/Chunk.js.map +1 -1
- package/dist/Combiner.d.ts +75 -71
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +67 -62
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +167 -46
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +108 -28
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +235 -158
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +144 -93
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +21 -79
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +20 -75
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +4 -4
- package/dist/Context.js +2 -2
- package/dist/Cron.d.ts +42 -16
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +33 -13
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +6 -0
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +132 -70
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +44 -29
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +227 -14
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +115 -6
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +94 -27
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +33 -8
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +2 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Duration.d.ts +64 -6
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +26 -2
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +907 -603
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +360 -233
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +3 -1
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -1
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +16 -0
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +16 -0
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +52 -40
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +32 -26
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +190 -153
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +129 -104
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +35 -14
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +18 -6
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +10 -3
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +4 -3
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +212 -6
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +139 -2
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +8 -0
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +4 -0
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +46 -23
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +27 -11
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +43 -4
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +27 -4
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +21 -6
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +17 -6
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +64 -0
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +26 -0
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +53 -21
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +20 -9
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +21 -22
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +12 -12
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +67 -75
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +29 -19
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +51 -13
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +19 -3
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +22 -21
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +33 -10
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +27 -10
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +50 -9
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +17 -3
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +4 -0
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +2 -0
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +2 -0
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +15 -2
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +11 -2
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +104 -22
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +46 -12
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +61 -80
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +35 -42
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +16 -20
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +16 -20
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +123 -73
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +95 -53
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +28 -2
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +22 -2
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +781 -335
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +324 -129
- package/dist/Layer.js.map +1 -1
- package/dist/LogLevel.d.ts +86 -13
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +30 -4
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +63 -51
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +61 -51
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +12 -0
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +1 -0
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +83 -1
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +31 -1
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +89 -12
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +53 -8
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +14 -0
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +4 -0
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +2 -0
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +24 -6
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +22 -6
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +2 -0
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +69 -30
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +52 -22
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +6 -0
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +2 -0
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +16 -30
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +6 -12
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +90 -40
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +48 -24
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +121 -111
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +56 -54
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +169 -167
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +135 -135
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +4 -0
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +2 -0
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +7 -5
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +5 -5
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +8 -0
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +4 -0
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +10 -0
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +8 -0
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +12 -0
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +10 -0
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +30 -16
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +30 -16
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +520 -352
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +271 -184
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +4 -0
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +2 -0
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +22 -4
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +17 -3
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +16 -0
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +10 -0
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +44 -0
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +28 -0
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +25 -6
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +11 -2
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +10 -6
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +2 -2
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +3 -1
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +24 -3
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +12 -3
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +54 -41
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +42 -32
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +10 -0
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +6 -0
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +20 -11
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +10 -6
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +45 -24
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +41 -21
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +18 -1
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +17 -1
- package/dist/References.js.map +1 -1
- package/dist/Request.d.ts +3 -3
- package/dist/Request.js +2 -2
- package/dist/RequestResolver.d.ts +7 -17
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +3 -5
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +2 -0
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +2 -0
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +188 -6
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +84 -2
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +14 -11
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +11 -9
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +27 -3
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +21 -2
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +22 -19
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +14 -12
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +547 -130
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +409 -121
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +123 -65
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +90 -39
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +269 -234
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +245 -215
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +48 -46
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +34 -34
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +58 -0
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +58 -0
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +198 -96
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +107 -45
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +272 -203
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +249 -187
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +2 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +2 -0
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +18 -0
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +12 -0
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +44 -0
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +18 -0
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +9 -3
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +3 -1
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +6 -0
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +4 -0
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +108 -0
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +54 -0
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +7 -3
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +2 -0
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +416 -16
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +164 -8
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +14 -0
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +6 -0
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +371 -191
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +144 -77
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +7 -1
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +5 -1
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +2 -0
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +2 -0
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Tracer.d.ts +17 -27
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +8 -12
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +23 -9
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +13 -3
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +287 -144
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +135 -66
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +182 -93
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +68 -35
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +3 -4
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +163 -86
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +57 -30
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +24 -27
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +9 -6
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +2 -0
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +36 -35
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +22 -21
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +77 -114
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +45 -62
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxRef.d.ts +4 -0
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +2 -0
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +66 -27
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +38 -15
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/Types.d.ts +202 -75
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts +31 -29
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +27 -21
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +28 -0
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +2 -0
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +29 -35
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +11 -13
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +18 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/testing/TestClock.d.ts +17 -17
- package/dist/testing/TestClock.js +1 -1
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +2 -0
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +43 -55
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +43 -55
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +62 -11
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +58 -11
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +4 -4
- package/dist/unstable/ai/AnthropicStructuredOutput.js +4 -4
- package/dist/unstable/ai/Chat.d.ts +29 -1
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +15 -1
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +10 -0
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +8 -0
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +32 -46
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +5 -14
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +84 -32
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +73 -28
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +8 -0
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +6 -0
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +9 -5
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +4 -0
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +3 -2
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +3 -2
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +62 -35
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +16 -15
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +40 -21
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +10 -0
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +8 -0
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +4 -0
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +30 -5
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +7 -1
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +6 -0
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +4 -0
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +68 -0
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +36 -0
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +12 -0
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +6 -0
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +14 -4
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +4 -0
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +6 -0
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +4 -0
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +123 -12
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +57 -4
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +31 -14
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +23 -10
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +10 -0
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +46 -5
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +10 -0
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +10 -0
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +47 -40
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +25 -20
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +1 -0
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +10 -2
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +3 -0
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +8 -1
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +10 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +2 -0
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +8 -0
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +8 -0
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +4 -0
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +4 -0
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +3 -4
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +24 -0
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +12 -0
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +10 -4
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +6 -0
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +4 -0
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +10 -0
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +8 -0
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +16 -0
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +10 -0
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +16 -0
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +16 -0
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +8 -0
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +8 -0
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +24 -0
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +18 -0
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +64 -20
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +8 -0
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +6 -6
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +4 -3
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +2 -0
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +2 -0
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +13 -2
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +13 -2
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +8 -8
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +8 -8
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +2 -0
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +2 -0
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +4 -0
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +4 -0
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +2 -0
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +2 -0
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +3 -2
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +3 -2
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +34 -2
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +14 -0
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +4 -0
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +2 -0
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +24 -0
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +18 -0
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +46 -2
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +30 -2
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +24 -17
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +20 -11
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +16 -0
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +4 -0
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +2 -0
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +20 -0
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +18 -0
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +22 -0
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +18 -0
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +10 -0
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +10 -0
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +4 -0
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +4 -0
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +4 -0
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +4 -0
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +6 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +6 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +8 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +8 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +11 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +11 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +2 -0
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +2 -0
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +34 -0
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +18 -0
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +4 -0
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +4 -0
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +4 -0
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +60 -0
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +24 -0
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +32 -0
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +22 -0
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +44 -0
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +14 -0
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -0
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +2 -0
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +6 -0
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +6 -0
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +4 -0
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +4 -0
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +2 -0
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +2 -0
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +54 -16
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +26 -1
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +35 -1
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +17 -1
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +17 -3
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +16 -0
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +30 -0
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +28 -0
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +8 -0
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +6 -0
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +96 -0
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +50 -0
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +12 -0
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +10 -0
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +49 -2
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +35 -2
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.d.ts +14 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +4 -0
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +64 -0
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +28 -0
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +10 -4
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +4 -0
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +9 -4
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +5 -4
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +2 -0
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +2 -0
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +23 -14
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +6 -3
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +14 -0
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +6 -0
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +38 -15
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +4 -0
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +14 -3
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +10 -0
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +17 -11
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +17 -11
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +2 -4
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +2 -4
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +2 -0
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +2 -0
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +2 -0
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +2 -0
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +2 -0
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js +2 -0
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +2 -0
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +2 -0
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +4 -0
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +4 -0
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +8 -9
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +3 -3
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +8 -0
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +8 -0
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +3 -2
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +3 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +6 -2
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +6 -2
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +10 -0
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +8 -0
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -0
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +2 -0
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +2 -0
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +2 -0
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +21 -6
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +10 -0
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +14 -0
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +14 -0
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +6 -3
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +4 -0
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +6 -0
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +4 -0
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +70 -19
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +10 -0
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +20 -4
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +105 -14
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +53 -8
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +4 -0
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +2 -0
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +8 -0
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +2 -0
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +32 -0
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +12 -0
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +8 -6
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +4 -3
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -0
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +4 -0
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +27 -3
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +15 -3
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +38 -2
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +12 -2
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +6 -0
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +6 -0
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +5 -3
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +5 -3
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +43 -12
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +41 -12
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +6 -4
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +6 -4
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +8 -4
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +3 -0
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +3 -0
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +42 -34
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +18 -19
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +454 -0
- package/src/BigDecimal.ts +87 -33
- package/src/BigInt.ts +71 -14
- package/src/Boolean.ts +4 -0
- package/src/Brand.ts +16 -11
- package/src/Cache.ts +17 -1
- package/src/Cause.ts +95 -3
- package/src/Channel.ts +326 -0
- package/src/ChannelSchema.ts +24 -0
- package/src/Chunk.ts +59 -22
- package/src/Combiner.ts +75 -71
- package/src/Config.ts +167 -46
- package/src/ConfigProvider.ts +235 -158
- package/src/Console.ts +25 -99
- package/src/Context.ts +4 -4
- package/src/Cron.ts +42 -16
- package/src/Crypto.ts +6 -0
- package/src/Data.ts +132 -70
- package/src/DateTime.ts +227 -14
- package/src/Deferred.ts +94 -27
- package/src/Differ.ts +2 -0
- package/src/Duration.ts +64 -6
- package/src/Effect.ts +909 -605
- package/src/Effectable.ts +3 -1
- package/src/Encoding.ts +16 -0
- package/src/Equal.ts +52 -40
- package/src/Equivalence.ts +190 -153
- package/src/ErrorReporter.ts +35 -14
- package/src/ExecutionPlan.ts +10 -3
- package/src/Exit.ts +212 -6
- package/src/Fiber.ts +8 -0
- package/src/FiberHandle.ts +46 -23
- package/src/FiberMap.ts +43 -4
- package/src/FiberSet.ts +21 -6
- package/src/FileSystem.ts +64 -0
- package/src/Filter.ts +53 -21
- package/src/Formatter.ts +21 -22
- package/src/Function.ts +67 -75
- package/src/Graph.ts +51 -13
- package/src/HKT.ts +22 -21
- package/src/Hash.ts +33 -10
- package/src/HashMap.ts +50 -9
- package/src/HashRing.ts +4 -0
- package/src/HashSet.ts +2 -0
- package/src/Inspectable.ts +15 -2
- package/src/Iterable.ts +104 -22
- package/src/JsonPatch.ts +61 -80
- package/src/JsonPointer.ts +16 -20
- package/src/JsonSchema.ts +123 -73
- package/src/Latch.ts +28 -2
- package/src/Layer.ts +781 -335
- package/src/LogLevel.ts +86 -13
- package/src/Logger.ts +71 -51
- package/src/ManagedRuntime.ts +12 -0
- package/src/Match.ts +83 -1
- package/src/Metric.ts +105 -12
- package/src/MutableHashMap.ts +18 -0
- package/src/MutableHashSet.ts +2 -0
- package/src/MutableList.ts +24 -6
- package/src/MutableRef.ts +2 -0
- package/src/Newtype.ts +69 -30
- package/src/NonEmptyIterable.ts +6 -0
- package/src/Number.ts +16 -30
- package/src/Optic.ts +90 -40
- package/src/Option.ts +121 -111
- package/src/Order.ts +169 -167
- package/src/Ordering.ts +4 -0
- package/src/PartitionedSemaphore.ts +7 -5
- package/src/Path.ts +8 -0
- package/src/Pipeable.ts +10 -0
- package/src/PlatformError.ts +12 -0
- package/src/Pool.ts +30 -16
- package/src/Predicate.ts +520 -352
- package/src/PrimaryKey.ts +4 -0
- package/src/PubSub.ts +23 -5
- package/src/Pull.ts +16 -0
- package/src/Queue.ts +44 -0
- package/src/Random.ts +25 -6
- package/src/RcMap.ts +10 -6
- package/src/RcRef.ts +3 -1
- package/src/Record.ts +24 -3
- package/src/Redactable.ts +54 -41
- package/src/Redacted.ts +10 -0
- package/src/Reducer.ts +20 -11
- package/src/Ref.ts +95 -58
- package/src/References.ts +18 -1
- package/src/Request.ts +3 -3
- package/src/RequestResolver.ts +8 -22
- package/src/Resource.ts +2 -0
- package/src/Result.ts +192 -6
- package/src/Runtime.ts +14 -11
- package/src/Schedule.ts +35 -3
- package/src/Scheduler.ts +22 -19
- package/src/Schema.ts +547 -130
- package/src/SchemaAST.ts +123 -65
- package/src/SchemaGetter.ts +269 -234
- package/src/SchemaIssue.ts +48 -46
- package/src/SchemaParser.ts +58 -0
- package/src/SchemaRepresentation.ts +198 -96
- package/src/SchemaTransformation.ts +272 -203
- package/src/SchemaUtils.ts +2 -0
- package/src/Scope.ts +19 -1
- package/src/ScopedCache.ts +56 -0
- package/src/ScopedRef.ts +9 -3
- package/src/Semaphore.ts +6 -0
- package/src/Sink.ts +108 -0
- package/src/Stdio.ts +7 -3
- package/src/Stream.ts +464 -16
- package/src/String.ts +14 -0
- package/src/Struct.ts +371 -191
- package/src/SubscriptionRef.ts +7 -1
- package/src/SynchronizedRef.ts +2 -0
- package/src/Tracer.ts +17 -27
- package/src/Trie.ts +23 -9
- package/src/Tuple.ts +287 -144
- package/src/TxChunk.ts +182 -93
- package/src/TxDeferred.ts +3 -4
- package/src/TxHashMap.ts +171 -90
- package/src/TxHashSet.ts +36 -35
- package/src/TxPriorityQueue.ts +2 -0
- package/src/TxPubSub.ts +36 -35
- package/src/TxQueue.ts +77 -114
- package/src/TxRef.ts +4 -0
- package/src/TxSemaphore.ts +66 -27
- package/src/Types.ts +202 -75
- package/src/UndefinedOr.ts +31 -29
- package/src/Unify.ts +28 -0
- package/src/Utils.ts +29 -35
- package/src/index.ts +18 -7
- package/src/testing/TestClock.ts +16 -16
- package/src/testing/TestConsole.ts +2 -0
- package/src/testing/TestSchema.ts +43 -55
- package/src/unstable/ai/AiError.ts +62 -11
- package/src/unstable/ai/AnthropicStructuredOutput.ts +4 -4
- package/src/unstable/ai/Chat.ts +29 -1
- package/src/unstable/ai/IdGenerator.ts +10 -0
- package/src/unstable/ai/LanguageModel.ts +32 -46
- package/src/unstable/ai/McpSchema.ts +84 -32
- package/src/unstable/ai/McpServer.ts +8 -0
- package/src/unstable/ai/Model.ts +9 -5
- package/src/unstable/ai/OpenAiStructuredOutput.ts +3 -2
- package/src/unstable/ai/Prompt.ts +62 -35
- package/src/unstable/ai/Response.ts +40 -21
- package/src/unstable/ai/ResponseIdTracker.ts +8 -0
- package/src/unstable/ai/Telemetry.ts +30 -5
- package/src/unstable/ai/Tokenizer.ts +6 -0
- package/src/unstable/ai/Tool.ts +68 -0
- package/src/unstable/ai/Toolkit.ts +12 -0
- package/src/unstable/cli/Argument.ts +14 -4
- package/src/unstable/cli/CliError.ts +6 -0
- package/src/unstable/cli/Command.ts +128 -12
- package/src/unstable/cli/Flag.ts +31 -14
- package/src/unstable/cli/Param.ts +96 -9
- package/src/unstable/cli/Primitive.ts +10 -0
- package/src/unstable/cli/Prompt.ts +47 -40
- package/src/unstable/cli/internal/command.ts +11 -2
- package/src/unstable/cli/internal/completions/descriptor.ts +3 -0
- package/src/unstable/cli/internal/parser.ts +8 -1
- package/src/unstable/cluster/ClusterCron.ts +10 -1
- package/src/unstable/cluster/ClusterSchema.ts +8 -0
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +4 -0
- package/src/unstable/cluster/DeliverAt.ts +3 -4
- package/src/unstable/cluster/Entity.ts +24 -0
- package/src/unstable/cluster/EntityProxy.ts +10 -4
- package/src/unstable/cluster/EntityProxyServer.ts +6 -0
- package/src/unstable/cluster/EntityResource.ts +10 -0
- package/src/unstable/cluster/Envelope.ts +16 -0
- package/src/unstable/cluster/HttpRunner.ts +16 -0
- package/src/unstable/cluster/K8sHttpClient.ts +8 -0
- package/src/unstable/cluster/Message.ts +24 -0
- package/src/unstable/cluster/MessageStorage.ts +44 -10
- package/src/unstable/cluster/Reply.ts +6 -6
- package/src/unstable/cluster/Runner.ts +2 -0
- package/src/unstable/cluster/RunnerHealth.ts +13 -2
- package/src/unstable/cluster/RunnerServer.ts +8 -8
- package/src/unstable/cluster/RunnerStorage.ts +2 -0
- package/src/unstable/cluster/ShardId.ts +4 -0
- package/src/unstable/cluster/Snowflake.ts +2 -0
- package/src/unstable/cluster/TestRunner.ts +3 -2
- package/src/unstable/devtools/DevToolsSchema.ts +34 -2
- package/src/unstable/devtools/DevToolsServer.ts +4 -0
- package/src/unstable/encoding/Msgpack.ts +24 -0
- package/src/unstable/encoding/Ndjson.ts +46 -2
- package/src/unstable/encoding/Sse.ts +24 -17
- package/src/unstable/eventlog/Event.ts +16 -0
- package/src/unstable/eventlog/EventGroup.ts +4 -0
- package/src/unstable/eventlog/EventJournal.ts +20 -0
- package/src/unstable/eventlog/EventLog.ts +22 -0
- package/src/unstable/eventlog/EventLogMessage.ts +10 -0
- package/src/unstable/eventlog/EventLogRemote.ts +4 -0
- package/src/unstable/eventlog/EventLogServer.ts +4 -0
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +6 -0
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +8 -0
- package/src/unstable/eventlog/EventLogSessionAuth.ts +11 -1
- package/src/unstable/eventlog/SqlEventJournal.ts +2 -0
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +2 -0
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +2 -0
- package/src/unstable/http/Cookies.ts +34 -0
- package/src/unstable/http/Etag.ts +4 -0
- package/src/unstable/http/FetchHttpClient.ts +4 -0
- package/src/unstable/http/Headers.ts +88 -0
- package/src/unstable/http/HttpBody.ts +32 -0
- package/src/unstable/http/HttpClient.ts +44 -0
- package/src/unstable/http/HttpClientRequest.ts +2 -0
- package/src/unstable/http/HttpClientResponse.ts +6 -0
- package/src/unstable/http/HttpEffect.ts +4 -0
- package/src/unstable/http/HttpPlatform.ts +2 -0
- package/src/unstable/http/HttpRouter.ts +54 -16
- package/src/unstable/http/HttpServer.ts +35 -1
- package/src/unstable/http/HttpServerError.ts +17 -3
- package/src/unstable/http/HttpServerRequest.ts +30 -0
- package/src/unstable/http/HttpServerRespondable.ts +8 -0
- package/src/unstable/http/HttpServerResponse.ts +96 -0
- package/src/unstable/http/HttpTraceContext.ts +12 -0
- package/src/unstable/http/Multipart.ts +49 -2
- package/src/unstable/http/Template.ts +14 -0
- package/src/unstable/http/UrlParams.ts +64 -0
- package/src/unstable/httpapi/HttpApi.ts +10 -4
- package/src/unstable/httpapi/HttpApiBuilder.ts +9 -4
- package/src/unstable/httpapi/HttpApiEndpoint.ts +2 -0
- package/src/unstable/httpapi/HttpApiGroup.ts +23 -14
- package/src/unstable/httpapi/HttpApiMiddleware.ts +14 -0
- package/src/unstable/httpapi/HttpApiScalar.ts +38 -15
- package/src/unstable/httpapi/HttpApiSchema.ts +14 -3
- package/src/unstable/httpapi/HttpApiSecurity.ts +17 -11
- package/src/unstable/httpapi/HttpApiSwagger.ts +2 -4
- package/src/unstable/httpapi/HttpApiTest.ts +2 -0
- package/src/unstable/httpapi/OpenApi.ts +2 -0
- package/src/unstable/observability/Otlp.ts +2 -0
- package/src/unstable/observability/OtlpExporter.ts +2 -0
- package/src/unstable/observability/OtlpLogger.ts +4 -0
- package/src/unstable/observability/OtlpMetrics.ts +8 -9
- package/src/unstable/observability/OtlpResource.ts +8 -0
- package/src/unstable/observability/OtlpTracer.ts +3 -2
- package/src/unstable/observability/PrometheusMetrics.ts +6 -2
- package/src/unstable/persistence/KeyValueStore.ts +10 -0
- package/src/unstable/persistence/Persistable.ts +2 -0
- package/src/unstable/persistence/PersistedCache.ts +2 -0
- package/src/unstable/persistence/PersistedQueue.ts +21 -6
- package/src/unstable/persistence/Persistence.ts +14 -0
- package/src/unstable/persistence/RateLimiter.ts +6 -3
- package/src/unstable/persistence/Redis.ts +6 -0
- package/src/unstable/process/ChildProcess.ts +70 -19
- package/src/unstable/process/ChildProcessSpawner.ts +20 -4
- package/src/unstable/reactivity/Atom.ts +119 -14
- package/src/unstable/reactivity/AtomHttpApi.ts +4 -0
- package/src/unstable/reactivity/AtomRef.ts +8 -0
- package/src/unstable/reactivity/AtomRegistry.ts +34 -0
- package/src/unstable/reactivity/AtomRpc.ts +8 -6
- package/src/unstable/reactivity/Hydration.ts +6 -0
- package/src/unstable/reactivity/Reactivity.ts +27 -3
- package/src/unstable/rpc/Rpc.ts +38 -2
- package/src/unstable/rpc/RpcSerialization.ts +6 -0
- package/src/unstable/rpc/RpcServer.ts +5 -3
- package/src/unstable/schema/Model.ts +43 -12
- package/src/unstable/sql/SqlClient.ts +1 -1
- package/src/unstable/sql/SqlResolver.ts +6 -4
- package/src/unstable/sql/Statement.ts +8 -4
- package/src/unstable/workflow/DurableClock.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +3 -0
- package/src/unstable/workflow/Workflow.ts +42 -34
package/dist/Schema.d.ts
CHANGED
|
@@ -151,7 +151,8 @@ export type ConstructorDefault = "no-default" | "with-default";
|
|
|
151
151
|
/**
|
|
152
152
|
* Options for `makeEffect`, `make`, and Class constructors.
|
|
153
153
|
*
|
|
154
|
-
* When to use
|
|
154
|
+
* **When to use**
|
|
155
|
+
*
|
|
155
156
|
* - Pass `disableChecks: true` to skip validation when you trust the data.
|
|
156
157
|
* - Pass `parseOptions` to control error reporting behavior.
|
|
157
158
|
*
|
|
@@ -176,7 +177,8 @@ export interface MakeOptions {
|
|
|
176
177
|
* parameters controlling type inference, mutability, optionality, services,
|
|
177
178
|
* and transformation behavior.
|
|
178
179
|
*
|
|
179
|
-
* When to use
|
|
180
|
+
* **When to use**
|
|
181
|
+
*
|
|
180
182
|
* - You are writing advanced generic schema utilities or performing schema
|
|
181
183
|
* introspection.
|
|
182
184
|
* - In user code, prefer {@link Schema}, {@link Codec}, {@link Decoder}, or
|
|
@@ -232,6 +234,8 @@ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<T
|
|
|
232
234
|
* `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
|
|
233
235
|
* and a decoder factory.
|
|
234
236
|
*
|
|
237
|
+
* **Details**
|
|
238
|
+
*
|
|
235
239
|
* The outer call `declareConstructor<T, E, Iso>()` fixes the decoded type `T`,
|
|
236
240
|
* the encoded type `E`, and the optional iso type. The inner call receives:
|
|
237
241
|
* - `typeParameters` — the concrete schemas for each type variable
|
|
@@ -290,6 +294,8 @@ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [
|
|
|
290
294
|
* function. The schema accepts any unknown value and succeeds when `is` returns
|
|
291
295
|
* `true`, failing with an `InvalidType` issue otherwise.
|
|
292
296
|
*
|
|
297
|
+
* **Details**
|
|
298
|
+
*
|
|
293
299
|
* Use this when the type has no type parameters. For parametric types such as
|
|
294
300
|
* `Option<A>` or `Array<A>`, use {@link declareConstructor} instead.
|
|
295
301
|
*
|
|
@@ -319,6 +325,8 @@ export declare function declare<T, Iso = T>(is: (u: unknown) => u is T, annotati
|
|
|
319
325
|
* Widens a schema's type to the fully-parameterized {@link Bottom} interface,
|
|
320
326
|
* making all 14 type parameters visible to TypeScript.
|
|
321
327
|
*
|
|
328
|
+
* **Details**
|
|
329
|
+
*
|
|
322
330
|
* Normally, concrete schema interfaces (e.g. `Schema<string>`) hide most type
|
|
323
331
|
* parameters. `revealBottom` is useful when writing generic utilities that need
|
|
324
332
|
* to inspect or propagate the complete set of type parameters.
|
|
@@ -347,6 +355,8 @@ export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"]
|
|
|
347
355
|
* Adds metadata annotations to a schema without changing its runtime behavior.
|
|
348
356
|
* This is the pipeable (curried) counterpart of the `.annotate` method.
|
|
349
357
|
*
|
|
358
|
+
* **Details**
|
|
359
|
+
*
|
|
350
360
|
* Annotations provide extra context used by documentation generators, JSON
|
|
351
361
|
* Schema converters, error formatters, and other tooling. Common keys include
|
|
352
362
|
* `title`, `description`, `examples`, `message`, and `identifier`.
|
|
@@ -375,6 +385,8 @@ export declare function annotate<S extends Top>(annotations: Annotations.Bottom<
|
|
|
375
385
|
* changing its runtime behavior. This is the encoded-side counterpart of
|
|
376
386
|
* `annotate`, which targets the decoded (Type) side.
|
|
377
387
|
*
|
|
388
|
+
* **Details**
|
|
389
|
+
*
|
|
378
390
|
* Internally the schema is flipped so that `Encoded` becomes `Type`,
|
|
379
391
|
* annotated, and then flipped back.
|
|
380
392
|
*
|
|
@@ -403,6 +415,8 @@ export declare function annotateEncoded<S extends Top>(annotations: Annotations.
|
|
|
403
415
|
* Adds key-level annotations to a schema field. This is the pipeable
|
|
404
416
|
* (curried) counterpart of the `.annotateKey` method.
|
|
405
417
|
*
|
|
418
|
+
* **Details**
|
|
419
|
+
*
|
|
406
420
|
* Key annotations apply to a field's position inside a `Struct` or `Tuple`
|
|
407
421
|
* rather than to the field's value type. They can carry a
|
|
408
422
|
* `messageMissingKey` to customise the error shown when the field is absent,
|
|
@@ -431,6 +445,8 @@ export declare function annotateKey<S extends Top>(annotations: Annotations.Key<
|
|
|
431
445
|
/**
|
|
432
446
|
* The existential "any schema" type — all type parameters are erased to `unknown`.
|
|
433
447
|
*
|
|
448
|
+
* **Details**
|
|
449
|
+
*
|
|
434
450
|
* Use `Top` as a constraint when writing generic utilities that must accept *any*
|
|
435
451
|
* schema regardless of its `Type`, `Encoded`, or service requirements. It is the
|
|
436
452
|
* widest possible schema type and therefore gives you the least static information.
|
|
@@ -474,6 +490,8 @@ export declare namespace Schema {
|
|
|
474
490
|
/**
|
|
475
491
|
* A typed view of a schema that tracks only the decoded (output) type `T`.
|
|
476
492
|
*
|
|
493
|
+
* **Details**
|
|
494
|
+
*
|
|
477
495
|
* Use `Schema<T>` as a constraint when you want to accept "any schema that
|
|
478
496
|
* decodes to `T`" and do not need to know or constrain the encoded
|
|
479
497
|
* representation, required services, or any other type parameters.
|
|
@@ -564,6 +582,8 @@ export declare namespace Codec {
|
|
|
564
582
|
/**
|
|
565
583
|
* A schema that additionally supports optic (lens/prism) operations.
|
|
566
584
|
*
|
|
585
|
+
* **Details**
|
|
586
|
+
*
|
|
567
587
|
* `Optic<T, Iso>` extends {@link Schema}`<T>` with an `Iso` type that
|
|
568
588
|
* describes the isomorphic counterpart used by the optic layer. Crucially,
|
|
569
589
|
* decoding and encoding require *no* Effect services (`DecodingServices` and
|
|
@@ -587,6 +607,8 @@ export interface Optic<out T, out Iso> extends Schema<T> {
|
|
|
587
607
|
* A schema that tracks the decoded type `T`, the encoded type `E`, and the
|
|
588
608
|
* Effect services required during decoding (`RD`) and encoding (`RE`).
|
|
589
609
|
*
|
|
610
|
+
* **Details**
|
|
611
|
+
*
|
|
590
612
|
* Use `Codec<T, E, RD, RE>` when you need to preserve full type information
|
|
591
613
|
* about a schema — both what it decodes to and what it serializes from/to.
|
|
592
614
|
* Most concrete schemas produced by this module implement `Codec`.
|
|
@@ -623,6 +645,8 @@ export interface Codec<out T, out E = T, out RD = never, out RE = never> extends
|
|
|
623
645
|
/**
|
|
624
646
|
* A {@link Codec} view for APIs that only *decode* (parse/validate) values.
|
|
625
647
|
*
|
|
648
|
+
* **Details**
|
|
649
|
+
*
|
|
626
650
|
* Use `Decoder<T, RD>` to accept "any schema that can decode to `T`" without
|
|
627
651
|
* constraining or depending on the encoded representation (`Encoded` is
|
|
628
652
|
* `unknown`) or encoding services.
|
|
@@ -647,6 +671,8 @@ export interface Decoder<out T, out RD = never> extends Codec<T, unknown, RD, un
|
|
|
647
671
|
/**
|
|
648
672
|
* A {@link Codec} view for APIs that only *encode* values.
|
|
649
673
|
*
|
|
674
|
+
* **Details**
|
|
675
|
+
*
|
|
650
676
|
* Use `Encoder<E, RE>` to accept "any schema that can encode to `E`" without
|
|
651
677
|
* constraining or depending on the decoded `Type` (`Type` is `unknown`) or
|
|
652
678
|
* decoding services.
|
|
@@ -672,6 +698,8 @@ export interface Encoder<out E, out RE = never> extends Codec<unknown, E, unknow
|
|
|
672
698
|
* Identity function that widens a value to the full {@link Codec} interface,
|
|
673
699
|
* prompting TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`).
|
|
674
700
|
*
|
|
701
|
+
* **Details**
|
|
702
|
+
*
|
|
675
703
|
* When a schema is stored in a variable typed as `Schema<T>` or `Top`, the
|
|
676
704
|
* encoded type and service requirements are erased. Passing the value through
|
|
677
705
|
* `revealCodec` recovers those parameters without any runtime cost.
|
|
@@ -697,6 +725,8 @@ export {
|
|
|
697
725
|
* Error thrown (or returned as the error channel value) when schema decoding
|
|
698
726
|
* or encoding fails.
|
|
699
727
|
*
|
|
728
|
+
* **Details**
|
|
729
|
+
*
|
|
700
730
|
* The `issue` field contains a structured {@link Issue.Issue} tree describing
|
|
701
731
|
* every validation failure, including the path to the problematic value,
|
|
702
732
|
* expected types, and actual values received. `message` renders the issue tree
|
|
@@ -719,6 +749,7 @@ export {
|
|
|
719
749
|
* }
|
|
720
750
|
* ```
|
|
721
751
|
*
|
|
752
|
+
* @category errors
|
|
722
753
|
* @since 4.0.0
|
|
723
754
|
*/
|
|
724
755
|
SchemaError };
|
|
@@ -747,6 +778,8 @@ export declare function isSchemaError(u: unknown): u is SchemaError;
|
|
|
747
778
|
* Returns a "Standard Schema" object conforming to the [Standard Schema
|
|
748
779
|
* v1](https://standardschema.dev/) specification.
|
|
749
780
|
*
|
|
781
|
+
* **Details**
|
|
782
|
+
*
|
|
750
783
|
* This function creates a schema whose `validate` method attempts to decode and
|
|
751
784
|
* validate the provided input synchronously. If the underlying `Schema`
|
|
752
785
|
* includes any asynchronous components (e.g., asynchronous message resolutions
|
|
@@ -812,6 +845,8 @@ export declare function toStandardSchemaV1<S extends Decoder<unknown>>(self: S,
|
|
|
812
845
|
/**
|
|
813
846
|
* Experimental support for converting a schema to a Standard JSON Schema V1.
|
|
814
847
|
*
|
|
848
|
+
* **Details**
|
|
849
|
+
*
|
|
815
850
|
* https://github.com/standard-schema/standard-schema/pull/134
|
|
816
851
|
*
|
|
817
852
|
* @category Standard Schema
|
|
@@ -822,6 +857,8 @@ export declare function toStandardJSONSchemaV1<S extends Top>(self: S): Standard
|
|
|
822
857
|
* Creates a type guard function that checks if a value conforms to a given
|
|
823
858
|
* schema.
|
|
824
859
|
*
|
|
860
|
+
* **Details**
|
|
861
|
+
*
|
|
825
862
|
* This function returns a predicate that performs a type-safe check, narrowing
|
|
826
863
|
* the type of the input value if the check passes. It's particularly useful for
|
|
827
864
|
* runtime type validation and TypeScript type narrowing.
|
|
@@ -852,6 +889,8 @@ export declare const is: typeof Parser.is;
|
|
|
852
889
|
* Creates an assertion function that throws an error if the input doesn't match
|
|
853
890
|
* the schema.
|
|
854
891
|
*
|
|
892
|
+
* **Details**
|
|
893
|
+
*
|
|
855
894
|
* This function is useful for runtime type checking with TypeScript's `asserts`
|
|
856
895
|
* type guard. It narrows the type of the input if the assertion succeeds, or
|
|
857
896
|
* throws an error if it fails.
|
|
@@ -994,6 +1033,7 @@ export declare const decodeUnknownPromise: typeof Parser.decodeUnknownPromise;
|
|
|
994
1033
|
* schema issue. For `unknown` input use `decodeUnknownPromise`.
|
|
995
1034
|
*
|
|
996
1035
|
* **Details**
|
|
1036
|
+
*
|
|
997
1037
|
* Options may be provided either when creating the decoder or when applying it;
|
|
998
1038
|
* application options override creation options.
|
|
999
1039
|
*
|
|
@@ -1008,6 +1048,7 @@ export declare const decodePromise: typeof Parser.decodePromise;
|
|
|
1008
1048
|
* mismatch as an exception. For typed input use `decodeSync`.
|
|
1009
1049
|
*
|
|
1010
1050
|
* **Details**
|
|
1051
|
+
*
|
|
1011
1052
|
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
1012
1053
|
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
1013
1054
|
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
@@ -1040,6 +1081,7 @@ export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
|
|
|
1040
1081
|
* contains the schema issue. For `unknown` input use `decodeUnknownSync`.
|
|
1041
1082
|
*
|
|
1042
1083
|
* **Details**
|
|
1084
|
+
*
|
|
1043
1085
|
* Only service-free schemas can be decoded synchronously. Options may be
|
|
1044
1086
|
* provided either when creating the decoder or when applying it; application
|
|
1045
1087
|
* options override creation options.
|
|
@@ -1206,6 +1248,8 @@ export declare const encodeSync: <S extends Encoder<unknown>>(schema: S, options
|
|
|
1206
1248
|
/**
|
|
1207
1249
|
* Creates a schema from an AST (Abstract Syntax Tree) node.
|
|
1208
1250
|
*
|
|
1251
|
+
* **Details**
|
|
1252
|
+
*
|
|
1209
1253
|
* This is the fundamental constructor for all schemas in the Effect Schema
|
|
1210
1254
|
* library. It takes an AST node and wraps it in a fully-typed schema that
|
|
1211
1255
|
* preserves all type information and provides the complete schema API.
|
|
@@ -1318,7 +1362,10 @@ interface optionalLambda extends Lambda {
|
|
|
1318
1362
|
* Marks a struct field as optional, allowing the key to be absent or
|
|
1319
1363
|
* `undefined`.
|
|
1320
1364
|
*
|
|
1321
|
-
*
|
|
1365
|
+
* **Details**
|
|
1366
|
+
*
|
|
1367
|
+
* The resulting property may be absent or explicitly set to `undefined`.
|
|
1368
|
+
* Equivalent to `optionalKey(UndefinedOr(S))`.
|
|
1322
1369
|
*
|
|
1323
1370
|
* Use {@link optionalKey} instead if you want exact optional semantics (absent
|
|
1324
1371
|
* only, not `undefined`).
|
|
@@ -1499,6 +1546,7 @@ export declare namespace TemplateLiteral {
|
|
|
1499
1546
|
* Constraint for schema parts that can appear inside a `TemplateLiteral`.
|
|
1500
1547
|
*
|
|
1501
1548
|
* **Details**
|
|
1549
|
+
*
|
|
1502
1550
|
* The schema's encoded value must be a `string`, `number`, or `bigint` so it can
|
|
1503
1551
|
* be converted into a template literal string segment.
|
|
1504
1552
|
*
|
|
@@ -1579,6 +1627,7 @@ export declare namespace TemplateLiteralParser {
|
|
|
1579
1627
|
* Computes the decoded tuple type produced by `TemplateLiteralParser`.
|
|
1580
1628
|
*
|
|
1581
1629
|
* **Details**
|
|
1630
|
+
*
|
|
1582
1631
|
* Literal parts contribute their literal value to the tuple. Schema parts
|
|
1583
1632
|
* contribute their decoded `Type`.
|
|
1584
1633
|
*
|
|
@@ -1767,7 +1816,9 @@ export interface Number extends Bottom<number, number, never, never, AST.Number,
|
|
|
1767
1816
|
/**
|
|
1768
1817
|
* Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
|
|
1769
1818
|
*
|
|
1770
|
-
* **
|
|
1819
|
+
* **Details**
|
|
1820
|
+
*
|
|
1821
|
+
* Default JSON serializer:
|
|
1771
1822
|
*
|
|
1772
1823
|
* - Finite numbers are serialized as numbers.
|
|
1773
1824
|
* - Non-finite values are serialized as strings (`"NaN"`, `"Infinity"`, `"-Infinity"`).
|
|
@@ -1888,6 +1939,8 @@ export declare function UniqueSymbol<const sym extends symbol>(symbol: sym): Uni
|
|
|
1888
1939
|
/**
|
|
1889
1940
|
* Namespace for struct field type utilities.
|
|
1890
1941
|
*
|
|
1942
|
+
* **Details**
|
|
1943
|
+
*
|
|
1891
1944
|
* These types compute the decoded `Type`, encoded `Encoded`, and constructor
|
|
1892
1945
|
* input `MakeIn` of a {@link Struct} from its field map, handling optional,
|
|
1893
1946
|
* mutable, and other field modifiers automatically.
|
|
@@ -1933,6 +1986,7 @@ export declare namespace Struct {
|
|
|
1933
1986
|
* Computes the decoded object type for a struct field map.
|
|
1934
1987
|
*
|
|
1935
1988
|
* **Details**
|
|
1989
|
+
*
|
|
1936
1990
|
* Field schemas contribute their decoded `Type`. `optionalKey` and `optional`
|
|
1937
1991
|
* produce optional properties, while `mutableKey` produces writable properties.
|
|
1938
1992
|
*
|
|
@@ -1954,6 +2008,7 @@ export declare namespace Struct {
|
|
|
1954
2008
|
* `Iso` type.
|
|
1955
2009
|
*
|
|
1956
2010
|
* **Details**
|
|
2011
|
+
*
|
|
1957
2012
|
* The resulting property optionality and mutability follow the same field
|
|
1958
2013
|
* modifiers used by `Struct.Type`.
|
|
1959
2014
|
*
|
|
@@ -1984,6 +2039,7 @@ export declare namespace Struct {
|
|
|
1984
2039
|
* Computes the encoded object type for a struct field map.
|
|
1985
2040
|
*
|
|
1986
2041
|
* **Details**
|
|
2042
|
+
*
|
|
1987
2043
|
* Field schemas contribute their `Encoded` type. Encoded-side optionality and
|
|
1988
2044
|
* mutability modifiers determine whether properties are optional or writable in
|
|
1989
2045
|
* the encoded shape.
|
|
@@ -2026,6 +2082,7 @@ export declare namespace Struct {
|
|
|
2026
2082
|
* Computes the input object type accepted when constructing a struct value.
|
|
2027
2083
|
*
|
|
2028
2084
|
* **Details**
|
|
2085
|
+
*
|
|
2029
2086
|
* Required fields use each field schema's `~type.make` input. Fields marked
|
|
2030
2087
|
* optional or with a constructor default may be omitted.
|
|
2031
2088
|
*
|
|
@@ -2039,6 +2096,7 @@ export declare namespace Struct {
|
|
|
2039
2096
|
* schema-defined fields.
|
|
2040
2097
|
*
|
|
2041
2098
|
* **Details**
|
|
2099
|
+
*
|
|
2042
2100
|
* The `fields` property exposes the original field map for reuse, and
|
|
2043
2101
|
* `mapFields` creates a new struct schema by transforming that field map.
|
|
2044
2102
|
*
|
|
@@ -2071,7 +2129,9 @@ export interface Struct<Fields extends Struct.Fields> extends Bottom<Struct.Type
|
|
|
2071
2129
|
/**
|
|
2072
2130
|
* Returns a new struct with the fields modified by the provided function.
|
|
2073
2131
|
*
|
|
2074
|
-
* **
|
|
2132
|
+
* **Details**
|
|
2133
|
+
*
|
|
2134
|
+
* Options:
|
|
2075
2135
|
*
|
|
2076
2136
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
2077
2137
|
* that were attached to the original union. Defaults to `false`.
|
|
@@ -2089,6 +2149,8 @@ export interface Struct<Fields extends Struct.Fields> extends Bottom<Struct.Type
|
|
|
2089
2149
|
/**
|
|
2090
2150
|
* Defines a struct schema from a map of field schemas.
|
|
2091
2151
|
*
|
|
2152
|
+
* **Details**
|
|
2153
|
+
*
|
|
2092
2154
|
* Each field value is a schema. Use {@link optionalKey} or {@link optional} to
|
|
2093
2155
|
* mark fields as optional, and {@link mutableKey} to mark them as mutable.
|
|
2094
2156
|
*
|
|
@@ -2160,6 +2222,8 @@ export interface encodeKeys<S extends Top & {
|
|
|
2160
2222
|
/**
|
|
2161
2223
|
* Renames struct keys in the encoded form without changing the decoded type.
|
|
2162
2224
|
*
|
|
2225
|
+
* **Details**
|
|
2226
|
+
*
|
|
2163
2227
|
* Takes a partial mapping `{ decodedKey: encodedKey }` and produces a
|
|
2164
2228
|
* transformation schema that decodes from the renamed keys and encodes back to
|
|
2165
2229
|
* the renamed keys. Keys not present in the mapping are left unchanged.
|
|
@@ -2189,6 +2253,8 @@ export declare function encodeKeys<S extends Top & {
|
|
|
2189
2253
|
/**
|
|
2190
2254
|
* Adds derived fields to a struct schema during decoding.
|
|
2191
2255
|
*
|
|
2256
|
+
* **Details**
|
|
2257
|
+
*
|
|
2192
2258
|
* Each new field is derived from the decoded struct value via a function that
|
|
2193
2259
|
* returns `Option`. On encoding the derived fields are stripped. This allows
|
|
2194
2260
|
* computed or enriched fields to live in the decoded type without appearing in
|
|
@@ -2225,6 +2291,8 @@ derive: {
|
|
|
2225
2291
|
/**
|
|
2226
2292
|
* Namespace for `Record` type utilities.
|
|
2227
2293
|
*
|
|
2294
|
+
* **Details**
|
|
2295
|
+
*
|
|
2228
2296
|
* - `Record.Key` — constraint for the key schema (must encode to `PropertyKey`)
|
|
2229
2297
|
* - `Record.Type<K, V>` — decoded type of the record
|
|
2230
2298
|
* - `Record.Encoded<K, V>` — encoded type of the record
|
|
@@ -2236,6 +2304,7 @@ export declare namespace Record {
|
|
|
2236
2304
|
* Constraint for schemas that can be used as record keys.
|
|
2237
2305
|
*
|
|
2238
2306
|
* **Details**
|
|
2307
|
+
*
|
|
2239
2308
|
* The key schema must decode and encode property keys (`string`, `number`, or
|
|
2240
2309
|
* `symbol`) so it can describe object property names.
|
|
2241
2310
|
*
|
|
@@ -2251,6 +2320,7 @@ export declare namespace Record {
|
|
|
2251
2320
|
* schemas.
|
|
2252
2321
|
*
|
|
2253
2322
|
* **Details**
|
|
2323
|
+
*
|
|
2254
2324
|
* The key schema supplies the property keys and the value schema supplies each
|
|
2255
2325
|
* property's decoded `Type`. Optional and mutable value schemas affect the
|
|
2256
2326
|
* resulting property optionality and writability.
|
|
@@ -2300,6 +2370,7 @@ export declare namespace Record {
|
|
|
2300
2370
|
* schemas' encoded types.
|
|
2301
2371
|
*
|
|
2302
2372
|
* **Details**
|
|
2373
|
+
*
|
|
2303
2374
|
* Encoded-side optionality and mutability on the value schema determine whether
|
|
2304
2375
|
* the encoded record properties are optional or writable.
|
|
2305
2376
|
*
|
|
@@ -2341,6 +2412,7 @@ export declare namespace Record {
|
|
|
2341
2412
|
* Computes the input object type accepted when constructing a record value.
|
|
2342
2413
|
*
|
|
2343
2414
|
* **Details**
|
|
2415
|
+
*
|
|
2344
2416
|
* Keys use the key schema's `~type.make` type and values use the value schema's
|
|
2345
2417
|
* `~type.make` type. Value optionality and mutability determine whether
|
|
2346
2418
|
* properties are optional or writable.
|
|
@@ -2405,6 +2477,8 @@ export declare function Record<Key extends Record.Key, Value extends Top>(key: K
|
|
|
2405
2477
|
/**
|
|
2406
2478
|
* Namespace for `StructWithRest` type utilities.
|
|
2407
2479
|
*
|
|
2480
|
+
* **Details**
|
|
2481
|
+
*
|
|
2408
2482
|
* - `StructWithRest.Type<S, R>` — decoded type (struct type intersected with record types)
|
|
2409
2483
|
* - `StructWithRest.Encoded<S, R>` — encoded type
|
|
2410
2484
|
*
|
|
@@ -2528,6 +2602,8 @@ export declare function StructWithRest<const S extends StructWithRest.Objects, c
|
|
|
2528
2602
|
/**
|
|
2529
2603
|
* Namespace for `Tuple` type utilities.
|
|
2530
2604
|
*
|
|
2605
|
+
* **Details**
|
|
2606
|
+
*
|
|
2531
2607
|
* - `Tuple.Elements` — constraint for the element schema array
|
|
2532
2608
|
* - `Tuple.Type<E>` — decoded tuple type
|
|
2533
2609
|
* - `Tuple.Encoded<E>` — encoded tuple type
|
|
@@ -2553,6 +2629,7 @@ export declare namespace Tuple {
|
|
|
2553
2629
|
* Computes the decoded tuple type for a tuple element schema array.
|
|
2554
2630
|
*
|
|
2555
2631
|
* **Details**
|
|
2632
|
+
*
|
|
2556
2633
|
* Each element contributes its decoded `Type`; optional element schemas produce
|
|
2557
2634
|
* optional tuple positions.
|
|
2558
2635
|
*
|
|
@@ -2582,6 +2659,7 @@ export declare namespace Tuple {
|
|
|
2582
2659
|
* Computes the encoded tuple type for a tuple element schema array.
|
|
2583
2660
|
*
|
|
2584
2661
|
* **Details**
|
|
2662
|
+
*
|
|
2585
2663
|
* Each element contributes its `Encoded` type; encoded-side optional element
|
|
2586
2664
|
* schemas produce optional tuple positions.
|
|
2587
2665
|
*
|
|
@@ -2616,6 +2694,7 @@ export declare namespace Tuple {
|
|
|
2616
2694
|
* Computes the input tuple type accepted when constructing a tuple value.
|
|
2617
2695
|
*
|
|
2618
2696
|
* **Details**
|
|
2697
|
+
*
|
|
2619
2698
|
* Each element uses its `~type.make` input type. Optional elements and elements
|
|
2620
2699
|
* with constructor defaults produce optional tuple positions.
|
|
2621
2700
|
*
|
|
@@ -2635,7 +2714,9 @@ export interface Tuple<Elements extends Tuple.Elements> extends Bottom<Tuple.Typ
|
|
|
2635
2714
|
/**
|
|
2636
2715
|
* Returns a new tuple with the elements modified by the provided function.
|
|
2637
2716
|
*
|
|
2638
|
-
* **
|
|
2717
|
+
* **Details**
|
|
2718
|
+
*
|
|
2719
|
+
* Options:
|
|
2639
2720
|
*
|
|
2640
2721
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
2641
2722
|
* that were attached to the original union. Defaults to `false`.
|
|
@@ -2672,6 +2753,8 @@ export declare function Tuple<const Elements extends ReadonlyArray<Top>>(element
|
|
|
2672
2753
|
/**
|
|
2673
2754
|
* Namespace for `TupleWithRest` type utilities.
|
|
2674
2755
|
*
|
|
2756
|
+
* **Details**
|
|
2757
|
+
*
|
|
2675
2758
|
* - `TupleWithRest.TupleType` — constraint for the leading tuple schema
|
|
2676
2759
|
* - `TupleWithRest.Rest` — the rest element schema(s)
|
|
2677
2760
|
* - `TupleWithRest.Type<T, R>` — decoded type (fixed elements + rest)
|
|
@@ -2698,6 +2781,7 @@ export declare namespace TupleWithRest {
|
|
|
2698
2781
|
* Non-empty list of schemas used for the rest portion of a `TupleWithRest`.
|
|
2699
2782
|
*
|
|
2700
2783
|
* **Details**
|
|
2784
|
+
*
|
|
2701
2785
|
* The first schema describes the repeated rest element. Additional schemas, when
|
|
2702
2786
|
* present, describe trailing tuple elements after the repeated rest segment.
|
|
2703
2787
|
*
|
|
@@ -2709,6 +2793,7 @@ export declare namespace TupleWithRest {
|
|
|
2709
2793
|
* Computes the decoded tuple type for a `TupleWithRest`.
|
|
2710
2794
|
*
|
|
2711
2795
|
* **Details**
|
|
2796
|
+
*
|
|
2712
2797
|
* The output starts with the fixed tuple elements, continues with zero or more
|
|
2713
2798
|
* values decoded by the first rest schema, and includes any trailing rest schemas
|
|
2714
2799
|
* as fixed tuple positions.
|
|
@@ -2727,6 +2812,7 @@ export declare namespace TupleWithRest {
|
|
|
2727
2812
|
* Computes the iso tuple type for a `TupleWithRest`.
|
|
2728
2813
|
*
|
|
2729
2814
|
* **Details**
|
|
2815
|
+
*
|
|
2730
2816
|
* The output starts with the fixed tuple's `Iso` elements, continues with zero
|
|
2731
2817
|
* or more values using the first rest schema's `Iso`, and includes any trailing
|
|
2732
2818
|
* rest schemas as fixed tuple positions.
|
|
@@ -2745,6 +2831,7 @@ export declare namespace TupleWithRest {
|
|
|
2745
2831
|
* Computes the encoded tuple type for `TupleWithRest`.
|
|
2746
2832
|
*
|
|
2747
2833
|
* **Details**
|
|
2834
|
+
*
|
|
2748
2835
|
* The leading tuple's encoded elements are kept first. The encoded type of the
|
|
2749
2836
|
* first rest schema may repeat zero or more times, and the encoded types of any
|
|
2750
2837
|
* additional rest schemas become required trailing tuple elements.
|
|
@@ -2763,6 +2850,7 @@ export declare namespace TupleWithRest {
|
|
|
2763
2850
|
* Computes the constructor input tuple type for `TupleWithRest`.
|
|
2764
2851
|
*
|
|
2765
2852
|
* **Details**
|
|
2853
|
+
*
|
|
2766
2854
|
* The leading tuple's make input elements are kept first. The make input type of
|
|
2767
2855
|
* the first rest schema may repeat zero or more times, and the make input types
|
|
2768
2856
|
* of any additional rest schemas become required trailing tuple elements.
|
|
@@ -2793,6 +2881,7 @@ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends T
|
|
|
2793
2881
|
* Extends a fixed-length tuple schema with a variadic rest segment.
|
|
2794
2882
|
*
|
|
2795
2883
|
* **Details**
|
|
2884
|
+
*
|
|
2796
2885
|
* The resulting tuple starts with the fixed elements from `schema`. The first
|
|
2797
2886
|
* schema in `rest` is the repeatable element schema, and any additional schemas
|
|
2798
2887
|
* in `rest` are required trailing tuple elements after the variadic segment. For
|
|
@@ -2823,6 +2912,7 @@ export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Res
|
|
|
2823
2912
|
* Schema interface produced by `Schema.Array` for readonly arrays.
|
|
2824
2913
|
*
|
|
2825
2914
|
* **Details**
|
|
2915
|
+
*
|
|
2826
2916
|
* The decoded type is `ReadonlyArray<S["Type"]>`, the encoded type is
|
|
2827
2917
|
* `ReadonlyArray<S["Encoded"]>`, and the element schema is available as
|
|
2828
2918
|
* `schema`.
|
|
@@ -2899,6 +2989,7 @@ export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
|
2899
2989
|
* an array of items into a readonly array.
|
|
2900
2990
|
*
|
|
2901
2991
|
* **Details**
|
|
2992
|
+
*
|
|
2902
2993
|
* The schema decodes from `S` or `Schema.Array(S)` and produces
|
|
2903
2994
|
* `ReadonlyArray<S["Type"]>`.
|
|
2904
2995
|
*
|
|
@@ -2913,6 +3004,7 @@ export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>,
|
|
|
2913
3004
|
* decoded by `Schema.Array(schema)`, then returns an array.
|
|
2914
3005
|
*
|
|
2915
3006
|
* **Details**
|
|
3007
|
+
*
|
|
2916
3008
|
* The single-value branch is tried before the array branch. If `schema` itself
|
|
2917
3009
|
* accepts arrays, an array input can be treated as one value and wrapped in a
|
|
2918
3010
|
* one-element array.
|
|
@@ -2936,6 +3028,8 @@ export interface UniqueArray<S extends Top> extends $Array<S> {
|
|
|
2936
3028
|
/**
|
|
2937
3029
|
* Returns a new array schema that ensures all elements are unique.
|
|
2938
3030
|
*
|
|
3031
|
+
* **Details**
|
|
3032
|
+
*
|
|
2939
3033
|
* The equivalence used to determine uniqueness is the one provided by
|
|
2940
3034
|
* `Schema.toEquivalence(item)`.
|
|
2941
3035
|
*
|
|
@@ -3006,7 +3100,9 @@ export interface Union<Members extends ReadonlyArray<Top>> extends Bottom<{
|
|
|
3006
3100
|
/**
|
|
3007
3101
|
* Returns a new union with the members modified by the provided function.
|
|
3008
3102
|
*
|
|
3009
|
-
* **
|
|
3103
|
+
* **Details**
|
|
3104
|
+
*
|
|
3105
|
+
* Options:
|
|
3010
3106
|
*
|
|
3011
3107
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
3012
3108
|
* that were attached to the original union. Defaults to `false`.
|
|
@@ -3025,6 +3121,8 @@ export interface Union<Members extends ReadonlyArray<Top>> extends Bottom<{
|
|
|
3025
3121
|
* Creates a union schema from an array of member schemas. Members are tested in
|
|
3026
3122
|
* order; the first match is returned.
|
|
3027
3123
|
*
|
|
3124
|
+
* **Details**
|
|
3125
|
+
*
|
|
3028
3126
|
* Optionally, specify `mode`:
|
|
3029
3127
|
* - `"anyOf"` (default) — matches if any member matches.
|
|
3030
3128
|
* - `"oneOf"` — matches if exactly one member matches.
|
|
@@ -3128,6 +3226,7 @@ interface UndefinedOrLambda extends Lambda {
|
|
|
3128
3226
|
export declare const UndefinedOr: UndefinedOrLambda;
|
|
3129
3227
|
/**
|
|
3130
3228
|
* Companion type for `S | null | undefined`. Produced by {@link NullishOr}.
|
|
3229
|
+
*
|
|
3131
3230
|
* @category models
|
|
3132
3231
|
* @since 3.10.0
|
|
3133
3232
|
*/
|
|
@@ -3140,12 +3239,14 @@ interface NullishOrLambda extends Lambda {
|
|
|
3140
3239
|
}
|
|
3141
3240
|
/**
|
|
3142
3241
|
* Creates a union schema of `S | null | undefined`.
|
|
3242
|
+
*
|
|
3143
3243
|
* @category constructors
|
|
3144
3244
|
* @since 3.10.0
|
|
3145
3245
|
*/
|
|
3146
3246
|
export declare const NullishOr: NullishOrLambda;
|
|
3147
3247
|
/**
|
|
3148
3248
|
* Schema type wrapping a lazily-evaluated schema. Produced by {@link suspend}.
|
|
3249
|
+
*
|
|
3149
3250
|
* @category models
|
|
3150
3251
|
* @since 3.10.0
|
|
3151
3252
|
*/
|
|
@@ -3208,6 +3309,8 @@ export interface refine<T extends S["Type"], S extends Top> extends Bottom<T, S[
|
|
|
3208
3309
|
* Narrows the TypeScript type of a schema's output via a type guard predicate,
|
|
3209
3310
|
* attaching the guard as a runtime filter check.
|
|
3210
3311
|
*
|
|
3312
|
+
* **Details**
|
|
3313
|
+
*
|
|
3211
3314
|
* The `annotations` parameter annotates the filter created by the refinement.
|
|
3212
3315
|
* With the default formatter, failed refinements use `message` first,
|
|
3213
3316
|
* `expected` second, and `<filter>` when neither is provided. `identifier`
|
|
@@ -3251,6 +3354,8 @@ export declare function fromBrand<A extends Brand.Brand<any>>(identifier: string
|
|
|
3251
3354
|
/**
|
|
3252
3355
|
* A schema that wraps another schema and intercepts its decoding pipeline.
|
|
3253
3356
|
*
|
|
3357
|
+
* **Details**
|
|
3358
|
+
*
|
|
3254
3359
|
* The interceptor receives the full decoding `Effect` and may replace, modify,
|
|
3255
3360
|
* or augment it — including adding service requirements via `RD`.
|
|
3256
3361
|
*
|
|
@@ -3264,6 +3369,8 @@ export interface middlewareDecoding<S extends Top, RD> extends Bottom<S["Type"],
|
|
|
3264
3369
|
/**
|
|
3265
3370
|
* Intercepts the decoding pipeline of a schema.
|
|
3266
3371
|
*
|
|
3372
|
+
* **Details**
|
|
3373
|
+
*
|
|
3267
3374
|
* The provided function receives the current decoding `Effect` and `ParseOptions`,
|
|
3268
3375
|
* and returns a new `Effect` — potentially adding service requirements (`RD`),
|
|
3269
3376
|
* recovering from errors, or augmenting the result.
|
|
@@ -3288,6 +3395,8 @@ export declare function middlewareDecoding<S extends Top, RD>(decode: (effect: E
|
|
|
3288
3395
|
/**
|
|
3289
3396
|
* A schema that wraps another schema and intercepts its encoding pipeline.
|
|
3290
3397
|
*
|
|
3398
|
+
* **Details**
|
|
3399
|
+
*
|
|
3291
3400
|
* The interceptor receives the full encoding `Effect` and may replace, modify,
|
|
3292
3401
|
* or augment it — including adding service requirements via `RE`.
|
|
3293
3402
|
*
|
|
@@ -3301,6 +3410,8 @@ export interface middlewareEncoding<S extends Top, RE> extends Bottom<S["Type"],
|
|
|
3301
3410
|
/**
|
|
3302
3411
|
* Intercepts the encoding pipeline of a schema.
|
|
3303
3412
|
*
|
|
3413
|
+
* **Details**
|
|
3414
|
+
*
|
|
3304
3415
|
* The provided function receives the current encoding `Effect` and `ParseOptions`,
|
|
3305
3416
|
* and returns a new `Effect` — potentially adding service requirements (`RE`),
|
|
3306
3417
|
* recovering from errors, or augmenting the result.
|
|
@@ -3325,6 +3436,8 @@ export declare function middlewareEncoding<S extends Top, RE>(encode: (effect: E
|
|
|
3325
3436
|
/**
|
|
3326
3437
|
* Recovers from a decoding error by providing a fallback value.
|
|
3327
3438
|
*
|
|
3439
|
+
* **Details**
|
|
3440
|
+
*
|
|
3328
3441
|
* The handler receives the `Issue` and returns an `Effect` that either
|
|
3329
3442
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
3330
3443
|
*
|
|
@@ -3353,6 +3466,8 @@ export declare function catchDecodingWithContext<S extends Top, R = never>(f: (i
|
|
|
3353
3466
|
/**
|
|
3354
3467
|
* Recovers from an encoding error by providing a fallback value.
|
|
3355
3468
|
*
|
|
3469
|
+
* **Details**
|
|
3470
|
+
*
|
|
3356
3471
|
* The handler receives the `Issue` and returns an `Effect` that either
|
|
3357
3472
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
3358
3473
|
*
|
|
@@ -3373,6 +3488,7 @@ export declare function catchEncodingWithContext<S extends Top, R = never>(f: (i
|
|
|
3373
3488
|
* `From` schema with a `To` schema.
|
|
3374
3489
|
*
|
|
3375
3490
|
* **Details**
|
|
3491
|
+
*
|
|
3376
3492
|
* `Type` is `To["Type"]` and `Encoded` is `From["Encoded"]`. Decoding services
|
|
3377
3493
|
* are `To["DecodingServices"] | From["DecodingServices"] | RD`; encoding
|
|
3378
3494
|
* services are `To["EncodingServices"] | From["EncodingServices"] | RE`.
|
|
@@ -3388,6 +3504,8 @@ export interface decodeTo<To extends Top, From extends Top, RD = never, RE = nev
|
|
|
3388
3504
|
/**
|
|
3389
3505
|
* The type produced by {@link decodeTo} when called without a custom transformation (passthrough composition).
|
|
3390
3506
|
*
|
|
3507
|
+
* **Details**
|
|
3508
|
+
*
|
|
3391
3509
|
* Equivalent to {@link decodeTo} with `RD = never` and `RE = never`, meaning the schemas
|
|
3392
3510
|
* are composed using their natural encoding/decoding chain.
|
|
3393
3511
|
*
|
|
@@ -3400,18 +3518,20 @@ export interface compose<To extends Top, From extends Top> extends decodeTo<To,
|
|
|
3400
3518
|
/**
|
|
3401
3519
|
* Creates a schema that transforms from a source schema to a target schema.
|
|
3402
3520
|
*
|
|
3521
|
+
* **Details**
|
|
3522
|
+
*
|
|
3403
3523
|
* This is a curried function: call it with the target schema `to` (and optionally a transformation),
|
|
3404
3524
|
* then call the returned function with the source schema `from`. The resulting schema decodes from
|
|
3405
3525
|
* `From["Encoded"]` to `To["Type"]` and encodes from `To["Type"]` back to `From["Encoded"]`.
|
|
3406
3526
|
*
|
|
3407
|
-
*
|
|
3527
|
+
* Key guarantees:
|
|
3408
3528
|
* - Resulting schema has `Type = To["Type"]` and `Encoded = From["Encoded"]`
|
|
3409
3529
|
* - When `transformation` is omitted, uses `Transformation.passthrough()` (schema composition)
|
|
3410
3530
|
* - Combines decoding/encoding services from both `from` and `to` schemas
|
|
3411
3531
|
* - Transformation `decode` maps `From["Type"]` → `To["Encoded"]` (used during encoding)
|
|
3412
3532
|
* - Transformation `encode` maps `To["Encoded"]` → `From["Type"]` (used during decoding)
|
|
3413
3533
|
*
|
|
3414
|
-
*
|
|
3534
|
+
* Common mistakes:
|
|
3415
3535
|
* - **Direction confusion**: Remember `to` is the target (what you decode TO), `from` is the source (what you decode FROM)
|
|
3416
3536
|
* - **Currying**: This is curried - must use pipe: `from.pipe(Schema.decodeTo(to))`
|
|
3417
3537
|
* - **Transformation direction**: `decode` goes `From["Type"]` → `To["Encoded"]`, `encode` goes `To["Encoded"]` → `From["Type"]`
|
|
@@ -3448,18 +3568,20 @@ export declare function decodeTo<To extends Top, From extends Top, RD = never, R
|
|
|
3448
3568
|
/**
|
|
3449
3569
|
* Applies a transformation to a schema, creating a new schema with the same type but transformed encoding/decoding.
|
|
3450
3570
|
*
|
|
3571
|
+
* **Details**
|
|
3572
|
+
*
|
|
3451
3573
|
* This is a curried function: call it with a transformation object, then call the returned function with a schema.
|
|
3452
3574
|
* The resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`, with the transformation applied during
|
|
3453
3575
|
* encoding and decoding operations.
|
|
3454
3576
|
*
|
|
3455
|
-
*
|
|
3577
|
+
* Key guarantees:
|
|
3456
3578
|
* - Resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`
|
|
3457
3579
|
* - Uses `toType(self)` as the target schema internally (creates a schema where both Type and Encoded are `S["Type"]`)
|
|
3458
3580
|
* - Combines decoding/encoding services from the source schema and transformation
|
|
3459
3581
|
* - Transformation `decode` maps `S["Type"]` → `S["Type"]` (used during encoding)
|
|
3460
3582
|
* - Transformation `encode` maps `S["Type"]` → `S["Type"]` (used during decoding)
|
|
3461
3583
|
*
|
|
3462
|
-
*
|
|
3584
|
+
* Common mistakes:
|
|
3463
3585
|
* - **Currying**: This is curried - must use pipe: `schema.pipe(Schema.decode(transformation))`
|
|
3464
3586
|
* - **Transformation direction**: `decode` and `encode` both operate on `S["Type"]` (same type, different values)
|
|
3465
3587
|
* - **Service dependencies**: Resulting schema requires services from the source schema and transformation; use `Schema.provideService` if needed
|
|
@@ -3491,6 +3613,8 @@ export declare function decode<S extends Top, RD = never, RE = never>(transforma
|
|
|
3491
3613
|
* Like {@link decodeTo} but reverses the direction: the `from` schema acts as the target (decoded type)
|
|
3492
3614
|
* and `to` acts as the encoded source.
|
|
3493
3615
|
*
|
|
3616
|
+
* **Details**
|
|
3617
|
+
*
|
|
3494
3618
|
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))` — useful when it reads more
|
|
3495
3619
|
* naturally to specify the encoded schema first.
|
|
3496
3620
|
*
|
|
@@ -3519,6 +3643,8 @@ export declare function encodeTo<To extends Top, From extends Top, RD = never, R
|
|
|
3519
3643
|
* Applies a transformation to a schema's encoded type, creating a new schema where encoding/decoding
|
|
3520
3644
|
* operate on `S["Encoded"]` rather than `S["Type"]`.
|
|
3521
3645
|
*
|
|
3646
|
+
* **Details**
|
|
3647
|
+
*
|
|
3522
3648
|
* The `decode` getter maps `S["Encoded"]` → `S["Encoded"]` (applied during decoding),
|
|
3523
3649
|
* and the `encode` getter maps `S["Encoded"]` → `S["Encoded"]` (applied during encoding).
|
|
3524
3650
|
*
|
|
@@ -3545,6 +3671,8 @@ export declare function encode<S extends Top, RD = never, RE = never>(transforma
|
|
|
3545
3671
|
/**
|
|
3546
3672
|
* Constraint used to ensure a schema field does not already have a constructor default.
|
|
3547
3673
|
*
|
|
3674
|
+
* **Details**
|
|
3675
|
+
*
|
|
3548
3676
|
* Only schemas that satisfy this constraint can be passed to {@link withConstructorDefault}.
|
|
3549
3677
|
*
|
|
3550
3678
|
* @category models
|
|
@@ -3558,6 +3686,7 @@ export interface WithoutConstructorDefault {
|
|
|
3558
3686
|
* by constructor helpers.
|
|
3559
3687
|
*
|
|
3560
3688
|
* **Details**
|
|
3689
|
+
*
|
|
3561
3690
|
* The default affects `make` and related constructor helpers only; decoding and
|
|
3562
3691
|
* encoding still use the original schema behavior. The schema is marked as
|
|
3563
3692
|
* already having a constructor default so another constructor default cannot be
|
|
@@ -3573,6 +3702,8 @@ export interface withConstructorDefault<S extends Top & WithoutConstructorDefaul
|
|
|
3573
3702
|
/**
|
|
3574
3703
|
* Attaches a constructor default value to a schema field.
|
|
3575
3704
|
*
|
|
3705
|
+
* **Details**
|
|
3706
|
+
*
|
|
3576
3707
|
* Constructor defaults are applied only during `make*`, not during decoding or
|
|
3577
3708
|
* encoding.
|
|
3578
3709
|
*
|
|
@@ -3610,6 +3741,8 @@ export interface withDecodingDefaultKey<S extends Top, R = never> extends decode
|
|
|
3610
3741
|
/**
|
|
3611
3742
|
* Options for {@link withDecodingDefaultKey} and {@link withDecodingDefault}.
|
|
3612
3743
|
*
|
|
3744
|
+
* **Details**
|
|
3745
|
+
*
|
|
3613
3746
|
* - `encodingStrategy`:
|
|
3614
3747
|
* - `"passthrough"` (default): pass the value through during encoding
|
|
3615
3748
|
* - `"omit"`: omit the key from the encoded output
|
|
@@ -3624,11 +3757,13 @@ export type DecodingDefaultOptions = {
|
|
|
3624
3757
|
* Makes a struct key optional on the `Encoded` side and provides a default
|
|
3625
3758
|
* `Encoded` value when the key is missing during decoding.
|
|
3626
3759
|
*
|
|
3760
|
+
* **Details**
|
|
3761
|
+
*
|
|
3627
3762
|
* The key uses `optionalKey` on the encoded side, so it may be absent from the
|
|
3628
3763
|
* input object but **not** `undefined`. The default value is specified in terms
|
|
3629
3764
|
* of the `Encoded` type (before any decoding transformations).
|
|
3630
3765
|
*
|
|
3631
|
-
*
|
|
3766
|
+
* Options:
|
|
3632
3767
|
*
|
|
3633
3768
|
* - `encodingStrategy`:
|
|
3634
3769
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -3670,11 +3805,13 @@ export interface withDecodingDefaultTypeKey<S extends Top, R = never> extends de
|
|
|
3670
3805
|
* key may be absent but **not** `undefined`) and provides a default `Type`
|
|
3671
3806
|
* value when the key is missing during decoding.
|
|
3672
3807
|
*
|
|
3808
|
+
* **Details**
|
|
3809
|
+
*
|
|
3673
3810
|
* Unlike {@link withDecodingDefaultKey}, the default value is specified in
|
|
3674
3811
|
* terms of the `Type` (decoded) representation, so it does not need to go
|
|
3675
3812
|
* through the decoding transformation.
|
|
3676
3813
|
*
|
|
3677
|
-
*
|
|
3814
|
+
* Options:
|
|
3678
3815
|
*
|
|
3679
3816
|
* - `encodingStrategy`:
|
|
3680
3817
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -3702,10 +3839,12 @@ export interface withDecodingDefault<S extends Top, R = never> extends decodeTo<
|
|
|
3702
3839
|
* and provides a default `Encoded` value when the field is missing or
|
|
3703
3840
|
* `undefined` during decoding.
|
|
3704
3841
|
*
|
|
3842
|
+
* **Details**
|
|
3843
|
+
*
|
|
3705
3844
|
* The default value is specified in terms of the `Encoded` type (before any
|
|
3706
3845
|
* decoding transformations).
|
|
3707
3846
|
*
|
|
3708
|
-
*
|
|
3847
|
+
* Options:
|
|
3709
3848
|
*
|
|
3710
3849
|
* - `encodingStrategy`:
|
|
3711
3850
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -3747,11 +3886,13 @@ export interface withDecodingDefaultType<S extends Top, R = never> extends decod
|
|
|
3747
3886
|
* and provides a default `Type` value when the field is missing or
|
|
3748
3887
|
* `undefined` during decoding.
|
|
3749
3888
|
*
|
|
3889
|
+
* **Details**
|
|
3890
|
+
*
|
|
3750
3891
|
* Unlike {@link withDecodingDefault}, the default value is specified in terms
|
|
3751
3892
|
* of the `Type` (decoded) representation, so it does not need to go through
|
|
3752
3893
|
* the decoding transformation.
|
|
3753
3894
|
*
|
|
3754
|
-
*
|
|
3895
|
+
* Options:
|
|
3755
3896
|
*
|
|
3756
3897
|
* - `encodingStrategy`:
|
|
3757
3898
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -3766,6 +3907,8 @@ export declare function withDecodingDefaultType<S extends Top, R = never>(defaul
|
|
|
3766
3907
|
/**
|
|
3767
3908
|
* The type produced by {@link tag} — a literal schema with a constructor default.
|
|
3768
3909
|
*
|
|
3910
|
+
* **Details**
|
|
3911
|
+
*
|
|
3769
3912
|
* Used as the type of the `_tag` field in {@link TaggedStruct} and related helpers.
|
|
3770
3913
|
*
|
|
3771
3914
|
* @see {@link tag} for the constructor
|
|
@@ -3837,6 +3980,8 @@ export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fie
|
|
|
3837
3980
|
* to identify the specific variant of the object, which is especially useful
|
|
3838
3981
|
* when working with union types.
|
|
3839
3982
|
*
|
|
3983
|
+
* **Details**
|
|
3984
|
+
*
|
|
3840
3985
|
* When using the `make` method, the `_tag` field is optional and will be
|
|
3841
3986
|
* added automatically. However, when decoding or encoding, the `_tag` field
|
|
3842
3987
|
* must be present in the input.
|
|
@@ -4090,6 +4235,7 @@ export declare function link<T>(): <To extends Top>(encodeTo: To, transformation
|
|
|
4090
4235
|
* Creates a custom validation filter from a predicate function.
|
|
4091
4236
|
*
|
|
4092
4237
|
* **Details**
|
|
4238
|
+
*
|
|
4093
4239
|
* The predicate receives the decoded input value, the schema AST, and parse
|
|
4094
4240
|
* options, and returns a `FilterOutput`. Non-success outputs are normalized into
|
|
4095
4241
|
* schema issues. The `annotations` parameter annotates the filter itself; with
|
|
@@ -4148,6 +4294,8 @@ export declare const makeFilter: <T>(filter: (input: T, ast: AST.AST, options: A
|
|
|
4148
4294
|
* A single failure reported by a filter predicate. Used as the element type
|
|
4149
4295
|
* of the array arm of {@link FilterOutput}, and also accepted on its own.
|
|
4150
4296
|
*
|
|
4297
|
+
* **Details**
|
|
4298
|
+
*
|
|
4151
4299
|
* - `string`: failure with that string as the message. Produces an
|
|
4152
4300
|
* {@link Issue.InvalidValue} wrapping the input, with the string used as
|
|
4153
4301
|
* the issue's `message` annotation.
|
|
@@ -4167,6 +4315,8 @@ export type FilterIssue = string | Issue.Issue | {
|
|
|
4167
4315
|
/**
|
|
4168
4316
|
* The value a filter predicate (see {@link makeFilter}) may return.
|
|
4169
4317
|
*
|
|
4318
|
+
* **Details**
|
|
4319
|
+
*
|
|
4170
4320
|
* Each shape is normalized into an {@link Issue.Issue} (or `undefined` for
|
|
4171
4321
|
* success) before being attached to the parse result:
|
|
4172
4322
|
*
|
|
@@ -4197,12 +4347,14 @@ export declare function makeFilterGroup<T>(checks: readonly [AST.Check<T>, ...Ar
|
|
|
4197
4347
|
/**
|
|
4198
4348
|
* Validates that a string has no leading or trailing whitespace.
|
|
4199
4349
|
*
|
|
4200
|
-
* **
|
|
4350
|
+
* **Details**
|
|
4351
|
+
*
|
|
4352
|
+
* JSON Schema:
|
|
4201
4353
|
*
|
|
4202
4354
|
* This check corresponds to a `pattern` constraint in JSON Schema that
|
|
4203
4355
|
* matches strings without leading or trailing whitespace.
|
|
4204
4356
|
*
|
|
4205
|
-
*
|
|
4357
|
+
* Arbitrary:
|
|
4206
4358
|
*
|
|
4207
4359
|
* When generating test data with fast-check, this applies a `patterns`
|
|
4208
4360
|
* constraint to ensure generated strings match the trimmed pattern.
|
|
@@ -4214,11 +4366,13 @@ export declare function isTrimmed(annotations?: Annotations.Filter): AST.Filter<
|
|
|
4214
4366
|
/**
|
|
4215
4367
|
* Validates that a string matches the specified regular expression pattern.
|
|
4216
4368
|
*
|
|
4217
|
-
* **
|
|
4369
|
+
* **Details**
|
|
4370
|
+
*
|
|
4371
|
+
* JSON Schema:
|
|
4218
4372
|
*
|
|
4219
4373
|
* This check corresponds to the `pattern` constraint in JSON Schema.
|
|
4220
4374
|
*
|
|
4221
|
-
*
|
|
4375
|
+
* Arbitrary:
|
|
4222
4376
|
*
|
|
4223
4377
|
* When generating test data with fast-check, this applies a `patterns`
|
|
4224
4378
|
* constraint to ensure generated strings match the specified RegExp pattern.
|
|
@@ -4230,12 +4384,14 @@ export declare const isPattern: (regExp: globalThis.RegExp, annotations?: Annota
|
|
|
4230
4384
|
/**
|
|
4231
4385
|
* Validates that a string represents a finite number.
|
|
4232
4386
|
*
|
|
4233
|
-
* **
|
|
4387
|
+
* **Details**
|
|
4388
|
+
*
|
|
4389
|
+
* JSON Schema:
|
|
4234
4390
|
*
|
|
4235
4391
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
4236
4392
|
* strings representing finite numbers.
|
|
4237
4393
|
*
|
|
4238
|
-
*
|
|
4394
|
+
* Arbitrary:
|
|
4239
4395
|
*
|
|
4240
4396
|
* When generating test data with fast-check, this applies a `patterns`
|
|
4241
4397
|
* constraint to ensure generated strings match the number string pattern.
|
|
@@ -4249,11 +4405,12 @@ export declare const isStringFinite: (annotations?: Annotations.Filter) => AST.F
|
|
|
4249
4405
|
* BigInt string encoding.
|
|
4250
4406
|
*
|
|
4251
4407
|
* **Details**
|
|
4408
|
+
*
|
|
4252
4409
|
* The check uses the pattern `^-?\d+$`. It does not accept leading `+`, decimal
|
|
4253
4410
|
* points, exponent notation, separators, or non-decimal inputs such as
|
|
4254
4411
|
* hexadecimal strings.
|
|
4255
4412
|
*
|
|
4256
|
-
*
|
|
4413
|
+
* JSON Schema:
|
|
4257
4414
|
* This check corresponds to a `pattern` constraint with the same signed
|
|
4258
4415
|
* base-10 integer pattern.
|
|
4259
4416
|
*
|
|
@@ -4266,6 +4423,7 @@ export declare const isStringBigInt: (annotations?: Annotations.Filter) => AST.F
|
|
|
4266
4423
|
* symbol string encoding.
|
|
4267
4424
|
*
|
|
4268
4425
|
* **Details**
|
|
4426
|
+
*
|
|
4269
4427
|
* The check uses the pattern `^Symbol\((.*)\)$`. It is not a general test for
|
|
4270
4428
|
* whether a string can be passed to JavaScript's `Symbol()` function.
|
|
4271
4429
|
*
|
|
@@ -4278,12 +4436,14 @@ export declare const isStringSymbol: (annotations?: Annotations.Filter) => AST.F
|
|
|
4278
4436
|
* Optionally specify a version (1-8) to validate against a specific UUID version.
|
|
4279
4437
|
* If no version is specified (`undefined`), all versions are supported.
|
|
4280
4438
|
*
|
|
4281
|
-
* **
|
|
4439
|
+
* **Details**
|
|
4440
|
+
*
|
|
4441
|
+
* JSON Schema:
|
|
4282
4442
|
*
|
|
4283
4443
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
4284
4444
|
* UUID format, and includes a `format: "uuid"` annotation.
|
|
4285
4445
|
*
|
|
4286
|
-
*
|
|
4446
|
+
* Arbitrary:
|
|
4287
4447
|
*
|
|
4288
4448
|
* When generating test data with fast-check, this applies a `patterns`
|
|
4289
4449
|
* constraint to ensure generated strings match the UUID pattern.
|
|
@@ -4296,12 +4456,14 @@ export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotati
|
|
|
4296
4456
|
* Validates that a string is a valid ULID (Universally Unique Lexicographically
|
|
4297
4457
|
* Sortable Identifier).
|
|
4298
4458
|
*
|
|
4299
|
-
* **
|
|
4459
|
+
* **Details**
|
|
4460
|
+
*
|
|
4461
|
+
* JSON Schema:
|
|
4300
4462
|
*
|
|
4301
4463
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
4302
4464
|
* the ULID format.
|
|
4303
4465
|
*
|
|
4304
|
-
*
|
|
4466
|
+
* Arbitrary:
|
|
4305
4467
|
*
|
|
4306
4468
|
* When generating test data with fast-check, this applies a `patterns`
|
|
4307
4469
|
* constraint to ensure generated strings match the ULID pattern.
|
|
@@ -4313,12 +4475,14 @@ export declare function isULID(annotations?: Annotations.Filter): AST.Filter<str
|
|
|
4313
4475
|
/**
|
|
4314
4476
|
* Validates that a string is valid Base64 encoded data.
|
|
4315
4477
|
*
|
|
4316
|
-
* **
|
|
4478
|
+
* **Details**
|
|
4479
|
+
*
|
|
4480
|
+
* JSON Schema:
|
|
4317
4481
|
*
|
|
4318
4482
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
4319
4483
|
* Base64 format.
|
|
4320
4484
|
*
|
|
4321
|
-
*
|
|
4485
|
+
* Arbitrary:
|
|
4322
4486
|
*
|
|
4323
4487
|
* When generating test data with fast-check, this applies a `patterns`
|
|
4324
4488
|
* constraint to ensure generated strings match the Base64 pattern.
|
|
@@ -4331,12 +4495,14 @@ export declare function isBase64(annotations?: Annotations.Filter): AST.Filter<s
|
|
|
4331
4495
|
* Validates that a string is valid Base64URL encoded data (Base64 with URL-safe
|
|
4332
4496
|
* characters).
|
|
4333
4497
|
*
|
|
4334
|
-
* **
|
|
4498
|
+
* **Details**
|
|
4499
|
+
*
|
|
4500
|
+
* JSON Schema:
|
|
4335
4501
|
*
|
|
4336
4502
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
4337
4503
|
* Base64URL format.
|
|
4338
4504
|
*
|
|
4339
|
-
*
|
|
4505
|
+
* Arbitrary:
|
|
4340
4506
|
*
|
|
4341
4507
|
* When generating test data with fast-check, this applies a `patterns`
|
|
4342
4508
|
* constraint to ensure generated strings match the Base64URL pattern.
|
|
@@ -4348,7 +4514,9 @@ export declare function isBase64Url(annotations?: Annotations.Filter): AST.Filte
|
|
|
4348
4514
|
/**
|
|
4349
4515
|
* Validates at runtime that a string starts with the specified literal prefix.
|
|
4350
4516
|
*
|
|
4351
|
-
* **
|
|
4517
|
+
* **Details**
|
|
4518
|
+
*
|
|
4519
|
+
* Notes:
|
|
4352
4520
|
* The JSON Schema and arbitrary metadata are built from `^${startsWith}` without
|
|
4353
4521
|
* escaping regexp metacharacters. If the prefix contains regexp syntax, generated
|
|
4354
4522
|
* patterns may not be equivalent to the runtime `startsWith` check.
|
|
@@ -4360,7 +4528,9 @@ export declare function isStartsWith(startsWith: string, annotations?: Annotatio
|
|
|
4360
4528
|
/**
|
|
4361
4529
|
* Validates at runtime that a string ends with the specified literal suffix.
|
|
4362
4530
|
*
|
|
4363
|
-
* **
|
|
4531
|
+
* **Details**
|
|
4532
|
+
*
|
|
4533
|
+
* Notes:
|
|
4364
4534
|
* The JSON Schema and arbitrary metadata are built from `${endsWith}$` without
|
|
4365
4535
|
* escaping regexp metacharacters. If the suffix contains regexp syntax, generated
|
|
4366
4536
|
* patterns may not be equivalent to the runtime `endsWith` check.
|
|
@@ -4372,7 +4542,9 @@ export declare function isEndsWith(endsWith: string, annotations?: Annotations.F
|
|
|
4372
4542
|
/**
|
|
4373
4543
|
* Validates at runtime that a string contains the specified literal substring.
|
|
4374
4544
|
*
|
|
4375
|
-
* **
|
|
4545
|
+
* **Details**
|
|
4546
|
+
*
|
|
4547
|
+
* Notes:
|
|
4376
4548
|
* The JSON Schema and arbitrary metadata use the substring as a raw regexp
|
|
4377
4549
|
* pattern. If the substring contains regexp syntax, generated patterns may not be
|
|
4378
4550
|
* equivalent to the runtime `includes` check.
|
|
@@ -4385,6 +4557,7 @@ export declare function isIncludes(includes: string, annotations?: Annotations.F
|
|
|
4385
4557
|
* Validates that a string is unchanged by JavaScript's `toUpperCase()`.
|
|
4386
4558
|
*
|
|
4387
4559
|
* **Details**
|
|
4560
|
+
*
|
|
4388
4561
|
* This accepts empty strings and characters that do not have lowercase forms,
|
|
4389
4562
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
4390
4563
|
* change when uppercased.
|
|
@@ -4397,6 +4570,7 @@ export declare function isUppercased(annotations?: Annotations.Filter): AST.Filt
|
|
|
4397
4570
|
* Validates that a string is unchanged by JavaScript's `toLowerCase()`.
|
|
4398
4571
|
*
|
|
4399
4572
|
* **Details**
|
|
4573
|
+
*
|
|
4400
4574
|
* This accepts empty strings and characters that do not have uppercase forms,
|
|
4401
4575
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
4402
4576
|
* change when lowercased.
|
|
@@ -4410,6 +4584,7 @@ export declare function isLowercased(annotations?: Annotations.Filter): AST.Filt
|
|
|
4410
4584
|
* `toUpperCase()`.
|
|
4411
4585
|
*
|
|
4412
4586
|
* **Details**
|
|
4587
|
+
*
|
|
4413
4588
|
* Empty strings pass. Strings whose first character has no lowercase form, such
|
|
4414
4589
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
4415
4590
|
*
|
|
@@ -4422,6 +4597,7 @@ export declare function isCapitalized(annotations?: Annotations.Filter): AST.Fil
|
|
|
4422
4597
|
* `toLowerCase()`.
|
|
4423
4598
|
*
|
|
4424
4599
|
* **Details**
|
|
4600
|
+
*
|
|
4425
4601
|
* Empty strings pass. Strings whose first character has no uppercase form, such
|
|
4426
4602
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
4427
4603
|
*
|
|
@@ -4432,12 +4608,14 @@ export declare function isUncapitalized(annotations?: Annotations.Filter): AST.F
|
|
|
4432
4608
|
/**
|
|
4433
4609
|
* Validates that a number is finite (not `Infinity`, `-Infinity`, or `NaN`).
|
|
4434
4610
|
*
|
|
4435
|
-
* **
|
|
4611
|
+
* **Details**
|
|
4612
|
+
*
|
|
4613
|
+
* JSON Schema:
|
|
4436
4614
|
*
|
|
4437
4615
|
* This check does not have a direct JSON Schema equivalent, but ensures the
|
|
4438
4616
|
* number is valid and finite.
|
|
4439
4617
|
*
|
|
4440
|
-
*
|
|
4618
|
+
* Arbitrary:
|
|
4441
4619
|
*
|
|
4442
4620
|
* When generating test data with fast-check, this applies `noDefaultInfinity`
|
|
4443
4621
|
* and `noNaN` constraints to ensure generated numbers are finite.
|
|
@@ -4532,11 +4710,13 @@ export declare function makeIsMultipleOf<T>(options: {
|
|
|
4532
4710
|
/**
|
|
4533
4711
|
* Validates that a number is greater than the specified value (exclusive).
|
|
4534
4712
|
*
|
|
4535
|
-
* **
|
|
4713
|
+
* **Details**
|
|
4714
|
+
*
|
|
4715
|
+
* JSON Schema:
|
|
4536
4716
|
*
|
|
4537
4717
|
* This check corresponds to the `exclusiveMinimum` constraint in JSON Schema.
|
|
4538
4718
|
*
|
|
4539
|
-
*
|
|
4719
|
+
* Arbitrary:
|
|
4540
4720
|
*
|
|
4541
4721
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
4542
4722
|
* with `minExcluded: true` to ensure generated numbers are greater than the
|
|
@@ -4550,11 +4730,13 @@ export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Ann
|
|
|
4550
4730
|
* Validates that a number is greater than or equal to the specified value
|
|
4551
4731
|
* (inclusive).
|
|
4552
4732
|
*
|
|
4553
|
-
* **
|
|
4733
|
+
* **Details**
|
|
4734
|
+
*
|
|
4735
|
+
* JSON Schema:
|
|
4554
4736
|
*
|
|
4555
4737
|
* This check corresponds to the `minimum` constraint in JSON Schema.
|
|
4556
4738
|
*
|
|
4557
|
-
*
|
|
4739
|
+
* Arbitrary:
|
|
4558
4740
|
*
|
|
4559
4741
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
4560
4742
|
* to ensure generated numbers are greater than or equal to the specified value.
|
|
@@ -4566,11 +4748,13 @@ export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Ann
|
|
|
4566
4748
|
/**
|
|
4567
4749
|
* Validates that a number is less than the specified value (exclusive).
|
|
4568
4750
|
*
|
|
4569
|
-
* **
|
|
4751
|
+
* **Details**
|
|
4752
|
+
*
|
|
4753
|
+
* JSON Schema:
|
|
4570
4754
|
*
|
|
4571
4755
|
* This check corresponds to the `exclusiveMaximum` constraint in JSON Schema.
|
|
4572
4756
|
*
|
|
4573
|
-
*
|
|
4757
|
+
* Arbitrary:
|
|
4574
4758
|
*
|
|
4575
4759
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
4576
4760
|
* with `maxExcluded: true` to ensure generated numbers are less than the
|
|
@@ -4584,11 +4768,13 @@ export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annota
|
|
|
4584
4768
|
* Validates that a number is less than or equal to the specified value
|
|
4585
4769
|
* (inclusive).
|
|
4586
4770
|
*
|
|
4587
|
-
* **
|
|
4771
|
+
* **Details**
|
|
4772
|
+
*
|
|
4773
|
+
* JSON Schema:
|
|
4588
4774
|
*
|
|
4589
4775
|
* This check corresponds to the `maximum` constraint in JSON Schema.
|
|
4590
4776
|
*
|
|
4591
|
-
*
|
|
4777
|
+
* Arbitrary:
|
|
4592
4778
|
*
|
|
4593
4779
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
4594
4780
|
* to ensure generated numbers are less than or equal to the specified value.
|
|
@@ -4601,12 +4787,14 @@ export declare const isLessThanOrEqualTo: (maximum: number, annotations?: Annota
|
|
|
4601
4787
|
* Validates that a number is within a specified range. The range boundaries can
|
|
4602
4788
|
* be inclusive or exclusive based on the provided options.
|
|
4603
4789
|
*
|
|
4604
|
-
* **
|
|
4790
|
+
* **Details**
|
|
4791
|
+
*
|
|
4792
|
+
* JSON Schema:
|
|
4605
4793
|
*
|
|
4606
4794
|
* This check corresponds to `minimum`/`maximum` or `exclusiveMinimum`/`exclusiveMaximum`
|
|
4607
4795
|
* constraints in JSON Schema, depending on the options provided.
|
|
4608
4796
|
*
|
|
4609
|
-
*
|
|
4797
|
+
* Arbitrary:
|
|
4610
4798
|
*
|
|
4611
4799
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
4612
4800
|
* constraints with optional `minExcluded` and `maxExcluded` flags to ensure
|
|
@@ -4624,11 +4812,13 @@ export declare const isBetween: (options: {
|
|
|
4624
4812
|
/**
|
|
4625
4813
|
* Validates that a number is a multiple of the specified divisor.
|
|
4626
4814
|
*
|
|
4627
|
-
* **
|
|
4815
|
+
* **Details**
|
|
4816
|
+
*
|
|
4817
|
+
* JSON Schema:
|
|
4628
4818
|
*
|
|
4629
4819
|
* This check corresponds to the `multipleOf` constraint in JSON Schema.
|
|
4630
4820
|
*
|
|
4631
|
-
*
|
|
4821
|
+
* Arbitrary:
|
|
4632
4822
|
*
|
|
4633
4823
|
* When generating test data with fast-check, this applies constraints to ensure
|
|
4634
4824
|
* generated numbers are multiples of the specified divisor.
|
|
@@ -4641,11 +4831,13 @@ export declare const isMultipleOf: (divisor: number, annotations?: Annotations.F
|
|
|
4641
4831
|
* Validates that a number is a safe integer (within the safe integer range
|
|
4642
4832
|
* that can be exactly represented in JavaScript).
|
|
4643
4833
|
*
|
|
4644
|
-
* **
|
|
4834
|
+
* **Details**
|
|
4835
|
+
*
|
|
4836
|
+
* JSON Schema:
|
|
4645
4837
|
*
|
|
4646
4838
|
* This check corresponds to the `type: "integer"` constraint in JSON Schema.
|
|
4647
4839
|
*
|
|
4648
|
-
*
|
|
4840
|
+
* Arbitrary:
|
|
4649
4841
|
*
|
|
4650
4842
|
* When generating test data with fast-check, this applies an `isInteger: true`
|
|
4651
4843
|
* constraint to ensure generated numbers are integers.
|
|
@@ -4658,12 +4850,14 @@ export declare function isInt(annotations?: Annotations.Filter): AST.Filter<numb
|
|
|
4658
4850
|
* Validates that a number is a 32-bit signed integer (range: -2,147,483,648 to
|
|
4659
4851
|
* 2,147,483,647).
|
|
4660
4852
|
*
|
|
4661
|
-
* **
|
|
4853
|
+
* **Details**
|
|
4854
|
+
*
|
|
4855
|
+
* JSON Schema:
|
|
4662
4856
|
*
|
|
4663
4857
|
* This check corresponds to the `format: "int32"` constraint in OpenAPI 3.1,
|
|
4664
4858
|
* or `minimum`/`maximum` constraints in other JSON Schema targets.
|
|
4665
4859
|
*
|
|
4666
|
-
*
|
|
4860
|
+
* Arbitrary:
|
|
4667
4861
|
*
|
|
4668
4862
|
* When generating test data with fast-check, this applies integer and range
|
|
4669
4863
|
* constraints to ensure generated numbers are 32-bit signed integers.
|
|
@@ -4676,12 +4870,14 @@ export declare function isInt32(annotations?: Annotations.Filter): AST.FilterGro
|
|
|
4676
4870
|
* Validates that a number is a 32-bit unsigned integer (range: 0 to
|
|
4677
4871
|
* 4,294,967,295).
|
|
4678
4872
|
*
|
|
4679
|
-
* **
|
|
4873
|
+
* **Details**
|
|
4874
|
+
*
|
|
4875
|
+
* JSON Schema:
|
|
4680
4876
|
*
|
|
4681
4877
|
* This check corresponds to the `format: "uint32"` constraint in OpenAPI 3.1,
|
|
4682
4878
|
* or `minimum`/`maximum` constraints in other JSON Schema targets.
|
|
4683
4879
|
*
|
|
4684
|
-
*
|
|
4880
|
+
* Arbitrary:
|
|
4685
4881
|
*
|
|
4686
4882
|
* When generating test data with fast-check, this applies integer and range
|
|
4687
4883
|
* constraints to ensure generated numbers are 32-bit unsigned integers.
|
|
@@ -4694,12 +4890,14 @@ export declare function isUint32(annotations?: Annotations.Filter): AST.FilterGr
|
|
|
4694
4890
|
* Validates that a Date object represents a valid date (not an invalid date
|
|
4695
4891
|
* like `new Date("invalid")`).
|
|
4696
4892
|
*
|
|
4697
|
-
* **
|
|
4893
|
+
* **Details**
|
|
4894
|
+
*
|
|
4895
|
+
* JSON Schema:
|
|
4698
4896
|
*
|
|
4699
4897
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
4700
4898
|
* validates date strings, not Date objects.
|
|
4701
4899
|
*
|
|
4702
|
-
*
|
|
4900
|
+
* Arbitrary:
|
|
4703
4901
|
*
|
|
4704
4902
|
* When generating test data with fast-check, this applies a `noInvalidDate`
|
|
4705
4903
|
* constraint to ensure generated Date objects are valid.
|
|
@@ -4711,7 +4909,9 @@ export declare function isDateValid(annotations?: Annotations.Filter): AST.Filte
|
|
|
4711
4909
|
/**
|
|
4712
4910
|
* Validates that a Date is greater than the specified value (exclusive).
|
|
4713
4911
|
*
|
|
4714
|
-
* **
|
|
4912
|
+
* **Details**
|
|
4913
|
+
*
|
|
4914
|
+
* Arbitrary:
|
|
4715
4915
|
*
|
|
4716
4916
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
4717
4917
|
* with `minExcluded: true` to ensure generated Date objects are greater than the
|
|
@@ -4725,12 +4925,14 @@ export declare const isGreaterThanDate: (exclusiveMinimum: globalThis.Date, anno
|
|
|
4725
4925
|
* Validates that a Date is greater than or equal to the specified date
|
|
4726
4926
|
* (inclusive).
|
|
4727
4927
|
*
|
|
4728
|
-
* **
|
|
4928
|
+
* **Details**
|
|
4929
|
+
*
|
|
4930
|
+
* JSON Schema:
|
|
4729
4931
|
*
|
|
4730
4932
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
4731
4933
|
* validates date strings, not Date objects.
|
|
4732
4934
|
*
|
|
4733
|
-
*
|
|
4935
|
+
* Arbitrary:
|
|
4734
4936
|
*
|
|
4735
4937
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
4736
4938
|
* to ensure generated Date objects are greater than or equal to the specified
|
|
@@ -4743,7 +4945,9 @@ export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, anno
|
|
|
4743
4945
|
/**
|
|
4744
4946
|
* Validates that a Date is less than the specified value (exclusive).
|
|
4745
4947
|
*
|
|
4746
|
-
* **
|
|
4948
|
+
* **Details**
|
|
4949
|
+
*
|
|
4950
|
+
* Arbitrary:
|
|
4747
4951
|
*
|
|
4748
4952
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
4749
4953
|
* with `maxExcluded: true` to ensure generated Date objects are less than the
|
|
@@ -4757,12 +4961,14 @@ export declare const isLessThanDate: (exclusiveMaximum: globalThis.Date, annotat
|
|
|
4757
4961
|
* Validates that a Date is less than or equal to the specified date
|
|
4758
4962
|
* (inclusive).
|
|
4759
4963
|
*
|
|
4760
|
-
* **
|
|
4964
|
+
* **Details**
|
|
4965
|
+
*
|
|
4966
|
+
* JSON Schema:
|
|
4761
4967
|
*
|
|
4762
4968
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
4763
4969
|
* validates date strings, not Date objects.
|
|
4764
4970
|
*
|
|
4765
|
-
*
|
|
4971
|
+
* Arbitrary:
|
|
4766
4972
|
*
|
|
4767
4973
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
4768
4974
|
* to ensure generated Date objects are less than or equal to the specified
|
|
@@ -4776,12 +4982,14 @@ export declare const isLessThanOrEqualToDate: (maximum: globalThis.Date, annotat
|
|
|
4776
4982
|
* Validates that a Date is within a specified range. The range boundaries can
|
|
4777
4983
|
* be inclusive or exclusive based on the provided options.
|
|
4778
4984
|
*
|
|
4779
|
-
* **
|
|
4985
|
+
* **Details**
|
|
4986
|
+
*
|
|
4987
|
+
* JSON Schema:
|
|
4780
4988
|
*
|
|
4781
4989
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
4782
4990
|
* validates date strings, not Date objects.
|
|
4783
4991
|
*
|
|
4784
|
-
*
|
|
4992
|
+
* Arbitrary:
|
|
4785
4993
|
*
|
|
4786
4994
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
4787
4995
|
* constraints to ensure generated Date objects fall within the specified range.
|
|
@@ -4798,7 +5006,9 @@ export declare const isBetweenDate: (options: {
|
|
|
4798
5006
|
/**
|
|
4799
5007
|
* Validates that a BigInt is greater than the specified value (exclusive).
|
|
4800
5008
|
*
|
|
4801
|
-
* **
|
|
5009
|
+
* **Details**
|
|
5010
|
+
*
|
|
5011
|
+
* Arbitrary:
|
|
4802
5012
|
*
|
|
4803
5013
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
4804
5014
|
* with `minExcluded: true` to ensure generated BigInts are greater than the
|
|
@@ -4812,7 +5022,9 @@ export declare const isGreaterThanBigInt: (exclusiveMinimum: bigint, annotations
|
|
|
4812
5022
|
* Validates that a BigInt is greater than or equal to the specified value
|
|
4813
5023
|
* (inclusive).
|
|
4814
5024
|
*
|
|
4815
|
-
* **
|
|
5025
|
+
* **Details**
|
|
5026
|
+
*
|
|
5027
|
+
* Arbitrary:
|
|
4816
5028
|
*
|
|
4817
5029
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
4818
5030
|
* to ensure generated BigInt values are greater than or equal to the specified
|
|
@@ -4825,7 +5037,9 @@ export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations
|
|
|
4825
5037
|
/**
|
|
4826
5038
|
* Validates that a BigInt is less than the specified value (exclusive).
|
|
4827
5039
|
*
|
|
4828
|
-
* **
|
|
5040
|
+
* **Details**
|
|
5041
|
+
*
|
|
5042
|
+
* Arbitrary:
|
|
4829
5043
|
*
|
|
4830
5044
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
4831
5045
|
* with `maxExcluded: true` to ensure generated BigInts are less than the
|
|
@@ -4839,7 +5053,9 @@ export declare const isLessThanBigInt: (exclusiveMaximum: bigint, annotations?:
|
|
|
4839
5053
|
* Validates that a BigInt is less than or equal to the specified value
|
|
4840
5054
|
* (inclusive).
|
|
4841
5055
|
*
|
|
4842
|
-
* **
|
|
5056
|
+
* **Details**
|
|
5057
|
+
*
|
|
5058
|
+
* Arbitrary:
|
|
4843
5059
|
*
|
|
4844
5060
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
4845
5061
|
* to ensure generated BigInt values are less than or equal to the specified
|
|
@@ -4853,7 +5069,9 @@ export declare const isLessThanOrEqualToBigInt: (maximum: bigint, annotations?:
|
|
|
4853
5069
|
* Validates that a BigInt is within a specified range. The range boundaries can
|
|
4854
5070
|
* be inclusive or exclusive based on the provided options.
|
|
4855
5071
|
*
|
|
4856
|
-
* **
|
|
5072
|
+
* **Details**
|
|
5073
|
+
*
|
|
5074
|
+
* Arbitrary:
|
|
4857
5075
|
*
|
|
4858
5076
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
4859
5077
|
* constraints to ensure generated BigInt values fall within the specified
|
|
@@ -4902,6 +5120,7 @@ export declare const isLessThanOrEqualToBigDecimal: (maximum: BigDecimal_.BigDec
|
|
|
4902
5120
|
* Validates that a `BigDecimal` is within a specified range.
|
|
4903
5121
|
*
|
|
4904
5122
|
* **Details**
|
|
5123
|
+
*
|
|
4905
5124
|
* The minimum and maximum boundaries are inclusive by default. Pass
|
|
4906
5125
|
* `exclusiveMinimum` or `exclusiveMaximum` to exclude either boundary.
|
|
4907
5126
|
*
|
|
@@ -4918,12 +5137,14 @@ export declare const isBetweenBigDecimal: (options: {
|
|
|
4918
5137
|
* Validates that a value has at least the specified length. Works with strings
|
|
4919
5138
|
* and arrays.
|
|
4920
5139
|
*
|
|
4921
|
-
* **
|
|
5140
|
+
* **Details**
|
|
5141
|
+
*
|
|
5142
|
+
* JSON Schema:
|
|
4922
5143
|
*
|
|
4923
5144
|
* This check corresponds to the `minLength` constraint for strings or the
|
|
4924
5145
|
* `minItems` constraint for arrays in JSON Schema.
|
|
4925
5146
|
*
|
|
4926
|
-
*
|
|
5147
|
+
* Arbitrary:
|
|
4927
5148
|
*
|
|
4928
5149
|
* When generating test data with fast-check, this applies a `minLength`
|
|
4929
5150
|
* constraint to ensure generated strings or arrays have at least the required
|
|
@@ -4948,12 +5169,14 @@ export declare function isMinLength(minLength: number, annotations?: Annotations
|
|
|
4948
5169
|
* Validates that a value has at least one element. Works with strings and arrays.
|
|
4949
5170
|
* This is equivalent to `isMinLength(1)`.
|
|
4950
5171
|
*
|
|
4951
|
-
* **
|
|
5172
|
+
* **Details**
|
|
5173
|
+
*
|
|
5174
|
+
* JSON Schema:
|
|
4952
5175
|
*
|
|
4953
5176
|
* This check corresponds to the `minLength: 1` constraint for strings or the
|
|
4954
5177
|
* `minItems: 1` constraint for arrays in JSON Schema.
|
|
4955
5178
|
*
|
|
4956
|
-
*
|
|
5179
|
+
* Arbitrary:
|
|
4957
5180
|
*
|
|
4958
5181
|
* When generating test data with fast-check, this applies a `minLength: 1`
|
|
4959
5182
|
* constraint to ensure generated strings or arrays are non-empty.
|
|
@@ -4968,12 +5191,14 @@ export declare function isNonEmpty(annotations?: Annotations.Filter): AST.Filter
|
|
|
4968
5191
|
* Validates that a value has at most the specified length. Works with strings
|
|
4969
5192
|
* and arrays.
|
|
4970
5193
|
*
|
|
4971
|
-
* **
|
|
5194
|
+
* **Details**
|
|
5195
|
+
*
|
|
5196
|
+
* JSON Schema:
|
|
4972
5197
|
*
|
|
4973
5198
|
* This check corresponds to the `maxLength` constraint for strings or the
|
|
4974
5199
|
* `maxItems` constraint for arrays in JSON Schema.
|
|
4975
5200
|
*
|
|
4976
|
-
*
|
|
5201
|
+
* Arbitrary:
|
|
4977
5202
|
*
|
|
4978
5203
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
4979
5204
|
* constraint to ensure generated strings or arrays have at most the required
|
|
@@ -4989,12 +5214,14 @@ export declare function isMaxLength(maxLength: number, annotations?: Annotations
|
|
|
4989
5214
|
* Validates that a value's length is within the specified range. Works with
|
|
4990
5215
|
* strings and arrays.
|
|
4991
5216
|
*
|
|
4992
|
-
* **
|
|
5217
|
+
* **Details**
|
|
5218
|
+
*
|
|
5219
|
+
* JSON Schema:
|
|
4993
5220
|
*
|
|
4994
5221
|
* This check corresponds to `minLength`/`maxLength` constraints for strings
|
|
4995
5222
|
* or `minItems`/`maxItems` constraints for arrays in JSON Schema.
|
|
4996
5223
|
*
|
|
4997
|
-
*
|
|
5224
|
+
* Arbitrary:
|
|
4998
5225
|
*
|
|
4999
5226
|
* When generating test data with fast-check, this applies `minLength` and
|
|
5000
5227
|
* `maxLength` constraints to ensure generated strings or arrays have a length
|
|
@@ -5010,12 +5237,14 @@ export declare function isLengthBetween(minimum: number, maximum: number, annota
|
|
|
5010
5237
|
* Validates that a value has at least the specified size. Works with values
|
|
5011
5238
|
* that have a `size` property, such as `Set` or `Map`.
|
|
5012
5239
|
*
|
|
5013
|
-
* **
|
|
5240
|
+
* **Details**
|
|
5241
|
+
*
|
|
5242
|
+
* JSON Schema:
|
|
5014
5243
|
*
|
|
5015
5244
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
5016
5245
|
* values with a `size` property rather than standard JSON Schema types.
|
|
5017
5246
|
*
|
|
5018
|
-
*
|
|
5247
|
+
* Arbitrary:
|
|
5019
5248
|
*
|
|
5020
5249
|
* When generating test data with fast-check, this applies a `minLength`
|
|
5021
5250
|
* constraint to the array representation to ensure generated values have at
|
|
@@ -5031,12 +5260,14 @@ export declare function isMinSize(minSize: number, annotations?: Annotations.Fil
|
|
|
5031
5260
|
* Validates that a value has at most the specified size. Works with values
|
|
5032
5261
|
* that have a `size` property, such as `Set` or `Map`.
|
|
5033
5262
|
*
|
|
5034
|
-
* **
|
|
5263
|
+
* **Details**
|
|
5264
|
+
*
|
|
5265
|
+
* JSON Schema:
|
|
5035
5266
|
*
|
|
5036
5267
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
5037
5268
|
* values with a `size` property rather than standard JSON Schema types.
|
|
5038
5269
|
*
|
|
5039
|
-
*
|
|
5270
|
+
* Arbitrary:
|
|
5040
5271
|
*
|
|
5041
5272
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
5042
5273
|
* constraint to the array representation to ensure generated values have at
|
|
@@ -5052,12 +5283,14 @@ export declare function isMaxSize(maxSize: number, annotations?: Annotations.Fil
|
|
|
5052
5283
|
* Validates that a value's size is within the specified range. Works with
|
|
5053
5284
|
* values that have a `size` property, such as `Set` or `Map`.
|
|
5054
5285
|
*
|
|
5055
|
-
* **
|
|
5286
|
+
* **Details**
|
|
5287
|
+
*
|
|
5288
|
+
* JSON Schema:
|
|
5056
5289
|
*
|
|
5057
5290
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
5058
5291
|
* values with a `size` property rather than standard JSON Schema types.
|
|
5059
5292
|
*
|
|
5060
|
-
*
|
|
5293
|
+
* Arbitrary:
|
|
5061
5294
|
*
|
|
5062
5295
|
* When generating test data with fast-check, this applies `minLength` and
|
|
5063
5296
|
* `maxLength` constraints to ensure generated values have a size within the
|
|
@@ -5074,11 +5307,13 @@ export declare function isSizeBetween(minimum: number, maximum: number, annotati
|
|
|
5074
5307
|
* properties. This includes both string and symbol keys when counting
|
|
5075
5308
|
* properties.
|
|
5076
5309
|
*
|
|
5077
|
-
* **
|
|
5310
|
+
* **Details**
|
|
5311
|
+
*
|
|
5312
|
+
* JSON Schema:
|
|
5078
5313
|
*
|
|
5079
5314
|
* This check corresponds to the `minProperties` constraint in JSON Schema.
|
|
5080
5315
|
*
|
|
5081
|
-
*
|
|
5316
|
+
* Arbitrary:
|
|
5082
5317
|
*
|
|
5083
5318
|
* When generating test data with fast-check, this applies a `minLength`
|
|
5084
5319
|
* constraint to the array of entries that is generated before being converted
|
|
@@ -5093,11 +5328,13 @@ export declare function isMinProperties(minProperties: number, annotations?: Ann
|
|
|
5093
5328
|
* Validates that an object contains at most the specified number of properties.
|
|
5094
5329
|
* This includes both string and symbol keys when counting properties.
|
|
5095
5330
|
*
|
|
5096
|
-
* **
|
|
5331
|
+
* **Details**
|
|
5332
|
+
*
|
|
5333
|
+
* JSON Schema:
|
|
5097
5334
|
*
|
|
5098
5335
|
* This check corresponds to the `maxProperties` constraint in JSON Schema.
|
|
5099
5336
|
*
|
|
5100
|
-
*
|
|
5337
|
+
* Arbitrary:
|
|
5101
5338
|
*
|
|
5102
5339
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
5103
5340
|
* constraint to the array of entries that is generated before being converted
|
|
@@ -5112,12 +5349,14 @@ export declare function isMaxProperties(maxProperties: number, annotations?: Ann
|
|
|
5112
5349
|
* Validates that an object contains between `minimum` and `maximum` properties (inclusive).
|
|
5113
5350
|
* This includes both string and symbol keys when counting properties.
|
|
5114
5351
|
*
|
|
5115
|
-
* **
|
|
5352
|
+
* **Details**
|
|
5353
|
+
*
|
|
5354
|
+
* JSON Schema:
|
|
5116
5355
|
*
|
|
5117
5356
|
* This check corresponds to `minProperties` and `maxProperties`
|
|
5118
5357
|
* constraints in JSON Schema.
|
|
5119
5358
|
*
|
|
5120
|
-
*
|
|
5359
|
+
* Arbitrary:
|
|
5121
5360
|
*
|
|
5122
5361
|
* When generating test data with fast-check, this applies `minLength` and
|
|
5123
5362
|
* `maxLength` constraints to the array of entries that is generated before
|
|
@@ -5132,10 +5371,11 @@ export declare function isPropertiesLengthBetween(minimum: number, maximum: numb
|
|
|
5132
5371
|
* of the provided key schema.
|
|
5133
5372
|
*
|
|
5134
5373
|
* **Details**
|
|
5374
|
+
*
|
|
5135
5375
|
* This check uses `Reflect.ownKeys`, so symbol keys are validated in addition to
|
|
5136
5376
|
* string property names.
|
|
5137
5377
|
*
|
|
5138
|
-
*
|
|
5378
|
+
* JSON Schema:
|
|
5139
5379
|
* For string property names, this corresponds to the `propertyNames` constraint
|
|
5140
5380
|
* in JSON Schema.
|
|
5141
5381
|
*
|
|
@@ -5146,10 +5386,12 @@ export declare function isPropertyNames(keySchema: Top, annotations?: Annotation
|
|
|
5146
5386
|
/**
|
|
5147
5387
|
* Validates that all items in an array are unique according to Effect equality.
|
|
5148
5388
|
*
|
|
5149
|
-
* **
|
|
5389
|
+
* **Details**
|
|
5390
|
+
*
|
|
5391
|
+
* JSON Schema:
|
|
5150
5392
|
* This check corresponds to the `uniqueItems: true` constraint in JSON Schema.
|
|
5151
5393
|
*
|
|
5152
|
-
*
|
|
5394
|
+
* Arbitrary:
|
|
5153
5395
|
* When generating test data with fast-check, this applies a comparator based on
|
|
5154
5396
|
* Effect equality to ensure generated arrays contain only unique items.
|
|
5155
5397
|
*
|
|
@@ -5220,6 +5462,7 @@ export interface Option<A extends Top> extends declareConstructor<Option_.Option
|
|
|
5220
5462
|
* Iso representation used for `Option` schemas.
|
|
5221
5463
|
*
|
|
5222
5464
|
* **Details**
|
|
5465
|
+
*
|
|
5223
5466
|
* `None` is represented as `{ _tag: "None" }`, while `Some` is represented as
|
|
5224
5467
|
* `{ _tag: "Some", value }` using the wrapped schema's `Iso` type.
|
|
5225
5468
|
*
|
|
@@ -5252,6 +5495,8 @@ export interface OptionFromNullOr<S extends Top> extends decodeTo<Option<toType<
|
|
|
5252
5495
|
/**
|
|
5253
5496
|
* Decodes a nullable, required value `T` to a required `Option<T>` value.
|
|
5254
5497
|
*
|
|
5498
|
+
* **Details**
|
|
5499
|
+
*
|
|
5255
5500
|
* Decoding:
|
|
5256
5501
|
* - `null` is decoded as `None`
|
|
5257
5502
|
* - other values are decoded as `Some`
|
|
@@ -5277,6 +5522,8 @@ export interface OptionFromUndefinedOr<S extends Top> extends decodeTo<Option<to
|
|
|
5277
5522
|
/**
|
|
5278
5523
|
* Decodes an undefined-or value `T` to a required `Option<T>` value.
|
|
5279
5524
|
*
|
|
5525
|
+
* **Details**
|
|
5526
|
+
*
|
|
5280
5527
|
* Decoding:
|
|
5281
5528
|
* - `undefined` is decoded as `None`
|
|
5282
5529
|
* - other values are decoded as `Some`
|
|
@@ -5302,6 +5549,8 @@ export interface OptionFromNullishOr<S extends Top> extends decodeTo<Option<toTy
|
|
|
5302
5549
|
/**
|
|
5303
5550
|
* Decodes a nullish value `T` to a required `Option<T>` value.
|
|
5304
5551
|
*
|
|
5552
|
+
* **Details**
|
|
5553
|
+
*
|
|
5305
5554
|
* Decoding:
|
|
5306
5555
|
* - `null` and `undefined` are decoded as `None`
|
|
5307
5556
|
* - other values are decoded as `Some`
|
|
@@ -5329,6 +5578,8 @@ export interface OptionFromOptionalKey<S extends Top> extends decodeTo<Option<to
|
|
|
5329
5578
|
/**
|
|
5330
5579
|
* Decodes an optional value `A` to a required `Option<A>` value.
|
|
5331
5580
|
*
|
|
5581
|
+
* **Details**
|
|
5582
|
+
*
|
|
5332
5583
|
* Decoding:
|
|
5333
5584
|
* - a missing key is decoded as `None`
|
|
5334
5585
|
* - a present value is decoded as `Some`
|
|
@@ -5355,6 +5606,8 @@ export interface OptionFromOptional<S extends Top> extends decodeTo<Option<toTyp
|
|
|
5355
5606
|
* Decodes an optional or `undefined` value `A` to an required `Option<A>`
|
|
5356
5607
|
* value.
|
|
5357
5608
|
*
|
|
5609
|
+
* **Details**
|
|
5610
|
+
*
|
|
5358
5611
|
* Decoding:
|
|
5359
5612
|
* - a missing key is decoded as `None`
|
|
5360
5613
|
* - a present key with an `undefined` value is decoded as `None`
|
|
@@ -5382,6 +5635,8 @@ export interface OptionFromOptionalNullOr<S extends Top> extends decodeTo<Option
|
|
|
5382
5635
|
* Decodes an optional or `null` or `undefined` value `A` to a required `Option<A>`
|
|
5383
5636
|
* value.
|
|
5384
5637
|
*
|
|
5638
|
+
* **Details**
|
|
5639
|
+
*
|
|
5385
5640
|
* Decoding:
|
|
5386
5641
|
* - a missing key is decoded as `None`
|
|
5387
5642
|
* - a present key with an `undefined` value is decoded as `None`
|
|
@@ -5416,6 +5671,7 @@ export interface Result<A extends Top, E extends Top> extends declareConstructor
|
|
|
5416
5671
|
* Iso representation used for `Result` schemas.
|
|
5417
5672
|
*
|
|
5418
5673
|
* **Details**
|
|
5674
|
+
*
|
|
5419
5675
|
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
5420
5676
|
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
5421
5677
|
*
|
|
@@ -5451,10 +5707,12 @@ export interface Redacted<S extends Top> extends declareConstructor<Redacted_.Re
|
|
|
5451
5707
|
* Creates a schema for the `Redacted` type, providing secure handling of
|
|
5452
5708
|
* sensitive information.
|
|
5453
5709
|
*
|
|
5710
|
+
* **Details**
|
|
5711
|
+
*
|
|
5454
5712
|
* If the wrapped schema fails, the issue will be redacted to prevent both
|
|
5455
5713
|
* the actual value and the schema details from being exposed.
|
|
5456
5714
|
*
|
|
5457
|
-
*
|
|
5715
|
+
* Options:
|
|
5458
5716
|
*
|
|
5459
5717
|
* - `label`: When provided, the schema will behave as follows:
|
|
5460
5718
|
* - Values will be validated against the label in addition to the wrapped schema
|
|
@@ -5462,7 +5720,7 @@ export interface Redacted<S extends Top> extends declareConstructor<Redacted_.Re
|
|
|
5462
5720
|
* - The arbitrary generator will produce a `Redacted` instance with the label
|
|
5463
5721
|
* - The formatter will return the label
|
|
5464
5722
|
*
|
|
5465
|
-
*
|
|
5723
|
+
* Default JSON serializer:
|
|
5466
5724
|
*
|
|
5467
5725
|
* The default JSON serializer will fail when attempting to serialize a `Redacted` value,
|
|
5468
5726
|
* but it will deserialize a value into a `Redacted` instance.
|
|
@@ -5508,6 +5766,7 @@ export declare function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
|
5508
5766
|
* (`Interrupt`).
|
|
5509
5767
|
*
|
|
5510
5768
|
* **Details**
|
|
5769
|
+
*
|
|
5511
5770
|
* The `error` schema validates typed failures and the `defect` schema validates
|
|
5512
5771
|
* unexpected defects.
|
|
5513
5772
|
*
|
|
@@ -5523,6 +5782,7 @@ export interface CauseReason<E extends Top, D extends Top> extends declareConstr
|
|
|
5523
5782
|
* Iso representation used for `CauseReason` schemas.
|
|
5524
5783
|
*
|
|
5525
5784
|
* **Details**
|
|
5785
|
+
*
|
|
5526
5786
|
* Failures are represented with a `Fail` tag and encoded error, defects with a
|
|
5527
5787
|
* `Die` tag and encoded defect, and interrupts with an optional `fiberId`.
|
|
5528
5788
|
*
|
|
@@ -5552,6 +5812,7 @@ export declare function CauseReason<E extends Top, D extends Top>(error: E, defe
|
|
|
5552
5812
|
* reasons combining typed errors, defects, and interrupts.
|
|
5553
5813
|
*
|
|
5554
5814
|
* **Details**
|
|
5815
|
+
*
|
|
5555
5816
|
* The `error` schema validates typed failures and the `defect` schema validates
|
|
5556
5817
|
* unexpected defects.
|
|
5557
5818
|
*
|
|
@@ -5591,7 +5852,9 @@ export interface Error extends instanceOf<globalThis.Error> {
|
|
|
5591
5852
|
/**
|
|
5592
5853
|
* A schema for JavaScript `Error` objects.
|
|
5593
5854
|
*
|
|
5594
|
-
* **
|
|
5855
|
+
* **Details**
|
|
5856
|
+
*
|
|
5857
|
+
* Default JSON serializer:
|
|
5595
5858
|
* Encodes an `Error` as an object with `message` and optional `name` properties,
|
|
5596
5859
|
* and decodes that object back into an `Error`. The stack trace is omitted from
|
|
5597
5860
|
* the encoded form for security.
|
|
@@ -5604,7 +5867,9 @@ export declare const Error: Error;
|
|
|
5604
5867
|
* A schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
5605
5868
|
* encoded form.
|
|
5606
5869
|
*
|
|
5607
|
-
* **
|
|
5870
|
+
* **Details**
|
|
5871
|
+
*
|
|
5872
|
+
* Default JSON serializer:
|
|
5608
5873
|
* Encodes an `Error` as an object with `message`, optional `name`, and optional
|
|
5609
5874
|
* `stack` properties, and decodes that object back into an `Error`.
|
|
5610
5875
|
*
|
|
@@ -5633,7 +5898,9 @@ export interface Defect extends Union<readonly [
|
|
|
5633
5898
|
* A schema for defect values, accepting either JavaScript `Error` values encoded
|
|
5634
5899
|
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
5635
5900
|
*
|
|
5636
|
-
* **
|
|
5901
|
+
* **Details**
|
|
5902
|
+
*
|
|
5903
|
+
* Default JSON serializer:
|
|
5637
5904
|
* Unknown defects are serialized with `JSON.stringify` when possible and fall
|
|
5638
5905
|
* back to Effect's formatted representation when JSON serialization fails.
|
|
5639
5906
|
*
|
|
@@ -5666,6 +5933,7 @@ export interface Exit<A extends Top, E extends Top, D extends Top> extends decla
|
|
|
5666
5933
|
* Iso representation used for `Exit` schemas.
|
|
5667
5934
|
*
|
|
5668
5935
|
* **Details**
|
|
5936
|
+
*
|
|
5669
5937
|
* Successful exits are represented as `{ _tag: "Success", value }`, while failed
|
|
5670
5938
|
* exits are represented as `{ _tag: "Failure", cause }`.
|
|
5671
5939
|
*
|
|
@@ -5836,6 +6104,8 @@ export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
|
5836
6104
|
/**
|
|
5837
6105
|
* Schema for JavaScript `RegExp` objects.
|
|
5838
6106
|
*
|
|
6107
|
+
* **Details**
|
|
6108
|
+
*
|
|
5839
6109
|
* The default JSON serializer encodes a `RegExp` as `{ source, flags }`.
|
|
5840
6110
|
*
|
|
5841
6111
|
* @category RegExp
|
|
@@ -5854,7 +6124,9 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
5854
6124
|
/**
|
|
5855
6125
|
* A schema for JavaScript `URL` objects.
|
|
5856
6126
|
*
|
|
5857
|
-
* **
|
|
6127
|
+
* **Details**
|
|
6128
|
+
*
|
|
6129
|
+
* Default JSON serializer:
|
|
5858
6130
|
*
|
|
5859
6131
|
* - encodes `URL` as a `string`
|
|
5860
6132
|
*
|
|
@@ -5875,6 +6147,8 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
5875
6147
|
/**
|
|
5876
6148
|
* A transformation schema that decodes a `string` into a `URL`.
|
|
5877
6149
|
*
|
|
6150
|
+
* **Details**
|
|
6151
|
+
*
|
|
5878
6152
|
* Decoding:
|
|
5879
6153
|
* - A **valid** URL `string` is decoded as a `URL`
|
|
5880
6154
|
*
|
|
@@ -5898,6 +6172,8 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
5898
6172
|
/**
|
|
5899
6173
|
* A schema for JavaScript `Date` objects.
|
|
5900
6174
|
*
|
|
6175
|
+
* **Details**
|
|
6176
|
+
*
|
|
5901
6177
|
* This schema accepts any `Date` instance, including invalid dates. For
|
|
5902
6178
|
* validating only valid dates, use `DateValid` instead. The default JSON
|
|
5903
6179
|
* serializer encodes valid dates as ISO 8601 strings; invalid dates encode as
|
|
@@ -5929,11 +6205,13 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
5929
6205
|
/**
|
|
5930
6206
|
* A transformation schema that decodes a string into a JavaScript `Date`.
|
|
5931
6207
|
*
|
|
5932
|
-
* **
|
|
6208
|
+
* **Details**
|
|
6209
|
+
*
|
|
6210
|
+
* Decoding:
|
|
5933
6211
|
* The string is passed to JavaScript `Date` construction and may decode to an
|
|
5934
6212
|
* invalid `Date`. Compose with `DateValid` when invalid dates should be rejected.
|
|
5935
6213
|
*
|
|
5936
|
-
*
|
|
6214
|
+
* Encoding:
|
|
5937
6215
|
* A valid `Date` is encoded as an ISO string; an invalid `Date` is encoded as
|
|
5938
6216
|
* `"Invalid Date"`.
|
|
5939
6217
|
*
|
|
@@ -5954,6 +6232,8 @@ export interface DateValid extends Date {
|
|
|
5954
6232
|
/**
|
|
5955
6233
|
* A schema for **valid** JavaScript `Date` objects.
|
|
5956
6234
|
*
|
|
6235
|
+
* **Details**
|
|
6236
|
+
*
|
|
5957
6237
|
* This schema accepts `Date` instances but rejects invalid dates (such as `new
|
|
5958
6238
|
* Date("invalid")`).
|
|
5959
6239
|
*
|
|
@@ -5973,6 +6253,8 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
5973
6253
|
/**
|
|
5974
6254
|
* A schema for `Duration` values.
|
|
5975
6255
|
*
|
|
6256
|
+
* **Details**
|
|
6257
|
+
*
|
|
5976
6258
|
* The default JSON serializer encodes `Duration` as a tagged object with the
|
|
5977
6259
|
* duration type and value.
|
|
5978
6260
|
*
|
|
@@ -6003,6 +6285,8 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
6003
6285
|
/**
|
|
6004
6286
|
* A transformation schema that parses a string into a `Duration`.
|
|
6005
6287
|
*
|
|
6288
|
+
* **Details**
|
|
6289
|
+
*
|
|
6006
6290
|
* Decoding:
|
|
6007
6291
|
* - A `string` is decoded as a `Duration`, accepting any format that
|
|
6008
6292
|
* `Duration.fromInput` can parse.
|
|
@@ -6028,10 +6312,12 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
6028
6312
|
* A transformation schema that decodes a non-negative `bigint` into a
|
|
6029
6313
|
* `Duration`, treating the bigint as nanoseconds.
|
|
6030
6314
|
*
|
|
6031
|
-
* **
|
|
6315
|
+
* **Details**
|
|
6316
|
+
*
|
|
6317
|
+
* Decoding:
|
|
6032
6318
|
* A non-negative `bigint` representing nanoseconds is decoded as a `Duration`.
|
|
6033
6319
|
*
|
|
6034
|
-
*
|
|
6320
|
+
* Encoding:
|
|
6035
6321
|
* Finite durations are encoded as a non-negative `bigint` number of nanoseconds.
|
|
6036
6322
|
* Encoding fails when the duration cannot be represented as nanoseconds, such as
|
|
6037
6323
|
* `Duration.infinity`.
|
|
@@ -6055,6 +6341,8 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
6055
6341
|
* integer into a `Duration`, treating the integer value as the duration in
|
|
6056
6342
|
* milliseconds.
|
|
6057
6343
|
*
|
|
6344
|
+
* **Details**
|
|
6345
|
+
*
|
|
6058
6346
|
* Decoding:
|
|
6059
6347
|
* - A non-negative (possibly infinite) integer representing milliseconds is
|
|
6060
6348
|
* decoded as a `Duration`
|
|
@@ -6079,7 +6367,9 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
6079
6367
|
/**
|
|
6080
6368
|
* A schema for `BigDecimal` values.
|
|
6081
6369
|
*
|
|
6082
|
-
* **
|
|
6370
|
+
* **Details**
|
|
6371
|
+
*
|
|
6372
|
+
* Default JSON serializer:
|
|
6083
6373
|
*
|
|
6084
6374
|
* - encodes `BigDecimal` as a `string`
|
|
6085
6375
|
*
|
|
@@ -6100,6 +6390,8 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
6100
6390
|
/**
|
|
6101
6391
|
* A transformation schema that parses a string into a `BigDecimal`.
|
|
6102
6392
|
*
|
|
6393
|
+
* **Details**
|
|
6394
|
+
*
|
|
6103
6395
|
* Decoding:
|
|
6104
6396
|
* - A `string` is decoded as a `BigDecimal`.
|
|
6105
6397
|
*
|
|
@@ -6123,6 +6415,8 @@ export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
|
6123
6415
|
/**
|
|
6124
6416
|
* A transformation schema that decodes a JSON-encoded string into an `unknown` value.
|
|
6125
6417
|
*
|
|
6418
|
+
* **Details**
|
|
6419
|
+
*
|
|
6126
6420
|
* Decoding:
|
|
6127
6421
|
* - A `string` is decoded as an `unknown` value.
|
|
6128
6422
|
* - If the string is not valid JSON, decoding fails.
|
|
@@ -6158,12 +6452,20 @@ export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
|
6158
6452
|
* Returns a schema that decodes a JSON string and then decodes the parsed value
|
|
6159
6453
|
* using the given schema.
|
|
6160
6454
|
*
|
|
6455
|
+
* **Details**
|
|
6456
|
+
*
|
|
6161
6457
|
* This is useful when working with JSON-encoded strings where the actual
|
|
6162
6458
|
* structure of the value is known and described by an existing schema.
|
|
6163
6459
|
*
|
|
6164
6460
|
* The resulting schema first parses the input string as JSON, and then runs the
|
|
6165
6461
|
* provided schema on the parsed result.
|
|
6166
6462
|
*
|
|
6463
|
+
* JSON Schema generation:
|
|
6464
|
+
*
|
|
6465
|
+
* When using `fromJsonString` with `draft-2020-12` or `openApi3.1`, the
|
|
6466
|
+
* resulting schema will be a JSON Schema with a `contentSchema` property that
|
|
6467
|
+
* contains the JSON Schema for the given schema.
|
|
6468
|
+
*
|
|
6167
6469
|
* **Example** (Decoding JSON strings with a schema)
|
|
6168
6470
|
*
|
|
6169
6471
|
* ```ts
|
|
@@ -6176,12 +6478,6 @@ export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
|
6176
6478
|
* // => { a: 1 }
|
|
6177
6479
|
* ```
|
|
6178
6480
|
*
|
|
6179
|
-
* **Json Schema Generation**
|
|
6180
|
-
*
|
|
6181
|
-
* When using `fromJsonString` with `draft-2020-12` or `openApi3.1`, the
|
|
6182
|
-
* resulting schema will be a JSON Schema with a `contentSchema` property that
|
|
6183
|
-
* contains the JSON Schema for the given schema.
|
|
6184
|
-
*
|
|
6185
6481
|
* **Example** (Emitting JSON Schema for a JSON string decoder)
|
|
6186
6482
|
*
|
|
6187
6483
|
* ```ts
|
|
@@ -6231,6 +6527,8 @@ export interface File extends instanceOf<globalThis.File> {
|
|
|
6231
6527
|
/**
|
|
6232
6528
|
* Schema for JavaScript `File` objects.
|
|
6233
6529
|
*
|
|
6530
|
+
* **Details**
|
|
6531
|
+
*
|
|
6234
6532
|
* The default JSON serializer encodes a `File` as `{ data, type, name, lastModified }`
|
|
6235
6533
|
* where `data` is base64-encoded.
|
|
6236
6534
|
*
|
|
@@ -6250,6 +6548,8 @@ export interface FormData extends instanceOf<globalThis.FormData> {
|
|
|
6250
6548
|
/**
|
|
6251
6549
|
* Schema for JavaScript `FormData` objects.
|
|
6252
6550
|
*
|
|
6551
|
+
* **Details**
|
|
6552
|
+
*
|
|
6253
6553
|
* The default JSON serializer encodes a `FormData` as an array of `[key, entry]`
|
|
6254
6554
|
* pairs where each entry is tagged as `"String"` or `"File"`.
|
|
6255
6555
|
*
|
|
@@ -6272,11 +6572,20 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
6272
6572
|
* converts it into a tree record using bracket notation, and then decodes the
|
|
6273
6573
|
* resulting structure using the provided schema.
|
|
6274
6574
|
*
|
|
6575
|
+
* **Details**
|
|
6576
|
+
*
|
|
6275
6577
|
* The decoding process has two steps:
|
|
6276
6578
|
*
|
|
6277
6579
|
* 1. Parse `FormData` into a nested tree record.
|
|
6278
6580
|
* 2. Decode the parsed value with the given schema.
|
|
6279
6581
|
*
|
|
6582
|
+
* You can express nested values using bracket notation.
|
|
6583
|
+
*
|
|
6584
|
+
* If you want to decode values that are not strings, use
|
|
6585
|
+
* `Schema.toCodecStringTree` with the `keepDeclarations: true` option.
|
|
6586
|
+
* This serializer preserves values such as numbers and `Blob` objects when
|
|
6587
|
+
* compatible with the schema.
|
|
6588
|
+
*
|
|
6280
6589
|
* **Example** (Decoding a flat structure)
|
|
6281
6590
|
*
|
|
6282
6591
|
* ```ts
|
|
@@ -6296,8 +6605,6 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
6296
6605
|
* // Success({"a":"1"})
|
|
6297
6606
|
* ```
|
|
6298
6607
|
*
|
|
6299
|
-
* You can express nested values using bracket notation.
|
|
6300
|
-
*
|
|
6301
6608
|
* **Example** (Nested fields)
|
|
6302
6609
|
*
|
|
6303
6610
|
* ```ts
|
|
@@ -6322,11 +6629,6 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
6322
6629
|
* // Success({"a":"1","b":{"c":"2","d":"3"}})
|
|
6323
6630
|
* ```
|
|
6324
6631
|
*
|
|
6325
|
-
* If you want to decode values that are not strings, use
|
|
6326
|
-
* `Schema.toCodecStringTree` with the `keepDeclarations: true` option.
|
|
6327
|
-
* This serializer preserves values such as numbers and `Blob` objects when
|
|
6328
|
-
* compatible with the schema.
|
|
6329
|
-
*
|
|
6330
6632
|
* **Example** (Parsing non-string values)
|
|
6331
6633
|
*
|
|
6332
6634
|
* ```ts
|
|
@@ -6365,6 +6667,8 @@ export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams>
|
|
|
6365
6667
|
/**
|
|
6366
6668
|
* Schema for JavaScript `URLSearchParams` objects.
|
|
6367
6669
|
*
|
|
6670
|
+
* **Details**
|
|
6671
|
+
*
|
|
6368
6672
|
* The default JSON serializer encodes a `URLSearchParams` as a query string.
|
|
6369
6673
|
*
|
|
6370
6674
|
* @category URLSearchParams
|
|
@@ -6386,11 +6690,19 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
6386
6690
|
* instance, converts it into a tree record using bracket notation, and then
|
|
6387
6691
|
* decodes the resulting structure using the provided schema.
|
|
6388
6692
|
*
|
|
6693
|
+
* **Details**
|
|
6694
|
+
*
|
|
6389
6695
|
* The decoding process has two steps:
|
|
6390
6696
|
*
|
|
6391
6697
|
* 1. Parse `URLSearchParams` into a nested tree record.
|
|
6392
6698
|
* 2. Decode the parsed value with the given schema.
|
|
6393
6699
|
*
|
|
6700
|
+
* You can express nested values using bracket notation.
|
|
6701
|
+
*
|
|
6702
|
+
* If you want to decode values that are not strings, use
|
|
6703
|
+
* `Schema.toCodecStringTree`. This serializer preserves values such as
|
|
6704
|
+
* numbers when compatible with the schema.
|
|
6705
|
+
*
|
|
6394
6706
|
* **Example** (Decoding a flat structure)
|
|
6395
6707
|
*
|
|
6396
6708
|
* ```ts
|
|
@@ -6407,7 +6719,6 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
6407
6719
|
* console.log(String(Schema.decodeUnknownExit(schema)(urlSearchParams)))
|
|
6408
6720
|
* // Success({"a":"1"})
|
|
6409
6721
|
* ```
|
|
6410
|
-
* You can express nested values using bracket notation.
|
|
6411
6722
|
*
|
|
6412
6723
|
* **Example** (Nested fields)
|
|
6413
6724
|
*
|
|
@@ -6430,10 +6741,6 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
6430
6741
|
* // Success({"a":"1","b":{"c":"2","d":"3"}})
|
|
6431
6742
|
* ```
|
|
6432
6743
|
*
|
|
6433
|
-
* If you want to decode values that are not strings, use
|
|
6434
|
-
* `Schema.toCodecStringTree`. This serializer preserves values such as
|
|
6435
|
-
* numbers when compatible with the schema.
|
|
6436
|
-
*
|
|
6437
6744
|
* **Example** (Parsing non-string values)
|
|
6438
6745
|
*
|
|
6439
6746
|
* ```ts
|
|
@@ -6505,12 +6812,14 @@ export interface NumberFromString extends decodeTo<Finite, String> {
|
|
|
6505
6812
|
* A transformation schema that parses a string into a `number` using JavaScript
|
|
6506
6813
|
* number coercion.
|
|
6507
6814
|
*
|
|
6508
|
-
* **
|
|
6815
|
+
* **Details**
|
|
6816
|
+
*
|
|
6817
|
+
* Decoding:
|
|
6509
6818
|
* A `string` is decoded as a number, including possible non-finite values such as
|
|
6510
6819
|
* `NaN`, `Infinity`, and `-Infinity`. Use `FiniteFromString` to reject non-finite
|
|
6511
6820
|
* numbers.
|
|
6512
6821
|
*
|
|
6513
|
-
*
|
|
6822
|
+
* Encoding:
|
|
6514
6823
|
* A number is encoded as a `string`.
|
|
6515
6824
|
*
|
|
6516
6825
|
* @category Number
|
|
@@ -6530,6 +6839,8 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
6530
6839
|
/**
|
|
6531
6840
|
* A transformation schema that parses a string into a finite number.
|
|
6532
6841
|
*
|
|
6842
|
+
* **Details**
|
|
6843
|
+
*
|
|
6533
6844
|
* Decoding:
|
|
6534
6845
|
* - A `string` is decoded as a finite number, rejecting `NaN`, `Infinity`, and
|
|
6535
6846
|
* `-Infinity` values.
|
|
@@ -6554,6 +6865,8 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
6554
6865
|
/**
|
|
6555
6866
|
* A transformation schema that parses a string into a `bigint`.
|
|
6556
6867
|
*
|
|
6868
|
+
* **Details**
|
|
6869
|
+
*
|
|
6557
6870
|
* Decoding:
|
|
6558
6871
|
* - A `string` is decoded as a `bigint`.
|
|
6559
6872
|
*
|
|
@@ -6594,6 +6907,8 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
6594
6907
|
/**
|
|
6595
6908
|
* A transformation schema that trims whitespace from a string.
|
|
6596
6909
|
*
|
|
6910
|
+
* **Details**
|
|
6911
|
+
*
|
|
6597
6912
|
* Decoding:
|
|
6598
6913
|
* - A `string` is decoded as a string with no leading or trailing whitespaces.
|
|
6599
6914
|
*
|
|
@@ -6617,6 +6932,8 @@ export interface StringFromBase64 extends decodeTo<String, String> {
|
|
|
6617
6932
|
/**
|
|
6618
6933
|
* Decodes a base64 (RFC4648) encoded string into a UTF-8 string.
|
|
6619
6934
|
*
|
|
6935
|
+
* **Details**
|
|
6936
|
+
*
|
|
6620
6937
|
* Decoding:
|
|
6621
6938
|
* - A **valid** base64 encoded string is decoded as a UTF-8 `string`.
|
|
6622
6939
|
*
|
|
@@ -6640,6 +6957,8 @@ export interface StringFromBase64Url extends decodeTo<String, String> {
|
|
|
6640
6957
|
/**
|
|
6641
6958
|
* Decodes a base64 (URL) encoded string into a UTF-8 string.
|
|
6642
6959
|
*
|
|
6960
|
+
* **Details**
|
|
6961
|
+
*
|
|
6643
6962
|
* Decoding:
|
|
6644
6963
|
* - A **valid** base64 (URL) encoded string is decoded as a UTF-8 `string`.
|
|
6645
6964
|
*
|
|
@@ -6663,6 +6982,8 @@ export interface StringFromHex extends decodeTo<String, String> {
|
|
|
6663
6982
|
/**
|
|
6664
6983
|
* Decodes a hex encoded string into a UTF-8 string.
|
|
6665
6984
|
*
|
|
6985
|
+
* **Details**
|
|
6986
|
+
*
|
|
6666
6987
|
* Decoding:
|
|
6667
6988
|
* - A **valid** hex encoded string is decoded as a UTF-8 `string`.
|
|
6668
6989
|
*
|
|
@@ -6687,6 +7008,8 @@ export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
|
6687
7008
|
* Decodes a URI component encoded string into a UTF-8 string.
|
|
6688
7009
|
* Can be used to store data in a URL.
|
|
6689
7010
|
*
|
|
7011
|
+
* **Details**
|
|
7012
|
+
*
|
|
6690
7013
|
* Decoding:
|
|
6691
7014
|
* - A **valid** URI component encoded string is decoded as a UTF-8 `string`.
|
|
6692
7015
|
*
|
|
@@ -6726,6 +7049,8 @@ export declare const PropertyKey: Union<readonly [Finite, Symbol, String]>;
|
|
|
6726
7049
|
/**
|
|
6727
7050
|
* Schema for a Standard Schema v1 failure result.
|
|
6728
7051
|
*
|
|
7052
|
+
* **Details**
|
|
7053
|
+
*
|
|
6729
7054
|
* The result contains an `issues` array where each issue has a message and an
|
|
6730
7055
|
* optional path made of property keys or keyed path segments.
|
|
6731
7056
|
*
|
|
@@ -6770,7 +7095,9 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
6770
7095
|
/**
|
|
6771
7096
|
* A schema for JavaScript `Uint8Array` objects.
|
|
6772
7097
|
*
|
|
6773
|
-
* **
|
|
7098
|
+
* **Details**
|
|
7099
|
+
*
|
|
7100
|
+
* Default JSON serializer:
|
|
6774
7101
|
*
|
|
6775
7102
|
* The default JSON serializer encodes Uint8Array as a Base64 encoded string.
|
|
6776
7103
|
*
|
|
@@ -6792,6 +7119,8 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
6792
7119
|
* A transformation schema that decodes a base64 encoded string into a
|
|
6793
7120
|
* `Uint8Array`.
|
|
6794
7121
|
*
|
|
7122
|
+
* **Details**
|
|
7123
|
+
*
|
|
6795
7124
|
* Decoding:
|
|
6796
7125
|
* - A **valid** base64 encoded string is decoded as a `Uint8Array`.
|
|
6797
7126
|
*
|
|
@@ -6816,6 +7145,8 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
6816
7145
|
* A transformation schema that decodes a base64 (URL) encoded string into a
|
|
6817
7146
|
* `Uint8Array`.
|
|
6818
7147
|
*
|
|
7148
|
+
* **Details**
|
|
7149
|
+
*
|
|
6819
7150
|
* Decoding:
|
|
6820
7151
|
* - A **valid** base64 (URL) encoded string is decoded as a `Uint8Array`.
|
|
6821
7152
|
*
|
|
@@ -6840,6 +7171,8 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
6840
7171
|
* A transformation schema that decodes a hex encoded string into a
|
|
6841
7172
|
* `Uint8Array`.
|
|
6842
7173
|
*
|
|
7174
|
+
* **Details**
|
|
7175
|
+
*
|
|
6843
7176
|
* Decoding:
|
|
6844
7177
|
* - A **valid** hex encoded string is decoded as a `Uint8Array`.
|
|
6845
7178
|
*
|
|
@@ -6863,7 +7196,9 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
6863
7196
|
/**
|
|
6864
7197
|
* A schema for `DateTime.Utc` values.
|
|
6865
7198
|
*
|
|
6866
|
-
* **
|
|
7199
|
+
* **Details**
|
|
7200
|
+
*
|
|
7201
|
+
* Default JSON serializer:
|
|
6867
7202
|
*
|
|
6868
7203
|
* - encodes `DateTime.Utc` as a UTC ISO string
|
|
6869
7204
|
*
|
|
@@ -6884,6 +7219,8 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
6884
7219
|
/**
|
|
6885
7220
|
* A transformation schema that decodes a `Date` into a `DateTime.Utc`.
|
|
6886
7221
|
*
|
|
7222
|
+
* **Details**
|
|
7223
|
+
*
|
|
6887
7224
|
* Decoding:
|
|
6888
7225
|
* - A **valid** `Date` is decoded as a `DateTime.Utc`
|
|
6889
7226
|
*
|
|
@@ -6907,6 +7244,8 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
6907
7244
|
/**
|
|
6908
7245
|
* A transformation schema that decodes a date-time string into a `DateTime.Utc`.
|
|
6909
7246
|
*
|
|
7247
|
+
* **Details**
|
|
7248
|
+
*
|
|
6910
7249
|
* Decoding:
|
|
6911
7250
|
*
|
|
6912
7251
|
* - A string accepted by `DateTime.make` is parsed and normalized to UTC. Strings
|
|
@@ -6933,6 +7272,8 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
6933
7272
|
/**
|
|
6934
7273
|
* A transformation schema that decodes a number into a `DateTime.Utc`.
|
|
6935
7274
|
*
|
|
7275
|
+
* **Details**
|
|
7276
|
+
*
|
|
6936
7277
|
* Decoding:
|
|
6937
7278
|
* - A number of milliseconds since the Unix epoch is decoded as a `DateTime.Utc`
|
|
6938
7279
|
*
|
|
@@ -6956,7 +7297,9 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
6956
7297
|
/**
|
|
6957
7298
|
* A schema for `DateTime.TimeZone.Offset` values.
|
|
6958
7299
|
*
|
|
6959
|
-
* **
|
|
7300
|
+
* **Details**
|
|
7301
|
+
*
|
|
7302
|
+
* Default JSON serializer:
|
|
6960
7303
|
*
|
|
6961
7304
|
* - encodes `DateTime.TimeZone.Offset` as a number (offset in milliseconds)
|
|
6962
7305
|
*
|
|
@@ -6977,7 +7320,9 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
6977
7320
|
/**
|
|
6978
7321
|
* A schema for `DateTime.TimeZone.Named` values.
|
|
6979
7322
|
*
|
|
6980
|
-
* **
|
|
7323
|
+
* **Details**
|
|
7324
|
+
*
|
|
7325
|
+
* Default JSON serializer:
|
|
6981
7326
|
*
|
|
6982
7327
|
* - encodes `DateTime.TimeZone.Named` as a string (IANA time zone identifier)
|
|
6983
7328
|
*
|
|
@@ -6998,6 +7343,8 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
6998
7343
|
/**
|
|
6999
7344
|
* A transformation schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
7000
7345
|
*
|
|
7346
|
+
* **Details**
|
|
7347
|
+
*
|
|
7001
7348
|
* Decoding:
|
|
7002
7349
|
* - A `string` is decoded as a `DateTime.TimeZone.Named`.
|
|
7003
7350
|
*
|
|
@@ -7021,7 +7368,9 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
7021
7368
|
/**
|
|
7022
7369
|
* A schema for `DateTime.TimeZone` values.
|
|
7023
7370
|
*
|
|
7024
|
-
* **
|
|
7371
|
+
* **Details**
|
|
7372
|
+
*
|
|
7373
|
+
* Default JSON serializer:
|
|
7025
7374
|
*
|
|
7026
7375
|
* - encodes `DateTime.TimeZone` as a string (IANA identifier or offset like
|
|
7027
7376
|
* `+03:00`)
|
|
@@ -7043,6 +7392,8 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
7043
7392
|
/**
|
|
7044
7393
|
* A transformation schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
7045
7394
|
*
|
|
7395
|
+
* **Details**
|
|
7396
|
+
*
|
|
7046
7397
|
* Decoding:
|
|
7047
7398
|
* - A `string` (IANA identifier or offset like `+03:00`) is decoded as a `DateTime.TimeZone`.
|
|
7048
7399
|
*
|
|
@@ -7066,7 +7417,9 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
7066
7417
|
/**
|
|
7067
7418
|
* A schema for `DateTime.Zoned` values.
|
|
7068
7419
|
*
|
|
7069
|
-
* **
|
|
7420
|
+
* **Details**
|
|
7421
|
+
*
|
|
7422
|
+
* Default JSON serializer:
|
|
7070
7423
|
*
|
|
7071
7424
|
* - encodes offset zones as an ISO date-time with a numeric offset, such as
|
|
7072
7425
|
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM`
|
|
@@ -7090,6 +7443,8 @@ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String>
|
|
|
7090
7443
|
/**
|
|
7091
7444
|
* A transformation schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
7092
7445
|
*
|
|
7446
|
+
* **Details**
|
|
7447
|
+
*
|
|
7093
7448
|
* Decoding:
|
|
7094
7449
|
* - A `string` (e.g. `2024-01-01T00:00:00.000+00:00[Europe/London]`) is decoded as a `DateTime.Zoned`.
|
|
7095
7450
|
*
|
|
@@ -7103,6 +7458,8 @@ export declare const DateTimeZonedFromString: DateTimeZonedFromString;
|
|
|
7103
7458
|
/**
|
|
7104
7459
|
* Interface for schema-backed classes created with {@link Class}.
|
|
7105
7460
|
*
|
|
7461
|
+
* **Details**
|
|
7462
|
+
*
|
|
7106
7463
|
* A `Class` is a TypeScript class whose constructor validates its input
|
|
7107
7464
|
* against a {@link Struct} schema. Instances are always structurally valid.
|
|
7108
7465
|
*
|
|
@@ -7121,7 +7478,9 @@ export interface Class<Self, S extends Top & {
|
|
|
7121
7478
|
/**
|
|
7122
7479
|
* Returns a new struct with the fields modified by the provided function.
|
|
7123
7480
|
*
|
|
7124
|
-
* **
|
|
7481
|
+
* **Details**
|
|
7482
|
+
*
|
|
7483
|
+
* Options:
|
|
7125
7484
|
*
|
|
7126
7485
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
7127
7486
|
* that were attached to the original struct. Defaults to `false`.
|
|
@@ -7144,6 +7503,8 @@ type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use
|
|
|
7144
7503
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7145
7504
|
* input (unless `disableChecks` is set in the options).
|
|
7146
7505
|
*
|
|
7506
|
+
* **Details**
|
|
7507
|
+
*
|
|
7147
7508
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7148
7509
|
* type parameter can be used to add nominal brands.
|
|
7149
7510
|
*
|
|
@@ -7189,6 +7550,8 @@ export declare const Class: {
|
|
|
7189
7550
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7190
7551
|
* input (unless `disableChecks` is set in the options).
|
|
7191
7552
|
*
|
|
7553
|
+
* **Details**
|
|
7554
|
+
*
|
|
7192
7555
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7193
7556
|
* type parameter can be used to add nominal brands.
|
|
7194
7557
|
*
|
|
@@ -7234,6 +7597,8 @@ export declare const Class: {
|
|
|
7234
7597
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7235
7598
|
* input (unless `disableChecks` is set in the options).
|
|
7236
7599
|
*
|
|
7600
|
+
* **Details**
|
|
7601
|
+
*
|
|
7237
7602
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7238
7603
|
* type parameter can be used to add nominal brands.
|
|
7239
7604
|
*
|
|
@@ -7279,6 +7644,8 @@ export declare const Class: {
|
|
|
7279
7644
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7280
7645
|
* input (unless `disableChecks` is set in the options).
|
|
7281
7646
|
*
|
|
7647
|
+
* **Details**
|
|
7648
|
+
*
|
|
7282
7649
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7283
7650
|
* type parameter can be used to add nominal brands.
|
|
7284
7651
|
*
|
|
@@ -7326,6 +7693,8 @@ export declare const Class: {
|
|
|
7326
7693
|
* given `tag` value. This makes instances compatible with tagged union
|
|
7327
7694
|
* discrimination patterns.
|
|
7328
7695
|
*
|
|
7696
|
+
* **Details**
|
|
7697
|
+
*
|
|
7329
7698
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
7330
7699
|
* it defaults to the `tag` value.
|
|
7331
7700
|
*
|
|
@@ -7352,6 +7721,8 @@ export declare const TaggedClass: {
|
|
|
7352
7721
|
* given `tag` value. This makes instances compatible with tagged union
|
|
7353
7722
|
* discrimination patterns.
|
|
7354
7723
|
*
|
|
7724
|
+
* **Details**
|
|
7725
|
+
*
|
|
7355
7726
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
7356
7727
|
* it defaults to the `tag` value.
|
|
7357
7728
|
*
|
|
@@ -7378,6 +7749,8 @@ export declare const TaggedClass: {
|
|
|
7378
7749
|
* given `tag` value. This makes instances compatible with tagged union
|
|
7379
7750
|
* discrimination patterns.
|
|
7380
7751
|
*
|
|
7752
|
+
* **Details**
|
|
7753
|
+
*
|
|
7381
7754
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
7382
7755
|
* it defaults to the `tag` value.
|
|
7383
7756
|
*
|
|
@@ -7404,6 +7777,8 @@ export declare const TaggedClass: {
|
|
|
7404
7777
|
* given `tag` value. This makes instances compatible with tagged union
|
|
7405
7778
|
* discrimination patterns.
|
|
7406
7779
|
*
|
|
7780
|
+
* **Details**
|
|
7781
|
+
*
|
|
7407
7782
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
7408
7783
|
* it defaults to the `tag` value.
|
|
7409
7784
|
*
|
|
@@ -7640,6 +8015,8 @@ export type LazyArbitrary<T> = (fc: typeof FastCheck) => FastCheck.Arbitrary<T>;
|
|
|
7640
8015
|
* Derives a {@link LazyArbitrary} from a schema. The result is memoized so
|
|
7641
8016
|
* repeated calls with the same schema are cheap.
|
|
7642
8017
|
*
|
|
8018
|
+
* **Details**
|
|
8019
|
+
*
|
|
7643
8020
|
* Prefer {@link toArbitrary} when you just need the arbitrary directly.
|
|
7644
8021
|
*
|
|
7645
8022
|
* @category Arbitrary
|
|
@@ -7672,6 +8049,8 @@ export declare function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitra
|
|
|
7672
8049
|
/**
|
|
7673
8050
|
* Annotates a schema with a custom formatter used by `toFormatter`.
|
|
7674
8051
|
*
|
|
8052
|
+
* **Details**
|
|
8053
|
+
*
|
|
7675
8054
|
* Use this when the formatter derived from the schema structure is not suitable.
|
|
7676
8055
|
* The annotation is applied through this helper because adding it directly to
|
|
7677
8056
|
* `Annotations.Bottom` would make schemas invariant.
|
|
@@ -7685,6 +8064,8 @@ export declare function overrideToFormatter<S extends Top>(toFormatter: () => Fo
|
|
|
7685
8064
|
* a value to its human-readable string representation, recursing into structs,
|
|
7686
8065
|
* arrays, and unions.
|
|
7687
8066
|
*
|
|
8067
|
+
* **Details**
|
|
8068
|
+
*
|
|
7688
8069
|
* The optional `onBefore` hook lets you intercept specific AST nodes before
|
|
7689
8070
|
* the default formatting logic runs.
|
|
7690
8071
|
*
|
|
@@ -7743,6 +8124,8 @@ export interface ToJsonSchemaOptions {
|
|
|
7743
8124
|
* Controls how additional properties are handled while resolving the JSON
|
|
7744
8125
|
* schema.
|
|
7745
8126
|
*
|
|
8127
|
+
* **Details**
|
|
8128
|
+
*
|
|
7746
8129
|
* Possible values include:
|
|
7747
8130
|
* - `false`: Disallow additional properties (default)
|
|
7748
8131
|
* - `true`: Allow additional properties
|
|
@@ -7758,6 +8141,8 @@ export interface ToJsonSchemaOptions {
|
|
|
7758
8141
|
/**
|
|
7759
8142
|
* Returns a JSON Schema document using draft 2020-12.
|
|
7760
8143
|
*
|
|
8144
|
+
* **Details**
|
|
8145
|
+
*
|
|
7761
8146
|
* The `options` parameter controls generation details such as additional
|
|
7762
8147
|
* properties and synthesized check descriptions; it does not change the draft
|
|
7763
8148
|
* target.
|
|
@@ -7794,10 +8179,12 @@ export type StringTree = Tree<string | undefined>;
|
|
|
7794
8179
|
* The StringTree canonical codec converts **every leaf value to a string**, while
|
|
7795
8180
|
* preserving the original structure.
|
|
7796
8181
|
*
|
|
8182
|
+
* **Details**
|
|
8183
|
+
*
|
|
7797
8184
|
* Declarations are converted to `undefined` (unless they have a
|
|
7798
8185
|
* `toCodecJson` or `toCodec` annotation).
|
|
7799
8186
|
*
|
|
7800
|
-
*
|
|
8187
|
+
* Options:
|
|
7801
8188
|
*
|
|
7802
8189
|
* - `keepDeclarations`: if `true`, it **does not** convert declarations to
|
|
7803
8190
|
* `undefined` but instead keeps them as they are (unless they have a
|
|
@@ -7827,6 +8214,8 @@ type XmlEncoderOptions = {
|
|
|
7827
8214
|
/**
|
|
7828
8215
|
* Derives an XML encoder from a codec.
|
|
7829
8216
|
*
|
|
8217
|
+
* **Details**
|
|
8218
|
+
*
|
|
7830
8219
|
* The returned function encodes a value through `toCodecStringTree` and returns
|
|
7831
8220
|
* an `Effect` that succeeds with the XML string or fails with `SchemaError` if
|
|
7832
8221
|
* codec encoding fails.
|
|
@@ -8017,6 +8406,8 @@ export declare function resolveAnnotationsKey<S extends Top>(schema: S): Annotat
|
|
|
8017
8406
|
* metadata to schemas. Annotations control documentation, validation messages,
|
|
8018
8407
|
* JSON Schema generation, equivalence, arbitrary generation, and more.
|
|
8019
8408
|
*
|
|
8409
|
+
* **Details**
|
|
8410
|
+
*
|
|
8020
8411
|
* Use {@link resolveAnnotations} to read the annotations attached to a schema at
|
|
8021
8412
|
* runtime.
|
|
8022
8413
|
*
|
|
@@ -8027,6 +8418,8 @@ export declare namespace Annotations {
|
|
|
8027
8418
|
* This interface is used to define the annotations that can be attached to a
|
|
8028
8419
|
* schema. You can extend this interface to define your own annotations.
|
|
8029
8420
|
*
|
|
8421
|
+
* **Details**
|
|
8422
|
+
*
|
|
8030
8423
|
* Note that both a missing key or `undefined` is used to indicate that the
|
|
8031
8424
|
* annotation is not present.
|
|
8032
8425
|
*
|
|
@@ -8078,6 +8471,8 @@ export declare namespace Annotations {
|
|
|
8078
8471
|
/**
|
|
8079
8472
|
* Human-readable description of what a value is expected to satisfy.
|
|
8080
8473
|
*
|
|
8474
|
+
* **Details**
|
|
8475
|
+
*
|
|
8081
8476
|
* For filter and refinement failures, the default formatter uses
|
|
8082
8477
|
* `message` first, then `expected`, and finally falls back to `<filter>`.
|
|
8083
8478
|
*
|
|
@@ -8131,6 +8526,8 @@ export declare namespace Annotations {
|
|
|
8131
8526
|
/**
|
|
8132
8527
|
* Complete message to use when this schema node reports an issue.
|
|
8133
8528
|
*
|
|
8529
|
+
* **Details**
|
|
8530
|
+
*
|
|
8134
8531
|
* This replaces the default message for matching issue types instead of
|
|
8135
8532
|
* only changing the expected label. For a filter or refinement failure,
|
|
8136
8533
|
* annotate the filter with `message` to replace the whole filter failure
|
|
@@ -8145,6 +8542,8 @@ export declare namespace Annotations {
|
|
|
8145
8542
|
/**
|
|
8146
8543
|
* Stable identifier for this schema node.
|
|
8147
8544
|
*
|
|
8545
|
+
* **Details**
|
|
8546
|
+
*
|
|
8148
8547
|
* Identifiers are used by schema tooling, including JSON Schema
|
|
8149
8548
|
* generation, to name references. The default formatter also uses
|
|
8150
8549
|
* `identifier` as the expected label for type-level failures, such as
|
|
@@ -8232,6 +8631,8 @@ export declare namespace Annotations {
|
|
|
8232
8631
|
/**
|
|
8233
8632
|
* Complete message to use when this filter or refinement fails.
|
|
8234
8633
|
*
|
|
8634
|
+
* **Details**
|
|
8635
|
+
*
|
|
8235
8636
|
* The default formatter checks filter annotations in this order:
|
|
8236
8637
|
* `message`, then `expected`, then `<filter>`.
|
|
8237
8638
|
*/
|
|
@@ -8239,6 +8640,8 @@ export declare namespace Annotations {
|
|
|
8239
8640
|
/**
|
|
8240
8641
|
* Stable identifier for the schema after this filter is attached.
|
|
8241
8642
|
*
|
|
8643
|
+
* **Details**
|
|
8644
|
+
*
|
|
8242
8645
|
* This can affect schema tooling such as JSON Schema generation and
|
|
8243
8646
|
* type-level failures before the filter runs, but it does not name the
|
|
8244
8647
|
* failed filter itself. For filter failure messages, use `expected` or
|
|
@@ -8255,6 +8658,8 @@ export declare namespace Annotations {
|
|
|
8255
8658
|
* structure of the container (e.g., array length, object keys) rather than
|
|
8256
8659
|
* the contents.
|
|
8257
8660
|
*
|
|
8661
|
+
* **Details**
|
|
8662
|
+
*
|
|
8258
8663
|
* Example: `minLength` on an array is a structural filter.
|
|
8259
8664
|
*/
|
|
8260
8665
|
readonly "~structural"?: boolean | undefined;
|
|
@@ -8348,6 +8753,8 @@ export declare namespace Annotations {
|
|
|
8348
8753
|
/**
|
|
8349
8754
|
* Hook signature for declaration schema arbitrary annotations.
|
|
8350
8755
|
*
|
|
8756
|
+
* **Details**
|
|
8757
|
+
*
|
|
8351
8758
|
* Given arbitraries for any type parameters, returns a function that receives the
|
|
8352
8759
|
* fast-check module and derivation context and produces an arbitrary for `T`.
|
|
8353
8760
|
*
|
|
@@ -8370,6 +8777,8 @@ export declare namespace Annotations {
|
|
|
8370
8777
|
/**
|
|
8371
8778
|
* Hook signature for declaration schema formatter annotations.
|
|
8372
8779
|
*
|
|
8780
|
+
* **Details**
|
|
8781
|
+
*
|
|
8373
8782
|
* Given formatters for any type parameters, returns a formatter for `T`.
|
|
8374
8783
|
*
|
|
8375
8784
|
* @category models
|
|
@@ -8391,6 +8800,8 @@ export declare namespace Annotations {
|
|
|
8391
8800
|
/**
|
|
8392
8801
|
* Hook signature for declaration schema equivalence annotations.
|
|
8393
8802
|
*
|
|
8803
|
+
* **Details**
|
|
8804
|
+
*
|
|
8394
8805
|
* Given equivalences for any type parameters, returns an `Equivalence` for `T`.
|
|
8395
8806
|
*
|
|
8396
8807
|
* @category models
|
|
@@ -8405,6 +8816,8 @@ export declare namespace Annotations {
|
|
|
8405
8816
|
/**
|
|
8406
8817
|
* Annotations that can be attached to schema issues.
|
|
8407
8818
|
*
|
|
8819
|
+
* **Details**
|
|
8820
|
+
*
|
|
8408
8821
|
* The optional `message` field overrides the default issue message.
|
|
8409
8822
|
*
|
|
8410
8823
|
* @category models
|
|
@@ -8416,6 +8829,8 @@ export declare namespace Annotations {
|
|
|
8416
8829
|
/**
|
|
8417
8830
|
* Registry of metadata payloads emitted by built-in schema filters and checks.
|
|
8418
8831
|
*
|
|
8832
|
+
* **Details**
|
|
8833
|
+
*
|
|
8419
8834
|
* Do not augment this interface with custom metadata; extend `MetaDefinitions`
|
|
8420
8835
|
* instead.
|
|
8421
8836
|
*
|
|
@@ -8630,6 +9045,8 @@ export declare namespace Annotations {
|
|
|
8630
9045
|
/**
|
|
8631
9046
|
* Augmentable registry of schema filter metadata payloads.
|
|
8632
9047
|
*
|
|
9048
|
+
* **Details**
|
|
9049
|
+
*
|
|
8633
9050
|
* Extend this interface to add custom values accepted by annotation `meta`
|
|
8634
9051
|
* fields.
|
|
8635
9052
|
*
|