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/src/Schema.ts
CHANGED
|
@@ -174,7 +174,8 @@ export type ConstructorDefault = "no-default" | "with-default"
|
|
|
174
174
|
/**
|
|
175
175
|
* Options for `makeEffect`, `make`, and Class constructors.
|
|
176
176
|
*
|
|
177
|
-
* When to use
|
|
177
|
+
* **When to use**
|
|
178
|
+
*
|
|
178
179
|
* - Pass `disableChecks: true` to skip validation when you trust the data.
|
|
179
180
|
* - Pass `parseOptions` to control error reporting behavior.
|
|
180
181
|
*
|
|
@@ -200,7 +201,8 @@ export interface MakeOptions {
|
|
|
200
201
|
* parameters controlling type inference, mutability, optionality, services,
|
|
201
202
|
* and transformation behavior.
|
|
202
203
|
*
|
|
203
|
-
* When to use
|
|
204
|
+
* **When to use**
|
|
205
|
+
*
|
|
204
206
|
* - You are writing advanced generic schema utilities or performing schema
|
|
205
207
|
* introspection.
|
|
206
208
|
* - In user code, prefer {@link Schema}, {@link Codec}, {@link Decoder}, or
|
|
@@ -290,6 +292,8 @@ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<T
|
|
|
290
292
|
* `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
|
|
291
293
|
* and a decoder factory.
|
|
292
294
|
*
|
|
295
|
+
* **Details**
|
|
296
|
+
*
|
|
293
297
|
* The outer call `declareConstructor<T, E, Iso>()` fixes the decoded type `T`,
|
|
294
298
|
* the encoded type `E`, and the optional iso type. The inner call receives:
|
|
295
299
|
* - `typeParameters` — the concrete schemas for each type variable
|
|
@@ -368,6 +372,8 @@ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [
|
|
|
368
372
|
* function. The schema accepts any unknown value and succeeds when `is` returns
|
|
369
373
|
* `true`, failing with an `InvalidType` issue otherwise.
|
|
370
374
|
*
|
|
375
|
+
* **Details**
|
|
376
|
+
*
|
|
371
377
|
* Use this when the type has no type parameters. For parametric types such as
|
|
372
378
|
* `Option<A>` or `Array<A>`, use {@link declareConstructor} instead.
|
|
373
379
|
*
|
|
@@ -410,6 +416,8 @@ export function declare<T, Iso = T>(
|
|
|
410
416
|
* Widens a schema's type to the fully-parameterized {@link Bottom} interface,
|
|
411
417
|
* making all 14 type parameters visible to TypeScript.
|
|
412
418
|
*
|
|
419
|
+
* **Details**
|
|
420
|
+
*
|
|
413
421
|
* Normally, concrete schema interfaces (e.g. `Schema<string>`) hide most type
|
|
414
422
|
* parameters. `revealBottom` is useful when writing generic utilities that need
|
|
415
423
|
* to inspect or propagate the complete set of type parameters.
|
|
@@ -459,6 +467,8 @@ export function revealBottom<S extends Top>(
|
|
|
459
467
|
* Adds metadata annotations to a schema without changing its runtime behavior.
|
|
460
468
|
* This is the pipeable (curried) counterpart of the `.annotate` method.
|
|
461
469
|
*
|
|
470
|
+
* **Details**
|
|
471
|
+
*
|
|
462
472
|
* Annotations provide extra context used by documentation generators, JSON
|
|
463
473
|
* Schema converters, error formatters, and other tooling. Common keys include
|
|
464
474
|
* `title`, `description`, `examples`, `message`, and `identifier`.
|
|
@@ -490,6 +500,8 @@ export function annotate<S extends Top>(annotations: Annotations.Bottom<S["Type"
|
|
|
490
500
|
* changing its runtime behavior. This is the encoded-side counterpart of
|
|
491
501
|
* `annotate`, which targets the decoded (Type) side.
|
|
492
502
|
*
|
|
503
|
+
* **Details**
|
|
504
|
+
*
|
|
493
505
|
* Internally the schema is flipped so that `Encoded` becomes `Type`,
|
|
494
506
|
* annotated, and then flipped back.
|
|
495
507
|
*
|
|
@@ -521,6 +533,8 @@ export function annotateEncoded<S extends Top>(annotations: Annotations.Bottom<S
|
|
|
521
533
|
* Adds key-level annotations to a schema field. This is the pipeable
|
|
522
534
|
* (curried) counterpart of the `.annotateKey` method.
|
|
523
535
|
*
|
|
536
|
+
* **Details**
|
|
537
|
+
*
|
|
524
538
|
* Key annotations apply to a field's position inside a `Struct` or `Tuple`
|
|
525
539
|
* rather than to the field's value type. They can carry a
|
|
526
540
|
* `messageMissingKey` to customise the error shown when the field is absent,
|
|
@@ -554,6 +568,8 @@ export function annotateKey<S extends Top>(annotations: Annotations.Key<S["Type"
|
|
|
554
568
|
/**
|
|
555
569
|
* The existential "any schema" type — all type parameters are erased to `unknown`.
|
|
556
570
|
*
|
|
571
|
+
* **Details**
|
|
572
|
+
*
|
|
557
573
|
* Use `Top` as a constraint when writing generic utilities that must accept *any*
|
|
558
574
|
* schema regardless of its `Type`, `Encoded`, or service requirements. It is the
|
|
559
575
|
* widest possible schema type and therefore gives you the least static information.
|
|
@@ -615,6 +631,8 @@ export declare namespace Schema {
|
|
|
615
631
|
/**
|
|
616
632
|
* A typed view of a schema that tracks only the decoded (output) type `T`.
|
|
617
633
|
*
|
|
634
|
+
* **Details**
|
|
635
|
+
*
|
|
618
636
|
* Use `Schema<T>` as a constraint when you want to accept "any schema that
|
|
619
637
|
* decodes to `T`" and do not need to know or constrain the encoded
|
|
620
638
|
* representation, required services, or any other type parameters.
|
|
@@ -707,6 +725,8 @@ export declare namespace Codec {
|
|
|
707
725
|
/**
|
|
708
726
|
* A schema that additionally supports optic (lens/prism) operations.
|
|
709
727
|
*
|
|
728
|
+
* **Details**
|
|
729
|
+
*
|
|
710
730
|
* `Optic<T, Iso>` extends {@link Schema}`<T>` with an `Iso` type that
|
|
711
731
|
* describes the isomorphic counterpart used by the optic layer. Crucially,
|
|
712
732
|
* decoding and encoding require *no* Effect services (`DecodingServices` and
|
|
@@ -731,6 +751,8 @@ export interface Optic<out T, out Iso> extends Schema<T> {
|
|
|
731
751
|
* A schema that tracks the decoded type `T`, the encoded type `E`, and the
|
|
732
752
|
* Effect services required during decoding (`RD`) and encoding (`RE`).
|
|
733
753
|
*
|
|
754
|
+
* **Details**
|
|
755
|
+
*
|
|
734
756
|
* Use `Codec<T, E, RD, RE>` when you need to preserve full type information
|
|
735
757
|
* about a schema — both what it decodes to and what it serializes from/to.
|
|
736
758
|
* Most concrete schemas produced by this module implement `Codec`.
|
|
@@ -768,6 +790,8 @@ export interface Codec<out T, out E = T, out RD = never, out RE = never> extends
|
|
|
768
790
|
/**
|
|
769
791
|
* A {@link Codec} view for APIs that only *decode* (parse/validate) values.
|
|
770
792
|
*
|
|
793
|
+
* **Details**
|
|
794
|
+
*
|
|
771
795
|
* Use `Decoder<T, RD>` to accept "any schema that can decode to `T`" without
|
|
772
796
|
* constraining or depending on the encoded representation (`Encoded` is
|
|
773
797
|
* `unknown`) or encoding services.
|
|
@@ -793,6 +817,8 @@ export interface Decoder<out T, out RD = never> extends Codec<T, unknown, RD, un
|
|
|
793
817
|
/**
|
|
794
818
|
* A {@link Codec} view for APIs that only *encode* values.
|
|
795
819
|
*
|
|
820
|
+
* **Details**
|
|
821
|
+
*
|
|
796
822
|
* Use `Encoder<E, RE>` to accept "any schema that can encode to `E`" without
|
|
797
823
|
* constraining or depending on the decoded `Type` (`Type` is `unknown`) or
|
|
798
824
|
* decoding services.
|
|
@@ -819,6 +845,8 @@ export interface Encoder<out E, out RE = never> extends Codec<unknown, E, unknow
|
|
|
819
845
|
* Identity function that widens a value to the full {@link Codec} interface,
|
|
820
846
|
* prompting TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`).
|
|
821
847
|
*
|
|
848
|
+
* **Details**
|
|
849
|
+
*
|
|
822
850
|
* When a schema is stored in a variable typed as `Schema<T>` or `Top`, the
|
|
823
851
|
* encoded type and service requirements are erased. Passing the value through
|
|
824
852
|
* `revealCodec` recovers those parameters without any runtime cost.
|
|
@@ -847,6 +875,8 @@ export {
|
|
|
847
875
|
* Error thrown (or returned as the error channel value) when schema decoding
|
|
848
876
|
* or encoding fails.
|
|
849
877
|
*
|
|
878
|
+
* **Details**
|
|
879
|
+
*
|
|
850
880
|
* The `issue` field contains a structured {@link Issue.Issue} tree describing
|
|
851
881
|
* every validation failure, including the path to the problematic value,
|
|
852
882
|
* expected types, and actual values received. `message` renders the issue tree
|
|
@@ -869,6 +899,7 @@ export {
|
|
|
869
899
|
* }
|
|
870
900
|
* ```
|
|
871
901
|
*
|
|
902
|
+
* @category errors
|
|
872
903
|
* @since 4.0.0
|
|
873
904
|
*/
|
|
874
905
|
SchemaError
|
|
@@ -908,6 +939,8 @@ function makeStandardResult<A>(exit: Exit_.Exit<StandardSchemaV1.Result<A>>): St
|
|
|
908
939
|
* Returns a "Standard Schema" object conforming to the [Standard Schema
|
|
909
940
|
* v1](https://standardschema.dev/) specification.
|
|
910
941
|
*
|
|
942
|
+
* **Details**
|
|
943
|
+
*
|
|
911
944
|
* This function creates a schema whose `validate` method attempts to decode and
|
|
912
945
|
* validate the provided input synchronously. If the underlying `Schema`
|
|
913
946
|
* includes any asynchronous components (e.g., asynchronous message resolutions
|
|
@@ -1037,6 +1070,8 @@ function toBaseStandardJSONSchemaV1(self: Top, target: StandardJSONSchemaV1.Targ
|
|
|
1037
1070
|
/**
|
|
1038
1071
|
* Experimental support for converting a schema to a Standard JSON Schema V1.
|
|
1039
1072
|
*
|
|
1073
|
+
* **Details**
|
|
1074
|
+
*
|
|
1040
1075
|
* https://github.com/standard-schema/standard-schema/pull/134
|
|
1041
1076
|
*
|
|
1042
1077
|
* @category Standard Schema
|
|
@@ -1071,6 +1106,8 @@ export function toStandardJSONSchemaV1<S extends Top>(self: S): StandardJSONSche
|
|
|
1071
1106
|
* Creates a type guard function that checks if a value conforms to a given
|
|
1072
1107
|
* schema.
|
|
1073
1108
|
*
|
|
1109
|
+
* **Details**
|
|
1110
|
+
*
|
|
1074
1111
|
* This function returns a predicate that performs a type-safe check, narrowing
|
|
1075
1112
|
* the type of the input value if the check passes. It's particularly useful for
|
|
1076
1113
|
* runtime type validation and TypeScript type narrowing.
|
|
@@ -1102,6 +1139,8 @@ export const is = Parser.is
|
|
|
1102
1139
|
* Creates an assertion function that throws an error if the input doesn't match
|
|
1103
1140
|
* the schema.
|
|
1104
1141
|
*
|
|
1142
|
+
* **Details**
|
|
1143
|
+
*
|
|
1105
1144
|
* This function is useful for runtime type checking with TypeScript's `asserts`
|
|
1106
1145
|
* type guard. It narrows the type of the input if the assertion succeeds, or
|
|
1107
1146
|
* throws an error if it fails.
|
|
@@ -1271,6 +1310,7 @@ export const decodeUnknownPromise = Parser.decodeUnknownPromise
|
|
|
1271
1310
|
* schema issue. For `unknown` input use `decodeUnknownPromise`.
|
|
1272
1311
|
*
|
|
1273
1312
|
* **Details**
|
|
1313
|
+
*
|
|
1274
1314
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1275
1315
|
* application options override creation options.
|
|
1276
1316
|
*
|
|
@@ -1286,6 +1326,7 @@ export const decodePromise = Parser.decodePromise
|
|
|
1286
1326
|
* mismatch as an exception. For typed input use `decodeSync`.
|
|
1287
1327
|
*
|
|
1288
1328
|
* **Details**
|
|
1329
|
+
*
|
|
1289
1330
|
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
1290
1331
|
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
1291
1332
|
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
@@ -1319,6 +1360,7 @@ export const decodeUnknownSync = Parser.decodeUnknownSync
|
|
|
1319
1360
|
* contains the schema issue. For `unknown` input use `decodeUnknownSync`.
|
|
1320
1361
|
*
|
|
1321
1362
|
* **Details**
|
|
1363
|
+
*
|
|
1322
1364
|
* Only service-free schemas can be decoded synchronously. Options may be
|
|
1323
1365
|
* provided either when creating the decoder or when applying it; application
|
|
1324
1366
|
* options override creation options.
|
|
@@ -1518,6 +1560,8 @@ export const encodeSync = Parser.encodeSync
|
|
|
1518
1560
|
/**
|
|
1519
1561
|
* Creates a schema from an AST (Abstract Syntax Tree) node.
|
|
1520
1562
|
*
|
|
1563
|
+
* **Details**
|
|
1564
|
+
*
|
|
1521
1565
|
* This is the fundamental constructor for all schemas in the Effect Schema
|
|
1522
1566
|
* library. It takes an AST node and wraps it in a fully-typed schema that
|
|
1523
1567
|
* preserves all type information and provides the complete schema API.
|
|
@@ -1663,7 +1707,10 @@ interface optionalLambda extends Lambda {
|
|
|
1663
1707
|
* Marks a struct field as optional, allowing the key to be absent or
|
|
1664
1708
|
* `undefined`.
|
|
1665
1709
|
*
|
|
1666
|
-
*
|
|
1710
|
+
* **Details**
|
|
1711
|
+
*
|
|
1712
|
+
* The resulting property may be absent or explicitly set to `undefined`.
|
|
1713
|
+
* Equivalent to `optionalKey(UndefinedOr(S))`.
|
|
1667
1714
|
*
|
|
1668
1715
|
* Use {@link optionalKey} instead if you want exact optional semantics (absent
|
|
1669
1716
|
* only, not `undefined`).
|
|
@@ -1956,6 +2003,7 @@ export declare namespace TemplateLiteral {
|
|
|
1956
2003
|
* Constraint for schema parts that can appear inside a `TemplateLiteral`.
|
|
1957
2004
|
*
|
|
1958
2005
|
* **Details**
|
|
2006
|
+
*
|
|
1959
2007
|
* The schema's encoded value must be a `string`, `number`, or `bigint` so it can
|
|
1960
2008
|
* be converted into a template literal string segment.
|
|
1961
2009
|
*
|
|
@@ -2065,6 +2113,7 @@ export declare namespace TemplateLiteralParser {
|
|
|
2065
2113
|
* Computes the decoded tuple type produced by `TemplateLiteralParser`.
|
|
2066
2114
|
*
|
|
2067
2115
|
* **Details**
|
|
2116
|
+
*
|
|
2068
2117
|
* Literal parts contribute their literal value to the tuple. Schema parts
|
|
2069
2118
|
* contribute their decoded `Type`.
|
|
2070
2119
|
*
|
|
@@ -2287,7 +2336,9 @@ export interface Number extends Bottom<number, number, never, never, AST.Number,
|
|
|
2287
2336
|
/**
|
|
2288
2337
|
* Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
|
|
2289
2338
|
*
|
|
2290
|
-
* **
|
|
2339
|
+
* **Details**
|
|
2340
|
+
*
|
|
2341
|
+
* Default JSON serializer:
|
|
2291
2342
|
*
|
|
2292
2343
|
* - Finite numbers are serialized as numbers.
|
|
2293
2344
|
* - Non-finite values are serialized as strings (`"NaN"`, `"Infinity"`, `"-Infinity"`).
|
|
@@ -2419,6 +2470,8 @@ export function UniqueSymbol<const sym extends symbol>(symbol: sym): UniqueSymbo
|
|
|
2419
2470
|
/**
|
|
2420
2471
|
* Namespace for struct field type utilities.
|
|
2421
2472
|
*
|
|
2473
|
+
* **Details**
|
|
2474
|
+
*
|
|
2422
2475
|
* These types compute the decoded `Type`, encoded `Encoded`, and constructor
|
|
2423
2476
|
* input `MakeIn` of a {@link Struct} from its field map, handling optional,
|
|
2424
2477
|
* mutable, and other field modifiers automatically.
|
|
@@ -2464,6 +2517,7 @@ export declare namespace Struct {
|
|
|
2464
2517
|
* Computes the decoded object type for a struct field map.
|
|
2465
2518
|
*
|
|
2466
2519
|
* **Details**
|
|
2520
|
+
*
|
|
2467
2521
|
* Field schemas contribute their decoded `Type`. `optionalKey` and `optional`
|
|
2468
2522
|
* produce optional properties, while `mutableKey` produces writable properties.
|
|
2469
2523
|
*
|
|
@@ -2487,6 +2541,7 @@ export declare namespace Struct {
|
|
|
2487
2541
|
* `Iso` type.
|
|
2488
2542
|
*
|
|
2489
2543
|
* **Details**
|
|
2544
|
+
*
|
|
2490
2545
|
* The resulting property optionality and mutability follow the same field
|
|
2491
2546
|
* modifiers used by `Struct.Type`.
|
|
2492
2547
|
*
|
|
@@ -2519,6 +2574,7 @@ export declare namespace Struct {
|
|
|
2519
2574
|
* Computes the encoded object type for a struct field map.
|
|
2520
2575
|
*
|
|
2521
2576
|
* **Details**
|
|
2577
|
+
*
|
|
2522
2578
|
* Field schemas contribute their `Encoded` type. Encoded-side optionality and
|
|
2523
2579
|
* mutability modifiers determine whether properties are optional or writable in
|
|
2524
2580
|
* the encoded shape.
|
|
@@ -2562,6 +2618,7 @@ export declare namespace Struct {
|
|
|
2562
2618
|
* Computes the input object type accepted when constructing a struct value.
|
|
2563
2619
|
*
|
|
2564
2620
|
* **Details**
|
|
2621
|
+
*
|
|
2565
2622
|
* Required fields use each field schema's `~type.make` input. Fields marked
|
|
2566
2623
|
* optional or with a constructor default may be omitted.
|
|
2567
2624
|
*
|
|
@@ -2576,6 +2633,7 @@ export declare namespace Struct {
|
|
|
2576
2633
|
* schema-defined fields.
|
|
2577
2634
|
*
|
|
2578
2635
|
* **Details**
|
|
2636
|
+
*
|
|
2579
2637
|
* The `fields` property exposes the original field map for reuse, and
|
|
2580
2638
|
* `mapFields` creates a new struct schema by transforming that field map.
|
|
2581
2639
|
*
|
|
@@ -2619,7 +2677,9 @@ export interface Struct<Fields extends Struct.Fields> extends
|
|
|
2619
2677
|
/**
|
|
2620
2678
|
* Returns a new struct with the fields modified by the provided function.
|
|
2621
2679
|
*
|
|
2622
|
-
* **
|
|
2680
|
+
* **Details**
|
|
2681
|
+
*
|
|
2682
|
+
* Options:
|
|
2623
2683
|
*
|
|
2624
2684
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
2625
2685
|
* that were attached to the original union. Defaults to `false`.
|
|
@@ -2657,6 +2717,8 @@ function makeStruct<const Fields extends Struct.Fields>(ast: AST.Objects, fields
|
|
|
2657
2717
|
/**
|
|
2658
2718
|
* Defines a struct schema from a map of field schemas.
|
|
2659
2719
|
*
|
|
2720
|
+
* **Details**
|
|
2721
|
+
*
|
|
2660
2722
|
* Each field value is a schema. Use {@link optionalKey} or {@link optional} to
|
|
2661
2723
|
* mark fields as optional, and {@link mutableKey} to mark them as mutable.
|
|
2662
2724
|
*
|
|
@@ -2747,6 +2809,8 @@ export interface encodeKeys<
|
|
|
2747
2809
|
/**
|
|
2748
2810
|
* Renames struct keys in the encoded form without changing the decoded type.
|
|
2749
2811
|
*
|
|
2812
|
+
* **Details**
|
|
2813
|
+
*
|
|
2750
2814
|
* Takes a partial mapping `{ decodedKey: encodedKey }` and produces a
|
|
2751
2815
|
* transformation schema that decodes from the renamed keys and encodes back to
|
|
2752
2816
|
* the renamed keys. Keys not present in the mapping are left unchanged.
|
|
@@ -2797,6 +2861,8 @@ export function encodeKeys<
|
|
|
2797
2861
|
/**
|
|
2798
2862
|
* Adds derived fields to a struct schema during decoding.
|
|
2799
2863
|
*
|
|
2864
|
+
* **Details**
|
|
2865
|
+
*
|
|
2800
2866
|
* Each new field is derived from the decoded struct value via a function that
|
|
2801
2867
|
* returns `Option`. On encoding the derived fields are stripped. This allows
|
|
2802
2868
|
* computed or enriched fields to live in the decoded type without appearing in
|
|
@@ -2863,6 +2929,8 @@ export function extendTo<S extends Struct<Struct.Fields>, const Fields extends S
|
|
|
2863
2929
|
/**
|
|
2864
2930
|
* Namespace for `Record` type utilities.
|
|
2865
2931
|
*
|
|
2932
|
+
* **Details**
|
|
2933
|
+
*
|
|
2866
2934
|
* - `Record.Key` — constraint for the key schema (must encode to `PropertyKey`)
|
|
2867
2935
|
* - `Record.Type<K, V>` — decoded type of the record
|
|
2868
2936
|
* - `Record.Encoded<K, V>` — encoded type of the record
|
|
@@ -2874,6 +2942,7 @@ export declare namespace Record {
|
|
|
2874
2942
|
* Constraint for schemas that can be used as record keys.
|
|
2875
2943
|
*
|
|
2876
2944
|
* **Details**
|
|
2945
|
+
*
|
|
2877
2946
|
* The key schema must decode and encode property keys (`string`, `number`, or
|
|
2878
2947
|
* `symbol`) so it can describe object property names.
|
|
2879
2948
|
*
|
|
@@ -2890,6 +2959,7 @@ export declare namespace Record {
|
|
|
2890
2959
|
* schemas.
|
|
2891
2960
|
*
|
|
2892
2961
|
* **Details**
|
|
2962
|
+
*
|
|
2893
2963
|
* The key schema supplies the property keys and the value schema supplies each
|
|
2894
2964
|
* property's decoded `Type`. Optional and mutable value schemas affect the
|
|
2895
2965
|
* resulting property optionality and writability.
|
|
@@ -2923,6 +2993,7 @@ export declare namespace Record {
|
|
|
2923
2993
|
* schemas' encoded types.
|
|
2924
2994
|
*
|
|
2925
2995
|
* **Details**
|
|
2996
|
+
*
|
|
2926
2997
|
* Encoded-side optionality and mutability on the value schema determine whether
|
|
2927
2998
|
* the encoded record properties are optional or writable.
|
|
2928
2999
|
*
|
|
@@ -2962,6 +3033,7 @@ export declare namespace Record {
|
|
|
2962
3033
|
* Computes the input object type accepted when constructing a record value.
|
|
2963
3034
|
*
|
|
2964
3035
|
* **Details**
|
|
3036
|
+
*
|
|
2965
3037
|
* Keys use the key schema's `~type.make` type and values use the value schema's
|
|
2966
3038
|
* `~type.make` type. Value optionality and mutability determine whether
|
|
2967
3039
|
* properties are optional or writable.
|
|
@@ -3040,6 +3112,8 @@ export function Record<Key extends Record.Key, Value extends Top>(
|
|
|
3040
3112
|
/**
|
|
3041
3113
|
* Namespace for `StructWithRest` type utilities.
|
|
3042
3114
|
*
|
|
3115
|
+
* **Details**
|
|
3116
|
+
*
|
|
3043
3117
|
* - `StructWithRest.Type<S, R>` — decoded type (struct type intersected with record types)
|
|
3044
3118
|
* - `StructWithRest.Encoded<S, R>` — encoded type
|
|
3045
3119
|
*
|
|
@@ -3196,6 +3270,8 @@ export function StructWithRest<
|
|
|
3196
3270
|
/**
|
|
3197
3271
|
* Namespace for `Tuple` type utilities.
|
|
3198
3272
|
*
|
|
3273
|
+
* **Details**
|
|
3274
|
+
*
|
|
3199
3275
|
* - `Tuple.Elements` — constraint for the element schema array
|
|
3200
3276
|
* - `Tuple.Type<E>` — decoded tuple type
|
|
3201
3277
|
* - `Tuple.Encoded<E>` — encoded tuple type
|
|
@@ -3227,6 +3303,7 @@ export declare namespace Tuple {
|
|
|
3227
3303
|
* Computes the decoded tuple type for a tuple element schema array.
|
|
3228
3304
|
*
|
|
3229
3305
|
* **Details**
|
|
3306
|
+
*
|
|
3230
3307
|
* Each element contributes its decoded `Type`; optional element schemas produce
|
|
3231
3308
|
* optional tuple positions.
|
|
3232
3309
|
*
|
|
@@ -3268,6 +3345,7 @@ export declare namespace Tuple {
|
|
|
3268
3345
|
* Computes the encoded tuple type for a tuple element schema array.
|
|
3269
3346
|
*
|
|
3270
3347
|
* **Details**
|
|
3348
|
+
*
|
|
3271
3349
|
* Each element contributes its `Encoded` type; encoded-side optional element
|
|
3272
3350
|
* schemas produce optional tuple positions.
|
|
3273
3351
|
*
|
|
@@ -3310,6 +3388,7 @@ export declare namespace Tuple {
|
|
|
3310
3388
|
* Computes the input tuple type accepted when constructing a tuple value.
|
|
3311
3389
|
*
|
|
3312
3390
|
* **Details**
|
|
3391
|
+
*
|
|
3313
3392
|
* Each element uses its `~type.make` input type. Optional elements and elements
|
|
3314
3393
|
* with constructor defaults produce optional tuple positions.
|
|
3315
3394
|
*
|
|
@@ -3341,7 +3420,9 @@ export interface Tuple<Elements extends Tuple.Elements> extends
|
|
|
3341
3420
|
/**
|
|
3342
3421
|
* Returns a new tuple with the elements modified by the provided function.
|
|
3343
3422
|
*
|
|
3344
|
-
* **
|
|
3423
|
+
* **Details**
|
|
3424
|
+
*
|
|
3425
|
+
* Options:
|
|
3345
3426
|
*
|
|
3346
3427
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
3347
3428
|
* that were attached to the original union. Defaults to `false`.
|
|
@@ -3401,6 +3482,8 @@ export function Tuple<const Elements extends ReadonlyArray<Top>>(elements: Eleme
|
|
|
3401
3482
|
/**
|
|
3402
3483
|
* Namespace for `TupleWithRest` type utilities.
|
|
3403
3484
|
*
|
|
3485
|
+
* **Details**
|
|
3486
|
+
*
|
|
3404
3487
|
* - `TupleWithRest.TupleType` — constraint for the leading tuple schema
|
|
3405
3488
|
* - `TupleWithRest.Rest` — the rest element schema(s)
|
|
3406
3489
|
* - `TupleWithRest.Type<T, R>` — decoded type (fixed elements + rest)
|
|
@@ -3428,6 +3511,7 @@ export declare namespace TupleWithRest {
|
|
|
3428
3511
|
* Non-empty list of schemas used for the rest portion of a `TupleWithRest`.
|
|
3429
3512
|
*
|
|
3430
3513
|
* **Details**
|
|
3514
|
+
*
|
|
3431
3515
|
* The first schema describes the repeated rest element. Additional schemas, when
|
|
3432
3516
|
* present, describe trailing tuple elements after the repeated rest segment.
|
|
3433
3517
|
*
|
|
@@ -3440,6 +3524,7 @@ export declare namespace TupleWithRest {
|
|
|
3440
3524
|
* Computes the decoded tuple type for a `TupleWithRest`.
|
|
3441
3525
|
*
|
|
3442
3526
|
* **Details**
|
|
3527
|
+
*
|
|
3443
3528
|
* The output starts with the fixed tuple elements, continues with zero or more
|
|
3444
3529
|
* values decoded by the first rest schema, and includes any trailing rest schemas
|
|
3445
3530
|
* as fixed tuple positions.
|
|
@@ -3459,6 +3544,7 @@ export declare namespace TupleWithRest {
|
|
|
3459
3544
|
* Computes the iso tuple type for a `TupleWithRest`.
|
|
3460
3545
|
*
|
|
3461
3546
|
* **Details**
|
|
3547
|
+
*
|
|
3462
3548
|
* The output starts with the fixed tuple's `Iso` elements, continues with zero
|
|
3463
3549
|
* or more values using the first rest schema's `Iso`, and includes any trailing
|
|
3464
3550
|
* rest schemas as fixed tuple positions.
|
|
@@ -3478,6 +3564,7 @@ export declare namespace TupleWithRest {
|
|
|
3478
3564
|
* Computes the encoded tuple type for `TupleWithRest`.
|
|
3479
3565
|
*
|
|
3480
3566
|
* **Details**
|
|
3567
|
+
*
|
|
3481
3568
|
* The leading tuple's encoded elements are kept first. The encoded type of the
|
|
3482
3569
|
* first rest schema may repeat zero or more times, and the encoded types of any
|
|
3483
3570
|
* additional rest schemas become required trailing tuple elements.
|
|
@@ -3497,6 +3584,7 @@ export declare namespace TupleWithRest {
|
|
|
3497
3584
|
* Computes the constructor input tuple type for `TupleWithRest`.
|
|
3498
3585
|
*
|
|
3499
3586
|
* **Details**
|
|
3587
|
+
*
|
|
3500
3588
|
* The leading tuple's make input elements are kept first. The make input type of
|
|
3501
3589
|
* the first rest schema may repeat zero or more times, and the make input types
|
|
3502
3590
|
* of any additional rest schemas become required trailing tuple elements.
|
|
@@ -3543,6 +3631,7 @@ export interface TupleWithRest<
|
|
|
3543
3631
|
* Extends a fixed-length tuple schema with a variadic rest segment.
|
|
3544
3632
|
*
|
|
3545
3633
|
* **Details**
|
|
3634
|
+
*
|
|
3546
3635
|
* The resulting tuple starts with the fixed elements from `schema`. The first
|
|
3547
3636
|
* schema in `rest` is the repeatable element schema, and any additional schemas
|
|
3548
3637
|
* in `rest` are required trailing tuple elements after the variadic segment. For
|
|
@@ -3579,6 +3668,7 @@ export function TupleWithRest<S extends Tuple<Tuple.Elements>, const Rest extend
|
|
|
3579
3668
|
* Schema interface produced by `Schema.Array` for readonly arrays.
|
|
3580
3669
|
*
|
|
3581
3670
|
* **Details**
|
|
3671
|
+
*
|
|
3582
3672
|
* The decoded type is `ReadonlyArray<S["Type"]>`, the encoded type is
|
|
3583
3673
|
* `ReadonlyArray<S["Encoded"]>`, and the element schema is available as
|
|
3584
3674
|
* `schema`.
|
|
@@ -3687,6 +3777,7 @@ export const NonEmptyArray = Struct_.lambda<NonEmptyArrayLambda>((schema) =>
|
|
|
3687
3777
|
* an array of items into a readonly array.
|
|
3688
3778
|
*
|
|
3689
3779
|
* **Details**
|
|
3780
|
+
*
|
|
3690
3781
|
* The schema decodes from `S` or `Schema.Array(S)` and produces
|
|
3691
3782
|
* `ReadonlyArray<S["Type"]>`.
|
|
3692
3783
|
*
|
|
@@ -3702,6 +3793,7 @@ export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>,
|
|
|
3702
3793
|
* decoded by `Schema.Array(schema)`, then returns an array.
|
|
3703
3794
|
*
|
|
3704
3795
|
* **Details**
|
|
3796
|
+
*
|
|
3705
3797
|
* The single-value branch is tried before the array branch. If `schema` itself
|
|
3706
3798
|
* accepts arrays, an array input can be treated as one value and wrapped in a
|
|
3707
3799
|
* one-element array.
|
|
@@ -3735,6 +3827,8 @@ export interface UniqueArray<S extends Top> extends $Array<S> {
|
|
|
3735
3827
|
/**
|
|
3736
3828
|
* Returns a new array schema that ensures all elements are unique.
|
|
3737
3829
|
*
|
|
3830
|
+
* **Details**
|
|
3831
|
+
*
|
|
3738
3832
|
* The equivalence used to determine uniqueness is the one provided by
|
|
3739
3833
|
* `Schema.toEquivalence(item)`.
|
|
3740
3834
|
*
|
|
@@ -3824,7 +3918,9 @@ export interface Union<Members extends ReadonlyArray<Top>> extends
|
|
|
3824
3918
|
/**
|
|
3825
3919
|
* Returns a new union with the members modified by the provided function.
|
|
3826
3920
|
*
|
|
3827
|
-
* **
|
|
3921
|
+
* **Details**
|
|
3922
|
+
*
|
|
3923
|
+
* Options:
|
|
3828
3924
|
*
|
|
3829
3925
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
3830
3926
|
* that were attached to the original union. Defaults to `false`.
|
|
@@ -3869,6 +3965,8 @@ function makeUnion<Members extends ReadonlyArray<Top>>(
|
|
|
3869
3965
|
* Creates a union schema from an array of member schemas. Members are tested in
|
|
3870
3966
|
* order; the first match is returned.
|
|
3871
3967
|
*
|
|
3968
|
+
* **Details**
|
|
3969
|
+
*
|
|
3872
3970
|
* Optionally, specify `mode`:
|
|
3873
3971
|
* - `"anyOf"` (default) — matches if any member matches.
|
|
3874
3972
|
* - `"oneOf"` — matches if exactly one member matches.
|
|
@@ -4004,6 +4102,7 @@ export const UndefinedOr = Struct_.lambda<UndefinedOrLambda>((self) => Union([se
|
|
|
4004
4102
|
|
|
4005
4103
|
/**
|
|
4006
4104
|
* Companion type for `S | null | undefined`. Produced by {@link NullishOr}.
|
|
4105
|
+
*
|
|
4007
4106
|
* @category models
|
|
4008
4107
|
* @since 3.10.0
|
|
4009
4108
|
*/
|
|
@@ -4018,6 +4117,7 @@ interface NullishOrLambda extends Lambda {
|
|
|
4018
4117
|
|
|
4019
4118
|
/**
|
|
4020
4119
|
* Creates a union schema of `S | null | undefined`.
|
|
4120
|
+
*
|
|
4021
4121
|
* @category constructors
|
|
4022
4122
|
* @since 3.10.0
|
|
4023
4123
|
*/
|
|
@@ -4025,6 +4125,7 @@ export const NullishOr = Struct_.lambda<NullishOrLambda>((self) => Union([self,
|
|
|
4025
4125
|
|
|
4026
4126
|
/**
|
|
4027
4127
|
* Schema type wrapping a lazily-evaluated schema. Produced by {@link suspend}.
|
|
4128
|
+
*
|
|
4028
4129
|
* @category models
|
|
4029
4130
|
* @since 3.10.0
|
|
4030
4131
|
*/
|
|
@@ -4130,6 +4231,8 @@ export interface refine<T extends S["Type"], S extends Top> extends
|
|
|
4130
4231
|
* Narrows the TypeScript type of a schema's output via a type guard predicate,
|
|
4131
4232
|
* attaching the guard as a runtime filter check.
|
|
4132
4233
|
*
|
|
4234
|
+
* **Details**
|
|
4235
|
+
*
|
|
4133
4236
|
* The `annotations` parameter annotates the filter created by the refinement.
|
|
4134
4237
|
* With the default formatter, failed refinements use `message` first,
|
|
4135
4238
|
* `expected` second, and `<filter>` when neither is provided. `identifier`
|
|
@@ -4209,6 +4312,8 @@ export function fromBrand<A extends Brand.Brand<any>>(identifier: string, ctor:
|
|
|
4209
4312
|
/**
|
|
4210
4313
|
* A schema that wraps another schema and intercepts its decoding pipeline.
|
|
4211
4314
|
*
|
|
4315
|
+
* **Details**
|
|
4316
|
+
*
|
|
4212
4317
|
* The interceptor receives the full decoding `Effect` and may replace, modify,
|
|
4213
4318
|
* or augment it — including adding service requirements via `RD`.
|
|
4214
4319
|
*
|
|
@@ -4241,6 +4346,8 @@ export interface middlewareDecoding<S extends Top, RD> extends
|
|
|
4241
4346
|
/**
|
|
4242
4347
|
* Intercepts the decoding pipeline of a schema.
|
|
4243
4348
|
*
|
|
4349
|
+
* **Details**
|
|
4350
|
+
*
|
|
4244
4351
|
* The provided function receives the current decoding `Effect` and `ParseOptions`,
|
|
4245
4352
|
* and returns a new `Effect` — potentially adding service requirements (`RD`),
|
|
4246
4353
|
* recovering from errors, or augmenting the result.
|
|
@@ -4277,6 +4384,8 @@ export function middlewareDecoding<S extends Top, RD>(
|
|
|
4277
4384
|
/**
|
|
4278
4385
|
* A schema that wraps another schema and intercepts its encoding pipeline.
|
|
4279
4386
|
*
|
|
4387
|
+
* **Details**
|
|
4388
|
+
*
|
|
4280
4389
|
* The interceptor receives the full encoding `Effect` and may replace, modify,
|
|
4281
4390
|
* or augment it — including adding service requirements via `RE`.
|
|
4282
4391
|
*
|
|
@@ -4309,6 +4418,8 @@ export interface middlewareEncoding<S extends Top, RE> extends
|
|
|
4309
4418
|
/**
|
|
4310
4419
|
* Intercepts the encoding pipeline of a schema.
|
|
4311
4420
|
*
|
|
4421
|
+
* **Details**
|
|
4422
|
+
*
|
|
4312
4423
|
* The provided function receives the current encoding `Effect` and `ParseOptions`,
|
|
4313
4424
|
* and returns a new `Effect` — potentially adding service requirements (`RE`),
|
|
4314
4425
|
* recovering from errors, or augmenting the result.
|
|
@@ -4345,6 +4456,8 @@ export function middlewareEncoding<S extends Top, RE>(
|
|
|
4345
4456
|
/**
|
|
4346
4457
|
* Recovers from a decoding error by providing a fallback value.
|
|
4347
4458
|
*
|
|
4459
|
+
* **Details**
|
|
4460
|
+
*
|
|
4348
4461
|
* The handler receives the `Issue` and returns an `Effect` that either
|
|
4349
4462
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
4350
4463
|
*
|
|
@@ -4384,6 +4497,8 @@ export function catchDecodingWithContext<S extends Top, R = never>(
|
|
|
4384
4497
|
/**
|
|
4385
4498
|
* Recovers from an encoding error by providing a fallback value.
|
|
4386
4499
|
*
|
|
4500
|
+
* **Details**
|
|
4501
|
+
*
|
|
4387
4502
|
* The handler receives the `Issue` and returns an `Effect` that either
|
|
4388
4503
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
4389
4504
|
*
|
|
@@ -4415,6 +4530,7 @@ export function catchEncodingWithContext<S extends Top, R = never>(
|
|
|
4415
4530
|
* `From` schema with a `To` schema.
|
|
4416
4531
|
*
|
|
4417
4532
|
* **Details**
|
|
4533
|
+
*
|
|
4418
4534
|
* `Type` is `To["Type"]` and `Encoded` is `From["Encoded"]`. Decoding services
|
|
4419
4535
|
* are `To["DecodingServices"] | From["DecodingServices"] | RD`; encoding
|
|
4420
4536
|
* services are `To["EncodingServices"] | From["EncodingServices"] | RE`.
|
|
@@ -4449,6 +4565,8 @@ export interface decodeTo<To extends Top, From extends Top, RD = never, RE = nev
|
|
|
4449
4565
|
/**
|
|
4450
4566
|
* The type produced by {@link decodeTo} when called without a custom transformation (passthrough composition).
|
|
4451
4567
|
*
|
|
4568
|
+
* **Details**
|
|
4569
|
+
*
|
|
4452
4570
|
* Equivalent to {@link decodeTo} with `RD = never` and `RE = never`, meaning the schemas
|
|
4453
4571
|
* are composed using their natural encoding/decoding chain.
|
|
4454
4572
|
*
|
|
@@ -4461,18 +4579,20 @@ export interface compose<To extends Top, From extends Top> extends decodeTo<To,
|
|
|
4461
4579
|
/**
|
|
4462
4580
|
* Creates a schema that transforms from a source schema to a target schema.
|
|
4463
4581
|
*
|
|
4582
|
+
* **Details**
|
|
4583
|
+
*
|
|
4464
4584
|
* This is a curried function: call it with the target schema `to` (and optionally a transformation),
|
|
4465
4585
|
* then call the returned function with the source schema `from`. The resulting schema decodes from
|
|
4466
4586
|
* `From["Encoded"]` to `To["Type"]` and encodes from `To["Type"]` back to `From["Encoded"]`.
|
|
4467
4587
|
*
|
|
4468
|
-
*
|
|
4588
|
+
* Key guarantees:
|
|
4469
4589
|
* - Resulting schema has `Type = To["Type"]` and `Encoded = From["Encoded"]`
|
|
4470
4590
|
* - When `transformation` is omitted, uses `Transformation.passthrough()` (schema composition)
|
|
4471
4591
|
* - Combines decoding/encoding services from both `from` and `to` schemas
|
|
4472
4592
|
* - Transformation `decode` maps `From["Type"]` → `To["Encoded"]` (used during encoding)
|
|
4473
4593
|
* - Transformation `encode` maps `To["Encoded"]` → `From["Type"]` (used during decoding)
|
|
4474
4594
|
*
|
|
4475
|
-
*
|
|
4595
|
+
* Common mistakes:
|
|
4476
4596
|
* - **Direction confusion**: Remember `to` is the target (what you decode TO), `from` is the source (what you decode FROM)
|
|
4477
4597
|
* - **Currying**: This is curried - must use pipe: `from.pipe(Schema.decodeTo(to))`
|
|
4478
4598
|
* - **Transformation direction**: `decode` goes `From["Type"]` → `To["Encoded"]`, `encode` goes `To["Encoded"]` → `From["Type"]`
|
|
@@ -4534,18 +4654,20 @@ export function decodeTo<To extends Top, From extends Top, RD = never, RE = neve
|
|
|
4534
4654
|
/**
|
|
4535
4655
|
* Applies a transformation to a schema, creating a new schema with the same type but transformed encoding/decoding.
|
|
4536
4656
|
*
|
|
4657
|
+
* **Details**
|
|
4658
|
+
*
|
|
4537
4659
|
* This is a curried function: call it with a transformation object, then call the returned function with a schema.
|
|
4538
4660
|
* The resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`, with the transformation applied during
|
|
4539
4661
|
* encoding and decoding operations.
|
|
4540
4662
|
*
|
|
4541
|
-
*
|
|
4663
|
+
* Key guarantees:
|
|
4542
4664
|
* - Resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`
|
|
4543
4665
|
* - Uses `toType(self)` as the target schema internally (creates a schema where both Type and Encoded are `S["Type"]`)
|
|
4544
4666
|
* - Combines decoding/encoding services from the source schema and transformation
|
|
4545
4667
|
* - Transformation `decode` maps `S["Type"]` → `S["Type"]` (used during encoding)
|
|
4546
4668
|
* - Transformation `encode` maps `S["Type"]` → `S["Type"]` (used during decoding)
|
|
4547
4669
|
*
|
|
4548
|
-
*
|
|
4670
|
+
* Common mistakes:
|
|
4549
4671
|
* - **Currying**: This is curried - must use pipe: `schema.pipe(Schema.decode(transformation))`
|
|
4550
4672
|
* - **Transformation direction**: `decode` and `encode` both operate on `S["Type"]` (same type, different values)
|
|
4551
4673
|
* - **Service dependencies**: Resulting schema requires services from the source schema and transformation; use `Schema.provideService` if needed
|
|
@@ -4582,6 +4704,8 @@ export function decode<S extends Top, RD = never, RE = never>(transformation: {
|
|
|
4582
4704
|
* Like {@link decodeTo} but reverses the direction: the `from` schema acts as the target (decoded type)
|
|
4583
4705
|
* and `to` acts as the encoded source.
|
|
4584
4706
|
*
|
|
4707
|
+
* **Details**
|
|
4708
|
+
*
|
|
4585
4709
|
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))` — useful when it reads more
|
|
4586
4710
|
* naturally to specify the encoded schema first.
|
|
4587
4711
|
*
|
|
@@ -4629,6 +4753,8 @@ export function encodeTo<To extends Top, From extends Top, RD = never, RE = neve
|
|
|
4629
4753
|
* Applies a transformation to a schema's encoded type, creating a new schema where encoding/decoding
|
|
4630
4754
|
* operate on `S["Encoded"]` rather than `S["Type"]`.
|
|
4631
4755
|
*
|
|
4756
|
+
* **Details**
|
|
4757
|
+
*
|
|
4632
4758
|
* The `decode` getter maps `S["Encoded"]` → `S["Encoded"]` (applied during decoding),
|
|
4633
4759
|
* and the `encode` getter maps `S["Encoded"]` → `S["Encoded"]` (applied during encoding).
|
|
4634
4760
|
*
|
|
@@ -4660,6 +4786,8 @@ export function encode<S extends Top, RD = never, RE = never>(transformation: {
|
|
|
4660
4786
|
/**
|
|
4661
4787
|
* Constraint used to ensure a schema field does not already have a constructor default.
|
|
4662
4788
|
*
|
|
4789
|
+
* **Details**
|
|
4790
|
+
*
|
|
4663
4791
|
* Only schemas that satisfy this constraint can be passed to {@link withConstructorDefault}.
|
|
4664
4792
|
*
|
|
4665
4793
|
* @category models
|
|
@@ -4674,6 +4802,7 @@ export interface WithoutConstructorDefault {
|
|
|
4674
4802
|
* by constructor helpers.
|
|
4675
4803
|
*
|
|
4676
4804
|
* **Details**
|
|
4805
|
+
*
|
|
4677
4806
|
* The default affects `make` and related constructor helpers only; decoding and
|
|
4678
4807
|
* encoding still use the original schema behavior. The schema is marked as
|
|
4679
4808
|
* already having a constructor default so another constructor default cannot be
|
|
@@ -4708,6 +4837,8 @@ export interface withConstructorDefault<S extends Top & WithoutConstructorDefaul
|
|
|
4708
4837
|
/**
|
|
4709
4838
|
* Attaches a constructor default value to a schema field.
|
|
4710
4839
|
*
|
|
4840
|
+
* **Details**
|
|
4841
|
+
*
|
|
4711
4842
|
* Constructor defaults are applied only during `make*`, not during decoding or
|
|
4712
4843
|
* encoding.
|
|
4713
4844
|
*
|
|
@@ -4754,6 +4885,8 @@ export interface withDecodingDefaultKey<S extends Top, R = never> extends decode
|
|
|
4754
4885
|
/**
|
|
4755
4886
|
* Options for {@link withDecodingDefaultKey} and {@link withDecodingDefault}.
|
|
4756
4887
|
*
|
|
4888
|
+
* **Details**
|
|
4889
|
+
*
|
|
4757
4890
|
* - `encodingStrategy`:
|
|
4758
4891
|
* - `"passthrough"` (default): pass the value through during encoding
|
|
4759
4892
|
* - `"omit"`: omit the key from the encoded output
|
|
@@ -4769,11 +4902,13 @@ export type DecodingDefaultOptions = {
|
|
|
4769
4902
|
* Makes a struct key optional on the `Encoded` side and provides a default
|
|
4770
4903
|
* `Encoded` value when the key is missing during decoding.
|
|
4771
4904
|
*
|
|
4905
|
+
* **Details**
|
|
4906
|
+
*
|
|
4772
4907
|
* The key uses `optionalKey` on the encoded side, so it may be absent from the
|
|
4773
4908
|
* input object but **not** `undefined`. The default value is specified in terms
|
|
4774
4909
|
* of the `Encoded` type (before any decoding transformations).
|
|
4775
4910
|
*
|
|
4776
|
-
*
|
|
4911
|
+
* Options:
|
|
4777
4912
|
*
|
|
4778
4913
|
* - `encodingStrategy`:
|
|
4779
4914
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -4830,11 +4965,13 @@ export interface withDecodingDefaultTypeKey<S extends Top, R = never>
|
|
|
4830
4965
|
* key may be absent but **not** `undefined`) and provides a default `Type`
|
|
4831
4966
|
* value when the key is missing during decoding.
|
|
4832
4967
|
*
|
|
4968
|
+
* **Details**
|
|
4969
|
+
*
|
|
4833
4970
|
* Unlike {@link withDecodingDefaultKey}, the default value is specified in
|
|
4834
4971
|
* terms of the `Type` (decoded) representation, so it does not need to go
|
|
4835
4972
|
* through the decoding transformation.
|
|
4836
4973
|
*
|
|
4837
|
-
*
|
|
4974
|
+
* Options:
|
|
4838
4975
|
*
|
|
4839
4976
|
* - `encodingStrategy`:
|
|
4840
4977
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -4874,10 +5011,12 @@ export interface withDecodingDefault<S extends Top, R = never> extends decodeTo<
|
|
|
4874
5011
|
* and provides a default `Encoded` value when the field is missing or
|
|
4875
5012
|
* `undefined` during decoding.
|
|
4876
5013
|
*
|
|
5014
|
+
* **Details**
|
|
5015
|
+
*
|
|
4877
5016
|
* The default value is specified in terms of the `Encoded` type (before any
|
|
4878
5017
|
* decoding transformations).
|
|
4879
5018
|
*
|
|
4880
|
-
*
|
|
5019
|
+
* Options:
|
|
4881
5020
|
*
|
|
4882
5021
|
* - `encodingStrategy`:
|
|
4883
5022
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -4934,11 +5073,13 @@ export interface withDecodingDefaultType<S extends Top, R = never>
|
|
|
4934
5073
|
* and provides a default `Type` value when the field is missing or
|
|
4935
5074
|
* `undefined` during decoding.
|
|
4936
5075
|
*
|
|
5076
|
+
* **Details**
|
|
5077
|
+
*
|
|
4937
5078
|
* Unlike {@link withDecodingDefault}, the default value is specified in terms
|
|
4938
5079
|
* of the `Type` (decoded) representation, so it does not need to go through
|
|
4939
5080
|
* the decoding transformation.
|
|
4940
5081
|
*
|
|
4941
|
-
*
|
|
5082
|
+
* Options:
|
|
4942
5083
|
*
|
|
4943
5084
|
* - `encodingStrategy`:
|
|
4944
5085
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -4964,6 +5105,8 @@ export function withDecodingDefaultType<S extends Top, R = never>(
|
|
|
4964
5105
|
/**
|
|
4965
5106
|
* The type produced by {@link tag} — a literal schema with a constructor default.
|
|
4966
5107
|
*
|
|
5108
|
+
* **Details**
|
|
5109
|
+
*
|
|
4967
5110
|
* Used as the type of the `_tag` field in {@link TaggedStruct} and related helpers.
|
|
4968
5111
|
*
|
|
4969
5112
|
* @see {@link tag} for the constructor
|
|
@@ -5042,6 +5185,8 @@ export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fie
|
|
|
5042
5185
|
* to identify the specific variant of the object, which is especially useful
|
|
5043
5186
|
* when working with union types.
|
|
5044
5187
|
*
|
|
5188
|
+
* **Details**
|
|
5189
|
+
*
|
|
5045
5190
|
* When using the `make` method, the `_tag` field is optional and will be
|
|
5046
5191
|
* added automatically. However, when decoding or encoding, the `_tag` field
|
|
5047
5192
|
* must be present in the input.
|
|
@@ -5408,6 +5553,7 @@ export function link<T>() {
|
|
|
5408
5553
|
* Creates a custom validation filter from a predicate function.
|
|
5409
5554
|
*
|
|
5410
5555
|
* **Details**
|
|
5556
|
+
*
|
|
5411
5557
|
* The predicate receives the decoded input value, the schema AST, and parse
|
|
5412
5558
|
* options, and returns a `FilterOutput`. Non-success outputs are normalized into
|
|
5413
5559
|
* schema issues. The `annotations` parameter annotates the filter itself; with
|
|
@@ -5471,6 +5617,8 @@ export const makeFilter: <T>(
|
|
|
5471
5617
|
* A single failure reported by a filter predicate. Used as the element type
|
|
5472
5618
|
* of the array arm of {@link FilterOutput}, and also accepted on its own.
|
|
5473
5619
|
*
|
|
5620
|
+
* **Details**
|
|
5621
|
+
*
|
|
5474
5622
|
* - `string`: failure with that string as the message. Produces an
|
|
5475
5623
|
* {@link Issue.InvalidValue} wrapping the input, with the string used as
|
|
5476
5624
|
* the issue's `message` annotation.
|
|
@@ -5491,6 +5639,8 @@ export type FilterIssue = string | Issue.Issue | {
|
|
|
5491
5639
|
/**
|
|
5492
5640
|
* The value a filter predicate (see {@link makeFilter}) may return.
|
|
5493
5641
|
*
|
|
5642
|
+
* **Details**
|
|
5643
|
+
*
|
|
5494
5644
|
* Each shape is normalized into an {@link Issue.Issue} (or `undefined` for
|
|
5495
5645
|
* success) before being attached to the parse result:
|
|
5496
5646
|
*
|
|
@@ -5534,12 +5684,14 @@ const TRIMMED_PATTERN = "^\\S[\\s\\S]*\\S$|^\\S$|^$"
|
|
|
5534
5684
|
/**
|
|
5535
5685
|
* Validates that a string has no leading or trailing whitespace.
|
|
5536
5686
|
*
|
|
5537
|
-
* **
|
|
5687
|
+
* **Details**
|
|
5688
|
+
*
|
|
5689
|
+
* JSON Schema:
|
|
5538
5690
|
*
|
|
5539
5691
|
* This check corresponds to a `pattern` constraint in JSON Schema that
|
|
5540
5692
|
* matches strings without leading or trailing whitespace.
|
|
5541
5693
|
*
|
|
5542
|
-
*
|
|
5694
|
+
* Arbitrary:
|
|
5543
5695
|
*
|
|
5544
5696
|
* When generating test data with fast-check, this applies a `patterns`
|
|
5545
5697
|
* constraint to ensure generated strings match the trimmed pattern.
|
|
@@ -5569,11 +5721,13 @@ export function isTrimmed(annotations?: Annotations.Filter) {
|
|
|
5569
5721
|
/**
|
|
5570
5722
|
* Validates that a string matches the specified regular expression pattern.
|
|
5571
5723
|
*
|
|
5572
|
-
* **
|
|
5724
|
+
* **Details**
|
|
5725
|
+
*
|
|
5726
|
+
* JSON Schema:
|
|
5573
5727
|
*
|
|
5574
5728
|
* This check corresponds to the `pattern` constraint in JSON Schema.
|
|
5575
5729
|
*
|
|
5576
|
-
*
|
|
5730
|
+
* Arbitrary:
|
|
5577
5731
|
*
|
|
5578
5732
|
* When generating test data with fast-check, this applies a `patterns`
|
|
5579
5733
|
* constraint to ensure generated strings match the specified RegExp pattern.
|
|
@@ -5587,12 +5741,14 @@ export const isPattern: (regExp: globalThis.RegExp, annotations?: Annotations.Fi
|
|
|
5587
5741
|
/**
|
|
5588
5742
|
* Validates that a string represents a finite number.
|
|
5589
5743
|
*
|
|
5590
|
-
* **
|
|
5744
|
+
* **Details**
|
|
5745
|
+
*
|
|
5746
|
+
* JSON Schema:
|
|
5591
5747
|
*
|
|
5592
5748
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
5593
5749
|
* strings representing finite numbers.
|
|
5594
5750
|
*
|
|
5595
|
-
*
|
|
5751
|
+
* Arbitrary:
|
|
5596
5752
|
*
|
|
5597
5753
|
* When generating test data with fast-check, this applies a `patterns`
|
|
5598
5754
|
* constraint to ensure generated strings match the number string pattern.
|
|
@@ -5607,11 +5763,12 @@ export const isStringFinite: (annotations?: Annotations.Filter) => AST.Filter<st
|
|
|
5607
5763
|
* BigInt string encoding.
|
|
5608
5764
|
*
|
|
5609
5765
|
* **Details**
|
|
5766
|
+
*
|
|
5610
5767
|
* The check uses the pattern `^-?\d+$`. It does not accept leading `+`, decimal
|
|
5611
5768
|
* points, exponent notation, separators, or non-decimal inputs such as
|
|
5612
5769
|
* hexadecimal strings.
|
|
5613
5770
|
*
|
|
5614
|
-
*
|
|
5771
|
+
* JSON Schema:
|
|
5615
5772
|
* This check corresponds to a `pattern` constraint with the same signed
|
|
5616
5773
|
* base-10 integer pattern.
|
|
5617
5774
|
*
|
|
@@ -5625,6 +5782,7 @@ export const isStringBigInt: (annotations?: Annotations.Filter) => AST.Filter<st
|
|
|
5625
5782
|
* symbol string encoding.
|
|
5626
5783
|
*
|
|
5627
5784
|
* **Details**
|
|
5785
|
+
*
|
|
5628
5786
|
* The check uses the pattern `^Symbol\((.*)\)$`. It is not a general test for
|
|
5629
5787
|
* whether a string can be passed to JavaScript's `Symbol()` function.
|
|
5630
5788
|
*
|
|
@@ -5652,12 +5810,14 @@ const getUUIDRegExp = (version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8): globalThis.RegE
|
|
|
5652
5810
|
* Optionally specify a version (1-8) to validate against a specific UUID version.
|
|
5653
5811
|
* If no version is specified (`undefined`), all versions are supported.
|
|
5654
5812
|
*
|
|
5655
|
-
* **
|
|
5813
|
+
* **Details**
|
|
5814
|
+
*
|
|
5815
|
+
* JSON Schema:
|
|
5656
5816
|
*
|
|
5657
5817
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
5658
5818
|
* UUID format, and includes a `format: "uuid"` annotation.
|
|
5659
5819
|
*
|
|
5660
|
-
*
|
|
5820
|
+
* Arbitrary:
|
|
5661
5821
|
*
|
|
5662
5822
|
* When generating test data with fast-check, this applies a `patterns`
|
|
5663
5823
|
* constraint to ensure generated strings match the UUID pattern.
|
|
@@ -5685,12 +5845,14 @@ export function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotations?: An
|
|
|
5685
5845
|
* Validates that a string is a valid ULID (Universally Unique Lexicographically
|
|
5686
5846
|
* Sortable Identifier).
|
|
5687
5847
|
*
|
|
5688
|
-
* **
|
|
5848
|
+
* **Details**
|
|
5849
|
+
*
|
|
5850
|
+
* JSON Schema:
|
|
5689
5851
|
*
|
|
5690
5852
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
5691
5853
|
* the ULID format.
|
|
5692
5854
|
*
|
|
5693
|
-
*
|
|
5855
|
+
* Arbitrary:
|
|
5694
5856
|
*
|
|
5695
5857
|
* When generating test data with fast-check, this applies a `patterns`
|
|
5696
5858
|
* constraint to ensure generated strings match the ULID pattern.
|
|
@@ -5715,12 +5877,14 @@ export function isULID(annotations?: Annotations.Filter) {
|
|
|
5715
5877
|
/**
|
|
5716
5878
|
* Validates that a string is valid Base64 encoded data.
|
|
5717
5879
|
*
|
|
5718
|
-
* **
|
|
5880
|
+
* **Details**
|
|
5881
|
+
*
|
|
5882
|
+
* JSON Schema:
|
|
5719
5883
|
*
|
|
5720
5884
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
5721
5885
|
* Base64 format.
|
|
5722
5886
|
*
|
|
5723
|
-
*
|
|
5887
|
+
* Arbitrary:
|
|
5724
5888
|
*
|
|
5725
5889
|
* When generating test data with fast-check, this applies a `patterns`
|
|
5726
5890
|
* constraint to ensure generated strings match the Base64 pattern.
|
|
@@ -5747,12 +5911,14 @@ export function isBase64(annotations?: Annotations.Filter) {
|
|
|
5747
5911
|
* Validates that a string is valid Base64URL encoded data (Base64 with URL-safe
|
|
5748
5912
|
* characters).
|
|
5749
5913
|
*
|
|
5750
|
-
* **
|
|
5914
|
+
* **Details**
|
|
5915
|
+
*
|
|
5916
|
+
* JSON Schema:
|
|
5751
5917
|
*
|
|
5752
5918
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
5753
5919
|
* Base64URL format.
|
|
5754
5920
|
*
|
|
5755
|
-
*
|
|
5921
|
+
* Arbitrary:
|
|
5756
5922
|
*
|
|
5757
5923
|
* When generating test data with fast-check, this applies a `patterns`
|
|
5758
5924
|
* constraint to ensure generated strings match the Base64URL pattern.
|
|
@@ -5778,7 +5944,9 @@ export function isBase64Url(annotations?: Annotations.Filter) {
|
|
|
5778
5944
|
/**
|
|
5779
5945
|
* Validates at runtime that a string starts with the specified literal prefix.
|
|
5780
5946
|
*
|
|
5781
|
-
* **
|
|
5947
|
+
* **Details**
|
|
5948
|
+
*
|
|
5949
|
+
* Notes:
|
|
5782
5950
|
* The JSON Schema and arbitrary metadata are built from `^${startsWith}` without
|
|
5783
5951
|
* escaping regexp metacharacters. If the prefix contains regexp syntax, generated
|
|
5784
5952
|
* patterns may not be equivalent to the runtime `startsWith` check.
|
|
@@ -5810,7 +5978,9 @@ export function isStartsWith(startsWith: string, annotations?: Annotations.Filte
|
|
|
5810
5978
|
/**
|
|
5811
5979
|
* Validates at runtime that a string ends with the specified literal suffix.
|
|
5812
5980
|
*
|
|
5813
|
-
* **
|
|
5981
|
+
* **Details**
|
|
5982
|
+
*
|
|
5983
|
+
* Notes:
|
|
5814
5984
|
* The JSON Schema and arbitrary metadata are built from `${endsWith}$` without
|
|
5815
5985
|
* escaping regexp metacharacters. If the suffix contains regexp syntax, generated
|
|
5816
5986
|
* patterns may not be equivalent to the runtime `endsWith` check.
|
|
@@ -5842,7 +6012,9 @@ export function isEndsWith(endsWith: string, annotations?: Annotations.Filter) {
|
|
|
5842
6012
|
/**
|
|
5843
6013
|
* Validates at runtime that a string contains the specified literal substring.
|
|
5844
6014
|
*
|
|
5845
|
-
* **
|
|
6015
|
+
* **Details**
|
|
6016
|
+
*
|
|
6017
|
+
* Notes:
|
|
5846
6018
|
* The JSON Schema and arbitrary metadata use the substring as a raw regexp
|
|
5847
6019
|
* pattern. If the substring contains regexp syntax, generated patterns may not be
|
|
5848
6020
|
* equivalent to the runtime `includes` check.
|
|
@@ -5877,6 +6049,7 @@ const UPPERCASED_PATTERN = "^[^a-z]*$"
|
|
|
5877
6049
|
* Validates that a string is unchanged by JavaScript's `toUpperCase()`.
|
|
5878
6050
|
*
|
|
5879
6051
|
* **Details**
|
|
6052
|
+
*
|
|
5880
6053
|
* This accepts empty strings and characters that do not have lowercase forms,
|
|
5881
6054
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
5882
6055
|
* change when uppercased.
|
|
@@ -5909,6 +6082,7 @@ const LOWERCASED_PATTERN = "^[^A-Z]*$"
|
|
|
5909
6082
|
* Validates that a string is unchanged by JavaScript's `toLowerCase()`.
|
|
5910
6083
|
*
|
|
5911
6084
|
* **Details**
|
|
6085
|
+
*
|
|
5912
6086
|
* This accepts empty strings and characters that do not have uppercase forms,
|
|
5913
6087
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
5914
6088
|
* change when lowercased.
|
|
@@ -5942,6 +6116,7 @@ const CAPITALIZED_PATTERN = "^[^a-z]?.*$"
|
|
|
5942
6116
|
* `toUpperCase()`.
|
|
5943
6117
|
*
|
|
5944
6118
|
* **Details**
|
|
6119
|
+
*
|
|
5945
6120
|
* Empty strings pass. Strings whose first character has no lowercase form, such
|
|
5946
6121
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
5947
6122
|
*
|
|
@@ -5974,6 +6149,7 @@ const UNCAPITALIZED_PATTERN = "^[^A-Z]?.*$"
|
|
|
5974
6149
|
* `toLowerCase()`.
|
|
5975
6150
|
*
|
|
5976
6151
|
* **Details**
|
|
6152
|
+
*
|
|
5977
6153
|
* Empty strings pass. Strings whose first character has no uppercase form, such
|
|
5978
6154
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
5979
6155
|
*
|
|
@@ -6002,12 +6178,14 @@ export function isUncapitalized(annotations?: Annotations.Filter) {
|
|
|
6002
6178
|
/**
|
|
6003
6179
|
* Validates that a number is finite (not `Infinity`, `-Infinity`, or `NaN`).
|
|
6004
6180
|
*
|
|
6005
|
-
* **
|
|
6181
|
+
* **Details**
|
|
6182
|
+
*
|
|
6183
|
+
* JSON Schema:
|
|
6006
6184
|
*
|
|
6007
6185
|
* This check does not have a direct JSON Schema equivalent, but ensures the
|
|
6008
6186
|
* number is valid and finite.
|
|
6009
6187
|
*
|
|
6010
|
-
*
|
|
6188
|
+
* Arbitrary:
|
|
6011
6189
|
*
|
|
6012
6190
|
* When generating test data with fast-check, this applies `noDefaultInfinity`
|
|
6013
6191
|
* and `noNaN` constraints to ensure generated numbers are finite.
|
|
@@ -6212,11 +6390,13 @@ export function makeIsMultipleOf<T>(options: {
|
|
|
6212
6390
|
/**
|
|
6213
6391
|
* Validates that a number is greater than the specified value (exclusive).
|
|
6214
6392
|
*
|
|
6215
|
-
* **
|
|
6393
|
+
* **Details**
|
|
6394
|
+
*
|
|
6395
|
+
* JSON Schema:
|
|
6216
6396
|
*
|
|
6217
6397
|
* This check corresponds to the `exclusiveMinimum` constraint in JSON Schema.
|
|
6218
6398
|
*
|
|
6219
|
-
*
|
|
6399
|
+
* Arbitrary:
|
|
6220
6400
|
*
|
|
6221
6401
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
6222
6402
|
* with `minExcluded: true` to ensure generated numbers are greater than the
|
|
@@ -6245,11 +6425,13 @@ export const isGreaterThan = makeIsGreaterThan({
|
|
|
6245
6425
|
* Validates that a number is greater than or equal to the specified value
|
|
6246
6426
|
* (inclusive).
|
|
6247
6427
|
*
|
|
6248
|
-
* **
|
|
6428
|
+
* **Details**
|
|
6429
|
+
*
|
|
6430
|
+
* JSON Schema:
|
|
6249
6431
|
*
|
|
6250
6432
|
* This check corresponds to the `minimum` constraint in JSON Schema.
|
|
6251
6433
|
*
|
|
6252
|
-
*
|
|
6434
|
+
* Arbitrary:
|
|
6253
6435
|
*
|
|
6254
6436
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
6255
6437
|
* to ensure generated numbers are greater than or equal to the specified value.
|
|
@@ -6275,11 +6457,13 @@ export const isGreaterThanOrEqualTo = makeIsGreaterThanOrEqualTo({
|
|
|
6275
6457
|
/**
|
|
6276
6458
|
* Validates that a number is less than the specified value (exclusive).
|
|
6277
6459
|
*
|
|
6278
|
-
* **
|
|
6460
|
+
* **Details**
|
|
6461
|
+
*
|
|
6462
|
+
* JSON Schema:
|
|
6279
6463
|
*
|
|
6280
6464
|
* This check corresponds to the `exclusiveMaximum` constraint in JSON Schema.
|
|
6281
6465
|
*
|
|
6282
|
-
*
|
|
6466
|
+
* Arbitrary:
|
|
6283
6467
|
*
|
|
6284
6468
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
6285
6469
|
* with `maxExcluded: true` to ensure generated numbers are less than the
|
|
@@ -6308,11 +6492,13 @@ export const isLessThan = makeIsLessThan({
|
|
|
6308
6492
|
* Validates that a number is less than or equal to the specified value
|
|
6309
6493
|
* (inclusive).
|
|
6310
6494
|
*
|
|
6311
|
-
* **
|
|
6495
|
+
* **Details**
|
|
6496
|
+
*
|
|
6497
|
+
* JSON Schema:
|
|
6312
6498
|
*
|
|
6313
6499
|
* This check corresponds to the `maximum` constraint in JSON Schema.
|
|
6314
6500
|
*
|
|
6315
|
-
*
|
|
6501
|
+
* Arbitrary:
|
|
6316
6502
|
*
|
|
6317
6503
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
6318
6504
|
* to ensure generated numbers are less than or equal to the specified value.
|
|
@@ -6339,12 +6525,14 @@ export const isLessThanOrEqualTo = makeIsLessThanOrEqualTo({
|
|
|
6339
6525
|
* Validates that a number is within a specified range. The range boundaries can
|
|
6340
6526
|
* be inclusive or exclusive based on the provided options.
|
|
6341
6527
|
*
|
|
6342
|
-
* **
|
|
6528
|
+
* **Details**
|
|
6529
|
+
*
|
|
6530
|
+
* JSON Schema:
|
|
6343
6531
|
*
|
|
6344
6532
|
* This check corresponds to `minimum`/`maximum` or `exclusiveMinimum`/`exclusiveMaximum`
|
|
6345
6533
|
* constraints in JSON Schema, depending on the options provided.
|
|
6346
6534
|
*
|
|
6347
|
-
*
|
|
6535
|
+
* Arbitrary:
|
|
6348
6536
|
*
|
|
6349
6537
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
6350
6538
|
* constraints with optional `minExcluded` and `maxExcluded` flags to ensure
|
|
@@ -6376,11 +6564,13 @@ export const isBetween = makeIsBetween({
|
|
|
6376
6564
|
/**
|
|
6377
6565
|
* Validates that a number is a multiple of the specified divisor.
|
|
6378
6566
|
*
|
|
6379
|
-
* **
|
|
6567
|
+
* **Details**
|
|
6568
|
+
*
|
|
6569
|
+
* JSON Schema:
|
|
6380
6570
|
*
|
|
6381
6571
|
* This check corresponds to the `multipleOf` constraint in JSON Schema.
|
|
6382
6572
|
*
|
|
6383
|
-
*
|
|
6573
|
+
* Arbitrary:
|
|
6384
6574
|
*
|
|
6385
6575
|
* When generating test data with fast-check, this applies constraints to ensure
|
|
6386
6576
|
* generated numbers are multiples of the specified divisor.
|
|
@@ -6404,11 +6594,13 @@ export const isMultipleOf = makeIsMultipleOf({
|
|
|
6404
6594
|
* Validates that a number is a safe integer (within the safe integer range
|
|
6405
6595
|
* that can be exactly represented in JavaScript).
|
|
6406
6596
|
*
|
|
6407
|
-
* **
|
|
6597
|
+
* **Details**
|
|
6598
|
+
*
|
|
6599
|
+
* JSON Schema:
|
|
6408
6600
|
*
|
|
6409
6601
|
* This check corresponds to the `type: "integer"` constraint in JSON Schema.
|
|
6410
6602
|
*
|
|
6411
|
-
*
|
|
6603
|
+
* Arbitrary:
|
|
6412
6604
|
*
|
|
6413
6605
|
* When generating test data with fast-check, this applies an `isInteger: true`
|
|
6414
6606
|
* constraint to ensure generated numbers are integers.
|
|
@@ -6438,12 +6630,14 @@ export function isInt(annotations?: Annotations.Filter) {
|
|
|
6438
6630
|
* Validates that a number is a 32-bit signed integer (range: -2,147,483,648 to
|
|
6439
6631
|
* 2,147,483,647).
|
|
6440
6632
|
*
|
|
6441
|
-
* **
|
|
6633
|
+
* **Details**
|
|
6634
|
+
*
|
|
6635
|
+
* JSON Schema:
|
|
6442
6636
|
*
|
|
6443
6637
|
* This check corresponds to the `format: "int32"` constraint in OpenAPI 3.1,
|
|
6444
6638
|
* or `minimum`/`maximum` constraints in other JSON Schema targets.
|
|
6445
6639
|
*
|
|
6446
|
-
*
|
|
6640
|
+
* Arbitrary:
|
|
6447
6641
|
*
|
|
6448
6642
|
* When generating test data with fast-check, this applies integer and range
|
|
6449
6643
|
* constraints to ensure generated numbers are 32-bit signed integers.
|
|
@@ -6468,12 +6662,14 @@ export function isInt32(annotations?: Annotations.Filter) {
|
|
|
6468
6662
|
* Validates that a number is a 32-bit unsigned integer (range: 0 to
|
|
6469
6663
|
* 4,294,967,295).
|
|
6470
6664
|
*
|
|
6471
|
-
* **
|
|
6665
|
+
* **Details**
|
|
6666
|
+
*
|
|
6667
|
+
* JSON Schema:
|
|
6472
6668
|
*
|
|
6473
6669
|
* This check corresponds to the `format: "uint32"` constraint in OpenAPI 3.1,
|
|
6474
6670
|
* or `minimum`/`maximum` constraints in other JSON Schema targets.
|
|
6475
6671
|
*
|
|
6476
|
-
*
|
|
6672
|
+
* Arbitrary:
|
|
6477
6673
|
*
|
|
6478
6674
|
* When generating test data with fast-check, this applies integer and range
|
|
6479
6675
|
* constraints to ensure generated numbers are 32-bit unsigned integers.
|
|
@@ -6498,12 +6694,14 @@ export function isUint32(annotations?: Annotations.Filter) {
|
|
|
6498
6694
|
* Validates that a Date object represents a valid date (not an invalid date
|
|
6499
6695
|
* like `new Date("invalid")`).
|
|
6500
6696
|
*
|
|
6501
|
-
* **
|
|
6697
|
+
* **Details**
|
|
6698
|
+
*
|
|
6699
|
+
* JSON Schema:
|
|
6502
6700
|
*
|
|
6503
6701
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
6504
6702
|
* validates date strings, not Date objects.
|
|
6505
6703
|
*
|
|
6506
|
-
*
|
|
6704
|
+
* Arbitrary:
|
|
6507
6705
|
*
|
|
6508
6706
|
* When generating test data with fast-check, this applies a `noInvalidDate`
|
|
6509
6707
|
* constraint to ensure generated Date objects are valid.
|
|
@@ -6532,7 +6730,9 @@ export function isDateValid(annotations?: Annotations.Filter) {
|
|
|
6532
6730
|
/**
|
|
6533
6731
|
* Validates that a Date is greater than the specified value (exclusive).
|
|
6534
6732
|
*
|
|
6535
|
-
* **
|
|
6733
|
+
* **Details**
|
|
6734
|
+
*
|
|
6735
|
+
* Arbitrary:
|
|
6536
6736
|
*
|
|
6537
6737
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
6538
6738
|
* with `minExcluded: true` to ensure generated Date objects are greater than the
|
|
@@ -6561,12 +6761,14 @@ export const isGreaterThanDate = makeIsGreaterThan({
|
|
|
6561
6761
|
* Validates that a Date is greater than or equal to the specified date
|
|
6562
6762
|
* (inclusive).
|
|
6563
6763
|
*
|
|
6564
|
-
* **
|
|
6764
|
+
* **Details**
|
|
6765
|
+
*
|
|
6766
|
+
* JSON Schema:
|
|
6565
6767
|
*
|
|
6566
6768
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
6567
6769
|
* validates date strings, not Date objects.
|
|
6568
6770
|
*
|
|
6569
|
-
*
|
|
6771
|
+
* Arbitrary:
|
|
6570
6772
|
*
|
|
6571
6773
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
6572
6774
|
* to ensure generated Date objects are greater than or equal to the specified
|
|
@@ -6593,7 +6795,9 @@ export const isGreaterThanOrEqualToDate = makeIsGreaterThanOrEqualTo({
|
|
|
6593
6795
|
/**
|
|
6594
6796
|
* Validates that a Date is less than the specified value (exclusive).
|
|
6595
6797
|
*
|
|
6596
|
-
* **
|
|
6798
|
+
* **Details**
|
|
6799
|
+
*
|
|
6800
|
+
* Arbitrary:
|
|
6597
6801
|
*
|
|
6598
6802
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
6599
6803
|
* with `maxExcluded: true` to ensure generated Date objects are less than the
|
|
@@ -6622,12 +6826,14 @@ export const isLessThanDate = makeIsLessThan({
|
|
|
6622
6826
|
* Validates that a Date is less than or equal to the specified date
|
|
6623
6827
|
* (inclusive).
|
|
6624
6828
|
*
|
|
6625
|
-
* **
|
|
6829
|
+
* **Details**
|
|
6830
|
+
*
|
|
6831
|
+
* JSON Schema:
|
|
6626
6832
|
*
|
|
6627
6833
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
6628
6834
|
* validates date strings, not Date objects.
|
|
6629
6835
|
*
|
|
6630
|
-
*
|
|
6836
|
+
* Arbitrary:
|
|
6631
6837
|
*
|
|
6632
6838
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
6633
6839
|
* to ensure generated Date objects are less than or equal to the specified
|
|
@@ -6655,12 +6861,14 @@ export const isLessThanOrEqualToDate = makeIsLessThanOrEqualTo({
|
|
|
6655
6861
|
* Validates that a Date is within a specified range. The range boundaries can
|
|
6656
6862
|
* be inclusive or exclusive based on the provided options.
|
|
6657
6863
|
*
|
|
6658
|
-
* **
|
|
6864
|
+
* **Details**
|
|
6865
|
+
*
|
|
6866
|
+
* JSON Schema:
|
|
6659
6867
|
*
|
|
6660
6868
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
6661
6869
|
* validates date strings, not Date objects.
|
|
6662
6870
|
*
|
|
6663
|
-
*
|
|
6871
|
+
* Arbitrary:
|
|
6664
6872
|
*
|
|
6665
6873
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
6666
6874
|
* constraints to ensure generated Date objects fall within the specified range.
|
|
@@ -6687,7 +6895,9 @@ export const isBetweenDate = makeIsBetween({
|
|
|
6687
6895
|
/**
|
|
6688
6896
|
* Validates that a BigInt is greater than the specified value (exclusive).
|
|
6689
6897
|
*
|
|
6690
|
-
* **
|
|
6898
|
+
* **Details**
|
|
6899
|
+
*
|
|
6900
|
+
* Arbitrary:
|
|
6691
6901
|
*
|
|
6692
6902
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
6693
6903
|
* with `minExcluded: true` to ensure generated BigInts are greater than the
|
|
@@ -6716,7 +6926,9 @@ export const isGreaterThanBigInt = makeIsGreaterThan({
|
|
|
6716
6926
|
* Validates that a BigInt is greater than or equal to the specified value
|
|
6717
6927
|
* (inclusive).
|
|
6718
6928
|
*
|
|
6719
|
-
* **
|
|
6929
|
+
* **Details**
|
|
6930
|
+
*
|
|
6931
|
+
* Arbitrary:
|
|
6720
6932
|
*
|
|
6721
6933
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
6722
6934
|
* to ensure generated BigInt values are greater than or equal to the specified
|
|
@@ -6743,7 +6955,9 @@ export const isGreaterThanOrEqualToBigInt = makeIsGreaterThanOrEqualTo({
|
|
|
6743
6955
|
/**
|
|
6744
6956
|
* Validates that a BigInt is less than the specified value (exclusive).
|
|
6745
6957
|
*
|
|
6746
|
-
* **
|
|
6958
|
+
* **Details**
|
|
6959
|
+
*
|
|
6960
|
+
* Arbitrary:
|
|
6747
6961
|
*
|
|
6748
6962
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
6749
6963
|
* with `maxExcluded: true` to ensure generated BigInts are less than the
|
|
@@ -6772,7 +6986,9 @@ export const isLessThanBigInt = makeIsLessThan({
|
|
|
6772
6986
|
* Validates that a BigInt is less than or equal to the specified value
|
|
6773
6987
|
* (inclusive).
|
|
6774
6988
|
*
|
|
6775
|
-
* **
|
|
6989
|
+
* **Details**
|
|
6990
|
+
*
|
|
6991
|
+
* Arbitrary:
|
|
6776
6992
|
*
|
|
6777
6993
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
6778
6994
|
* to ensure generated BigInt values are less than or equal to the specified
|
|
@@ -6800,7 +7016,9 @@ export const isLessThanOrEqualToBigInt = makeIsLessThanOrEqualTo({
|
|
|
6800
7016
|
* Validates that a BigInt is within a specified range. The range boundaries can
|
|
6801
7017
|
* be inclusive or exclusive based on the provided options.
|
|
6802
7018
|
*
|
|
6803
|
-
* **
|
|
7019
|
+
* **Details**
|
|
7020
|
+
*
|
|
7021
|
+
* Arbitrary:
|
|
6804
7022
|
*
|
|
6805
7023
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
6806
7024
|
* constraints to ensure generated BigInt values fall within the specified
|
|
@@ -6875,6 +7093,7 @@ export const isLessThanOrEqualToBigDecimal = makeIsLessThanOrEqualTo({
|
|
|
6875
7093
|
* Validates that a `BigDecimal` is within a specified range.
|
|
6876
7094
|
*
|
|
6877
7095
|
* **Details**
|
|
7096
|
+
*
|
|
6878
7097
|
* The minimum and maximum boundaries are inclusive by default. Pass
|
|
6879
7098
|
* `exclusiveMinimum` or `exclusiveMaximum` to exclude either boundary.
|
|
6880
7099
|
*
|
|
@@ -6890,12 +7109,14 @@ export const isBetweenBigDecimal = makeIsBetween({
|
|
|
6890
7109
|
* Validates that a value has at least the specified length. Works with strings
|
|
6891
7110
|
* and arrays.
|
|
6892
7111
|
*
|
|
6893
|
-
* **
|
|
7112
|
+
* **Details**
|
|
7113
|
+
*
|
|
7114
|
+
* JSON Schema:
|
|
6894
7115
|
*
|
|
6895
7116
|
* This check corresponds to the `minLength` constraint for strings or the
|
|
6896
7117
|
* `minItems` constraint for arrays in JSON Schema.
|
|
6897
7118
|
*
|
|
6898
|
-
*
|
|
7119
|
+
* Arbitrary:
|
|
6899
7120
|
*
|
|
6900
7121
|
* When generating test data with fast-check, this applies a `minLength`
|
|
6901
7122
|
* constraint to ensure generated strings or arrays have at least the required
|
|
@@ -6941,12 +7162,14 @@ export function isMinLength(minLength: number, annotations?: Annotations.Filter)
|
|
|
6941
7162
|
* Validates that a value has at least one element. Works with strings and arrays.
|
|
6942
7163
|
* This is equivalent to `isMinLength(1)`.
|
|
6943
7164
|
*
|
|
6944
|
-
* **
|
|
7165
|
+
* **Details**
|
|
7166
|
+
*
|
|
7167
|
+
* JSON Schema:
|
|
6945
7168
|
*
|
|
6946
7169
|
* This check corresponds to the `minLength: 1` constraint for strings or the
|
|
6947
7170
|
* `minItems: 1` constraint for arrays in JSON Schema.
|
|
6948
7171
|
*
|
|
6949
|
-
*
|
|
7172
|
+
* Arbitrary:
|
|
6950
7173
|
*
|
|
6951
7174
|
* When generating test data with fast-check, this applies a `minLength: 1`
|
|
6952
7175
|
* constraint to ensure generated strings or arrays are non-empty.
|
|
@@ -6962,12 +7185,14 @@ export function isNonEmpty(annotations?: Annotations.Filter) {
|
|
|
6962
7185
|
* Validates that a value has at most the specified length. Works with strings
|
|
6963
7186
|
* and arrays.
|
|
6964
7187
|
*
|
|
6965
|
-
* **
|
|
7188
|
+
* **Details**
|
|
7189
|
+
*
|
|
7190
|
+
* JSON Schema:
|
|
6966
7191
|
*
|
|
6967
7192
|
* This check corresponds to the `maxLength` constraint for strings or the
|
|
6968
7193
|
* `maxItems` constraint for arrays in JSON Schema.
|
|
6969
7194
|
*
|
|
6970
|
-
*
|
|
7195
|
+
* Arbitrary:
|
|
6971
7196
|
*
|
|
6972
7197
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
6973
7198
|
* constraint to ensure generated strings or arrays have at most the required
|
|
@@ -7004,12 +7229,14 @@ export function isMaxLength(maxLength: number, annotations?: Annotations.Filter)
|
|
|
7004
7229
|
* Validates that a value's length is within the specified range. Works with
|
|
7005
7230
|
* strings and arrays.
|
|
7006
7231
|
*
|
|
7007
|
-
* **
|
|
7232
|
+
* **Details**
|
|
7233
|
+
*
|
|
7234
|
+
* JSON Schema:
|
|
7008
7235
|
*
|
|
7009
7236
|
* This check corresponds to `minLength`/`maxLength` constraints for strings
|
|
7010
7237
|
* or `minItems`/`maxItems` constraints for arrays in JSON Schema.
|
|
7011
7238
|
*
|
|
7012
|
-
*
|
|
7239
|
+
* Arbitrary:
|
|
7013
7240
|
*
|
|
7014
7241
|
* When generating test data with fast-check, this applies `minLength` and
|
|
7015
7242
|
* `maxLength` constraints to ensure generated strings or arrays have a length
|
|
@@ -7052,12 +7279,14 @@ export function isLengthBetween(minimum: number, maximum: number, annotations?:
|
|
|
7052
7279
|
* Validates that a value has at least the specified size. Works with values
|
|
7053
7280
|
* that have a `size` property, such as `Set` or `Map`.
|
|
7054
7281
|
*
|
|
7055
|
-
* **
|
|
7282
|
+
* **Details**
|
|
7283
|
+
*
|
|
7284
|
+
* JSON Schema:
|
|
7056
7285
|
*
|
|
7057
7286
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
7058
7287
|
* values with a `size` property rather than standard JSON Schema types.
|
|
7059
7288
|
*
|
|
7060
|
-
*
|
|
7289
|
+
* Arbitrary:
|
|
7061
7290
|
*
|
|
7062
7291
|
* When generating test data with fast-check, this applies a `minLength`
|
|
7063
7292
|
* constraint to the array representation to ensure generated values have at
|
|
@@ -7091,12 +7320,14 @@ export function isMinSize(minSize: number, annotations?: Annotations.Filter) {
|
|
|
7091
7320
|
* Validates that a value has at most the specified size. Works with values
|
|
7092
7321
|
* that have a `size` property, such as `Set` or `Map`.
|
|
7093
7322
|
*
|
|
7094
|
-
* **
|
|
7323
|
+
* **Details**
|
|
7324
|
+
*
|
|
7325
|
+
* JSON Schema:
|
|
7095
7326
|
*
|
|
7096
7327
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
7097
7328
|
* values with a `size` property rather than standard JSON Schema types.
|
|
7098
7329
|
*
|
|
7099
|
-
*
|
|
7330
|
+
* Arbitrary:
|
|
7100
7331
|
*
|
|
7101
7332
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
7102
7333
|
* constraint to the array representation to ensure generated values have at
|
|
@@ -7130,12 +7361,14 @@ export function isMaxSize(maxSize: number, annotations?: Annotations.Filter) {
|
|
|
7130
7361
|
* Validates that a value's size is within the specified range. Works with
|
|
7131
7362
|
* values that have a `size` property, such as `Set` or `Map`.
|
|
7132
7363
|
*
|
|
7133
|
-
* **
|
|
7364
|
+
* **Details**
|
|
7365
|
+
*
|
|
7366
|
+
* JSON Schema:
|
|
7134
7367
|
*
|
|
7135
7368
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
7136
7369
|
* values with a `size` property rather than standard JSON Schema types.
|
|
7137
7370
|
*
|
|
7138
|
-
*
|
|
7371
|
+
* Arbitrary:
|
|
7139
7372
|
*
|
|
7140
7373
|
* When generating test data with fast-check, this applies `minLength` and
|
|
7141
7374
|
* `maxLength` constraints to ensure generated values have a size within the
|
|
@@ -7175,11 +7408,13 @@ export function isSizeBetween(minimum: number, maximum: number, annotations?: An
|
|
|
7175
7408
|
* properties. This includes both string and symbol keys when counting
|
|
7176
7409
|
* properties.
|
|
7177
7410
|
*
|
|
7178
|
-
* **
|
|
7411
|
+
* **Details**
|
|
7412
|
+
*
|
|
7413
|
+
* JSON Schema:
|
|
7179
7414
|
*
|
|
7180
7415
|
* This check corresponds to the `minProperties` constraint in JSON Schema.
|
|
7181
7416
|
*
|
|
7182
|
-
*
|
|
7417
|
+
* Arbitrary:
|
|
7183
7418
|
*
|
|
7184
7419
|
* When generating test data with fast-check, this applies a `minLength`
|
|
7185
7420
|
* constraint to the array of entries that is generated before being converted
|
|
@@ -7214,11 +7449,13 @@ export function isMinProperties(minProperties: number, annotations?: Annotations
|
|
|
7214
7449
|
* Validates that an object contains at most the specified number of properties.
|
|
7215
7450
|
* This includes both string and symbol keys when counting properties.
|
|
7216
7451
|
*
|
|
7217
|
-
* **
|
|
7452
|
+
* **Details**
|
|
7453
|
+
*
|
|
7454
|
+
* JSON Schema:
|
|
7218
7455
|
*
|
|
7219
7456
|
* This check corresponds to the `maxProperties` constraint in JSON Schema.
|
|
7220
7457
|
*
|
|
7221
|
-
*
|
|
7458
|
+
* Arbitrary:
|
|
7222
7459
|
*
|
|
7223
7460
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
7224
7461
|
* constraint to the array of entries that is generated before being converted
|
|
@@ -7253,12 +7490,14 @@ export function isMaxProperties(maxProperties: number, annotations?: Annotations
|
|
|
7253
7490
|
* Validates that an object contains between `minimum` and `maximum` properties (inclusive).
|
|
7254
7491
|
* This includes both string and symbol keys when counting properties.
|
|
7255
7492
|
*
|
|
7256
|
-
* **
|
|
7493
|
+
* **Details**
|
|
7494
|
+
*
|
|
7495
|
+
* JSON Schema:
|
|
7257
7496
|
*
|
|
7258
7497
|
* This check corresponds to `minProperties` and `maxProperties`
|
|
7259
7498
|
* constraints in JSON Schema.
|
|
7260
7499
|
*
|
|
7261
|
-
*
|
|
7500
|
+
* Arbitrary:
|
|
7262
7501
|
*
|
|
7263
7502
|
* When generating test data with fast-check, this applies `minLength` and
|
|
7264
7503
|
* `maxLength` constraints to the array of entries that is generated before
|
|
@@ -7298,10 +7537,11 @@ export function isPropertiesLengthBetween(minimum: number, maximum: number, anno
|
|
|
7298
7537
|
* of the provided key schema.
|
|
7299
7538
|
*
|
|
7300
7539
|
* **Details**
|
|
7540
|
+
*
|
|
7301
7541
|
* This check uses `Reflect.ownKeys`, so symbol keys are validated in addition to
|
|
7302
7542
|
* string property names.
|
|
7303
7543
|
*
|
|
7304
|
-
*
|
|
7544
|
+
* JSON Schema:
|
|
7305
7545
|
* For string property names, this corresponds to the `propertyNames` constraint
|
|
7306
7546
|
* in JSON Schema.
|
|
7307
7547
|
*
|
|
@@ -7342,10 +7582,12 @@ export function isPropertyNames(keySchema: Top, annotations?: Annotations.Filter
|
|
|
7342
7582
|
/**
|
|
7343
7583
|
* Validates that all items in an array are unique according to Effect equality.
|
|
7344
7584
|
*
|
|
7345
|
-
* **
|
|
7585
|
+
* **Details**
|
|
7586
|
+
*
|
|
7587
|
+
* JSON Schema:
|
|
7346
7588
|
* This check corresponds to the `uniqueItems: true` constraint in JSON Schema.
|
|
7347
7589
|
*
|
|
7348
|
-
*
|
|
7590
|
+
* Arbitrary:
|
|
7349
7591
|
* When generating test data with fast-check, this applies a comparator based on
|
|
7350
7592
|
* Effect equality to ensure generated arrays contain only unique items.
|
|
7351
7593
|
*
|
|
@@ -7450,6 +7692,7 @@ export interface Option<A extends Top> extends
|
|
|
7450
7692
|
* Iso representation used for `Option` schemas.
|
|
7451
7693
|
*
|
|
7452
7694
|
* **Details**
|
|
7695
|
+
*
|
|
7453
7696
|
* `None` is represented as `{ _tag: "None" }`, while `Some` is represented as
|
|
7454
7697
|
* `{ _tag: "Some", value }` using the wrapped schema's `Iso` type.
|
|
7455
7698
|
*
|
|
@@ -7541,6 +7784,8 @@ export interface OptionFromNullOr<S extends Top> extends decodeTo<Option<toType<
|
|
|
7541
7784
|
/**
|
|
7542
7785
|
* Decodes a nullable, required value `T` to a required `Option<T>` value.
|
|
7543
7786
|
*
|
|
7787
|
+
* **Details**
|
|
7788
|
+
*
|
|
7544
7789
|
* Decoding:
|
|
7545
7790
|
* - `null` is decoded as `None`
|
|
7546
7791
|
* - other values are decoded as `Some`
|
|
@@ -7573,6 +7818,8 @@ export interface OptionFromUndefinedOr<S extends Top> extends decodeTo<Option<to
|
|
|
7573
7818
|
/**
|
|
7574
7819
|
* Decodes an undefined-or value `T` to a required `Option<T>` value.
|
|
7575
7820
|
*
|
|
7821
|
+
* **Details**
|
|
7822
|
+
*
|
|
7576
7823
|
* Decoding:
|
|
7577
7824
|
* - `undefined` is decoded as `None`
|
|
7578
7825
|
* - other values are decoded as `Some`
|
|
@@ -7605,6 +7852,8 @@ export interface OptionFromNullishOr<S extends Top> extends decodeTo<Option<toTy
|
|
|
7605
7852
|
/**
|
|
7606
7853
|
* Decodes a nullish value `T` to a required `Option<T>` value.
|
|
7607
7854
|
*
|
|
7855
|
+
* **Details**
|
|
7856
|
+
*
|
|
7608
7857
|
* Decoding:
|
|
7609
7858
|
* - `null` and `undefined` are decoded as `None`
|
|
7610
7859
|
* - other values are decoded as `Some`
|
|
@@ -7642,6 +7891,8 @@ export interface OptionFromOptionalKey<S extends Top> extends decodeTo<Option<to
|
|
|
7642
7891
|
/**
|
|
7643
7892
|
* Decodes an optional value `A` to a required `Option<A>` value.
|
|
7644
7893
|
*
|
|
7894
|
+
* **Details**
|
|
7895
|
+
*
|
|
7645
7896
|
* Decoding:
|
|
7646
7897
|
* - a missing key is decoded as `None`
|
|
7647
7898
|
* - a present value is decoded as `Some`
|
|
@@ -7675,6 +7926,8 @@ export interface OptionFromOptional<S extends Top> extends decodeTo<Option<toTyp
|
|
|
7675
7926
|
* Decodes an optional or `undefined` value `A` to an required `Option<A>`
|
|
7676
7927
|
* value.
|
|
7677
7928
|
*
|
|
7929
|
+
* **Details**
|
|
7930
|
+
*
|
|
7678
7931
|
* Decoding:
|
|
7679
7932
|
* - a missing key is decoded as `None`
|
|
7680
7933
|
* - a present key with an `undefined` value is decoded as `None`
|
|
@@ -7709,6 +7962,8 @@ export interface OptionFromOptionalNullOr<S extends Top> extends decodeTo<Option
|
|
|
7709
7962
|
* Decodes an optional or `null` or `undefined` value `A` to a required `Option<A>`
|
|
7710
7963
|
* value.
|
|
7711
7964
|
*
|
|
7965
|
+
* **Details**
|
|
7966
|
+
*
|
|
7712
7967
|
* Decoding:
|
|
7713
7968
|
* - a missing key is decoded as `None`
|
|
7714
7969
|
* - a present key with an `undefined` value is decoded as `None`
|
|
@@ -7769,6 +8024,7 @@ export interface Result<A extends Top, E extends Top> extends
|
|
|
7769
8024
|
* Iso representation used for `Result` schemas.
|
|
7770
8025
|
*
|
|
7771
8026
|
* **Details**
|
|
8027
|
+
*
|
|
7772
8028
|
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
7773
8029
|
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
7774
8030
|
*
|
|
@@ -7877,10 +8133,12 @@ export interface Redacted<S extends Top> extends
|
|
|
7877
8133
|
* Creates a schema for the `Redacted` type, providing secure handling of
|
|
7878
8134
|
* sensitive information.
|
|
7879
8135
|
*
|
|
8136
|
+
* **Details**
|
|
8137
|
+
*
|
|
7880
8138
|
* If the wrapped schema fails, the issue will be redacted to prevent both
|
|
7881
8139
|
* the actual value and the schema details from being exposed.
|
|
7882
8140
|
*
|
|
7883
|
-
*
|
|
8141
|
+
* Options:
|
|
7884
8142
|
*
|
|
7885
8143
|
* - `label`: When provided, the schema will behave as follows:
|
|
7886
8144
|
* - Values will be validated against the label in addition to the wrapped schema
|
|
@@ -7888,7 +8146,7 @@ export interface Redacted<S extends Top> extends
|
|
|
7888
8146
|
* - The arbitrary generator will produce a `Redacted` instance with the label
|
|
7889
8147
|
* - The formatter will return the label
|
|
7890
8148
|
*
|
|
7891
|
-
*
|
|
8149
|
+
* Default JSON serializer:
|
|
7892
8150
|
*
|
|
7893
8151
|
* The default JSON serializer will fail when attempting to serialize a `Redacted` value,
|
|
7894
8152
|
* but it will deserialize a value into a `Redacted` instance.
|
|
@@ -8012,6 +8270,7 @@ export function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
|
8012
8270
|
* (`Interrupt`).
|
|
8013
8271
|
*
|
|
8014
8272
|
* **Details**
|
|
8273
|
+
*
|
|
8015
8274
|
* The `error` schema validates typed failures and the `defect` schema validates
|
|
8016
8275
|
* unexpected defects.
|
|
8017
8276
|
*
|
|
@@ -8035,6 +8294,7 @@ export interface CauseReason<E extends Top, D extends Top> extends
|
|
|
8035
8294
|
* Iso representation used for `CauseReason` schemas.
|
|
8036
8295
|
*
|
|
8037
8296
|
* **Details**
|
|
8297
|
+
*
|
|
8038
8298
|
* Failures are represented with a `Fail` tag and encoded error, defects with a
|
|
8039
8299
|
* `Die` tag and encoded defect, and interrupts with an optional `fiberId`.
|
|
8040
8300
|
*
|
|
@@ -8171,6 +8431,7 @@ function causeReasonToFormatter<E>(error: Formatter<E>, defect: Formatter<unknow
|
|
|
8171
8431
|
* reasons combining typed errors, defects, and interrupts.
|
|
8172
8432
|
*
|
|
8173
8433
|
* **Details**
|
|
8434
|
+
*
|
|
8174
8435
|
* The `error` schema validates typed failures and the `defect` schema validates
|
|
8175
8436
|
* unexpected defects.
|
|
8176
8437
|
*
|
|
@@ -8282,7 +8543,9 @@ const ErrorJsonEncoded = Struct({
|
|
|
8282
8543
|
/**
|
|
8283
8544
|
* A schema for JavaScript `Error` objects.
|
|
8284
8545
|
*
|
|
8285
|
-
* **
|
|
8546
|
+
* **Details**
|
|
8547
|
+
*
|
|
8548
|
+
* Default JSON serializer:
|
|
8286
8549
|
* Encodes an `Error` as an object with `message` and optional `name` properties,
|
|
8287
8550
|
* and decodes that object back into an `Error`. The stack trace is omitted from
|
|
8288
8551
|
* the encoded form for security.
|
|
@@ -8307,7 +8570,9 @@ export const Error: Error = instanceOf(globalThis.Error, {
|
|
|
8307
8570
|
* A schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
8308
8571
|
* encoded form.
|
|
8309
8572
|
*
|
|
8310
|
-
* **
|
|
8573
|
+
* **Details**
|
|
8574
|
+
*
|
|
8575
|
+
* Default JSON serializer:
|
|
8311
8576
|
* Encodes an `Error` as an object with `message`, optional `name`, and optional
|
|
8312
8577
|
* `stack` properties, and decodes that object back into an `Error`.
|
|
8313
8578
|
*
|
|
@@ -8373,7 +8638,9 @@ const defectTransformation = new Transformation.Transformation(
|
|
|
8373
8638
|
* A schema for defect values, accepting either JavaScript `Error` values encoded
|
|
8374
8639
|
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
8375
8640
|
*
|
|
8376
|
-
* **
|
|
8641
|
+
* **Details**
|
|
8642
|
+
*
|
|
8643
|
+
* Default JSON serializer:
|
|
8377
8644
|
* Unknown defects are serialized with `JSON.stringify` when possible and fall
|
|
8378
8645
|
* back to Effect's formatted representation when JSON serialization fails.
|
|
8379
8646
|
*
|
|
@@ -8439,6 +8706,7 @@ export interface Exit<A extends Top, E extends Top, D extends Top> extends
|
|
|
8439
8706
|
* Iso representation used for `Exit` schemas.
|
|
8440
8707
|
*
|
|
8441
8708
|
* **Details**
|
|
8709
|
+
*
|
|
8442
8710
|
* Successful exits are represented as `{ _tag: "Success", value }`, while failed
|
|
8443
8711
|
* exits are represented as `{ _tag: "Failure", cause }`.
|
|
8444
8712
|
*
|
|
@@ -9050,6 +9318,8 @@ export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
|
9050
9318
|
/**
|
|
9051
9319
|
* Schema for JavaScript `RegExp` objects.
|
|
9052
9320
|
*
|
|
9321
|
+
* **Details**
|
|
9322
|
+
*
|
|
9053
9323
|
* The default JSON serializer encodes a `RegExp` as `{ source, flags }`.
|
|
9054
9324
|
*
|
|
9055
9325
|
* @category RegExp
|
|
@@ -9126,7 +9396,9 @@ const URLString = String.annotate({ expected: "a string that will be decoded as
|
|
|
9126
9396
|
/**
|
|
9127
9397
|
* A schema for JavaScript `URL` objects.
|
|
9128
9398
|
*
|
|
9129
|
-
* **
|
|
9399
|
+
* **Details**
|
|
9400
|
+
*
|
|
9401
|
+
* Default JSON serializer:
|
|
9130
9402
|
*
|
|
9131
9403
|
* - encodes `URL` as a `string`
|
|
9132
9404
|
*
|
|
@@ -9168,6 +9440,8 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
9168
9440
|
/**
|
|
9169
9441
|
* A transformation schema that decodes a `string` into a `URL`.
|
|
9170
9442
|
*
|
|
9443
|
+
* **Details**
|
|
9444
|
+
*
|
|
9171
9445
|
* Decoding:
|
|
9172
9446
|
* - A **valid** URL `string` is decoded as a `URL`
|
|
9173
9447
|
*
|
|
@@ -9195,6 +9469,8 @@ const DateString = String.annotate({ expected: "a string in ISO 8601 format that
|
|
|
9195
9469
|
/**
|
|
9196
9470
|
* A schema for JavaScript `Date` objects.
|
|
9197
9471
|
*
|
|
9472
|
+
* **Details**
|
|
9473
|
+
*
|
|
9198
9474
|
* This schema accepts any `Date` instance, including invalid dates. For
|
|
9199
9475
|
* validating only valid dates, use `DateValid` instead. The default JSON
|
|
9200
9476
|
* serializer encodes valid dates as ISO 8601 strings; invalid dates encode as
|
|
@@ -9246,11 +9522,13 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
9246
9522
|
/**
|
|
9247
9523
|
* A transformation schema that decodes a string into a JavaScript `Date`.
|
|
9248
9524
|
*
|
|
9249
|
-
* **
|
|
9525
|
+
* **Details**
|
|
9526
|
+
*
|
|
9527
|
+
* Decoding:
|
|
9250
9528
|
* The string is passed to JavaScript `Date` construction and may decode to an
|
|
9251
9529
|
* invalid `Date`. Compose with `DateValid` when invalid dates should be rejected.
|
|
9252
9530
|
*
|
|
9253
|
-
*
|
|
9531
|
+
* Encoding:
|
|
9254
9532
|
* A valid `Date` is encoded as an ISO string; an invalid `Date` is encoded as
|
|
9255
9533
|
* `"Invalid Date"`.
|
|
9256
9534
|
*
|
|
@@ -9273,6 +9551,8 @@ export interface DateValid extends Date {
|
|
|
9273
9551
|
/**
|
|
9274
9552
|
* A schema for **valid** JavaScript `Date` objects.
|
|
9275
9553
|
*
|
|
9554
|
+
* **Details**
|
|
9555
|
+
*
|
|
9276
9556
|
* This schema accepts `Date` instances but rejects invalid dates (such as `new
|
|
9277
9557
|
* Date("invalid")`).
|
|
9278
9558
|
*
|
|
@@ -9294,6 +9574,8 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
9294
9574
|
/**
|
|
9295
9575
|
* A schema for `Duration` values.
|
|
9296
9576
|
*
|
|
9577
|
+
* **Details**
|
|
9578
|
+
*
|
|
9297
9579
|
* The default JSON serializer encodes `Duration` as a tagged object with the
|
|
9298
9580
|
* duration type and value.
|
|
9299
9581
|
*
|
|
@@ -9385,6 +9667,8 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
9385
9667
|
/**
|
|
9386
9668
|
* A transformation schema that parses a string into a `Duration`.
|
|
9387
9669
|
*
|
|
9670
|
+
* **Details**
|
|
9671
|
+
*
|
|
9388
9672
|
* Decoding:
|
|
9389
9673
|
* - A `string` is decoded as a `Duration`, accepting any format that
|
|
9390
9674
|
* `Duration.fromInput` can parse.
|
|
@@ -9416,10 +9700,12 @@ const bigint0 = globalThis.BigInt(0)
|
|
|
9416
9700
|
* A transformation schema that decodes a non-negative `bigint` into a
|
|
9417
9701
|
* `Duration`, treating the bigint as nanoseconds.
|
|
9418
9702
|
*
|
|
9419
|
-
* **
|
|
9703
|
+
* **Details**
|
|
9704
|
+
*
|
|
9705
|
+
* Decoding:
|
|
9420
9706
|
* A non-negative `bigint` representing nanoseconds is decoded as a `Duration`.
|
|
9421
9707
|
*
|
|
9422
|
-
*
|
|
9708
|
+
* Encoding:
|
|
9423
9709
|
* Finite durations are encoded as a non-negative `bigint` number of nanoseconds.
|
|
9424
9710
|
* Encoding fails when the duration cannot be represented as nanoseconds, such as
|
|
9425
9711
|
* `Duration.infinity`.
|
|
@@ -9447,6 +9733,8 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
9447
9733
|
* integer into a `Duration`, treating the integer value as the duration in
|
|
9448
9734
|
* milliseconds.
|
|
9449
9735
|
*
|
|
9736
|
+
* **Details**
|
|
9737
|
+
*
|
|
9450
9738
|
* Decoding:
|
|
9451
9739
|
* - A non-negative (possibly infinite) integer representing milliseconds is
|
|
9452
9740
|
* decoded as a `Duration`
|
|
@@ -9477,7 +9765,9 @@ const BigDecimalString = String.annotate({ expected: "a string that will be deco
|
|
|
9477
9765
|
/**
|
|
9478
9766
|
* A schema for `BigDecimal` values.
|
|
9479
9767
|
*
|
|
9480
|
-
* **
|
|
9768
|
+
* **Details**
|
|
9769
|
+
*
|
|
9770
|
+
* Default JSON serializer:
|
|
9481
9771
|
*
|
|
9482
9772
|
* - encodes `BigDecimal` as a `string`
|
|
9483
9773
|
*
|
|
@@ -9523,6 +9813,8 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
9523
9813
|
/**
|
|
9524
9814
|
* A transformation schema that parses a string into a `BigDecimal`.
|
|
9525
9815
|
*
|
|
9816
|
+
* **Details**
|
|
9817
|
+
*
|
|
9526
9818
|
* Decoding:
|
|
9527
9819
|
* - A `string` is decoded as a `BigDecimal`.
|
|
9528
9820
|
*
|
|
@@ -9550,6 +9842,8 @@ export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
|
9550
9842
|
/**
|
|
9551
9843
|
* A transformation schema that decodes a JSON-encoded string into an `unknown` value.
|
|
9552
9844
|
*
|
|
9845
|
+
* **Details**
|
|
9846
|
+
*
|
|
9553
9847
|
* Decoding:
|
|
9554
9848
|
* - A `string` is decoded as an `unknown` value.
|
|
9555
9849
|
* - If the string is not valid JSON, decoding fails.
|
|
@@ -9587,12 +9881,20 @@ export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
|
9587
9881
|
* Returns a schema that decodes a JSON string and then decodes the parsed value
|
|
9588
9882
|
* using the given schema.
|
|
9589
9883
|
*
|
|
9884
|
+
* **Details**
|
|
9885
|
+
*
|
|
9590
9886
|
* This is useful when working with JSON-encoded strings where the actual
|
|
9591
9887
|
* structure of the value is known and described by an existing schema.
|
|
9592
9888
|
*
|
|
9593
9889
|
* The resulting schema first parses the input string as JSON, and then runs the
|
|
9594
9890
|
* provided schema on the parsed result.
|
|
9595
9891
|
*
|
|
9892
|
+
* JSON Schema generation:
|
|
9893
|
+
*
|
|
9894
|
+
* When using `fromJsonString` with `draft-2020-12` or `openApi3.1`, the
|
|
9895
|
+
* resulting schema will be a JSON Schema with a `contentSchema` property that
|
|
9896
|
+
* contains the JSON Schema for the given schema.
|
|
9897
|
+
*
|
|
9596
9898
|
* **Example** (Decoding JSON strings with a schema)
|
|
9597
9899
|
*
|
|
9598
9900
|
* ```ts
|
|
@@ -9605,12 +9907,6 @@ export interface fromJsonString<S extends Top> extends decodeTo<S, String> {
|
|
|
9605
9907
|
* // => { a: 1 }
|
|
9606
9908
|
* ```
|
|
9607
9909
|
*
|
|
9608
|
-
* **Json Schema Generation**
|
|
9609
|
-
*
|
|
9610
|
-
* When using `fromJsonString` with `draft-2020-12` or `openApi3.1`, the
|
|
9611
|
-
* resulting schema will be a JSON Schema with a `contentSchema` property that
|
|
9612
|
-
* contains the JSON Schema for the given schema.
|
|
9613
|
-
*
|
|
9614
9910
|
* **Example** (Emitting JSON Schema for a JSON string decoder)
|
|
9615
9911
|
*
|
|
9616
9912
|
* ```ts
|
|
@@ -9668,6 +9964,8 @@ export interface File extends instanceOf<globalThis.File> {
|
|
|
9668
9964
|
/**
|
|
9669
9965
|
* Schema for JavaScript `File` objects.
|
|
9670
9966
|
*
|
|
9967
|
+
* **Details**
|
|
9968
|
+
*
|
|
9671
9969
|
* The default JSON serializer encodes a `File` as `{ data, type, name, lastModified }`
|
|
9672
9970
|
* where `data` is base64-encoded.
|
|
9673
9971
|
*
|
|
@@ -9740,6 +10038,8 @@ export interface FormData extends instanceOf<globalThis.FormData> {
|
|
|
9740
10038
|
/**
|
|
9741
10039
|
* Schema for JavaScript `FormData` objects.
|
|
9742
10040
|
*
|
|
10041
|
+
* **Details**
|
|
10042
|
+
*
|
|
9743
10043
|
* The default JSON serializer encodes a `FormData` as an array of `[key, entry]`
|
|
9744
10044
|
* pairs where each entry is tagged as `"String"` or `"File"`.
|
|
9745
10045
|
*
|
|
@@ -9805,11 +10105,20 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
9805
10105
|
* converts it into a tree record using bracket notation, and then decodes the
|
|
9806
10106
|
* resulting structure using the provided schema.
|
|
9807
10107
|
*
|
|
10108
|
+
* **Details**
|
|
10109
|
+
*
|
|
9808
10110
|
* The decoding process has two steps:
|
|
9809
10111
|
*
|
|
9810
10112
|
* 1. Parse `FormData` into a nested tree record.
|
|
9811
10113
|
* 2. Decode the parsed value with the given schema.
|
|
9812
10114
|
*
|
|
10115
|
+
* You can express nested values using bracket notation.
|
|
10116
|
+
*
|
|
10117
|
+
* If you want to decode values that are not strings, use
|
|
10118
|
+
* `Schema.toCodecStringTree` with the `keepDeclarations: true` option.
|
|
10119
|
+
* This serializer preserves values such as numbers and `Blob` objects when
|
|
10120
|
+
* compatible with the schema.
|
|
10121
|
+
*
|
|
9813
10122
|
* **Example** (Decoding a flat structure)
|
|
9814
10123
|
*
|
|
9815
10124
|
* ```ts
|
|
@@ -9829,8 +10138,6 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
9829
10138
|
* // Success({"a":"1"})
|
|
9830
10139
|
* ```
|
|
9831
10140
|
*
|
|
9832
|
-
* You can express nested values using bracket notation.
|
|
9833
|
-
*
|
|
9834
10141
|
* **Example** (Nested fields)
|
|
9835
10142
|
*
|
|
9836
10143
|
* ```ts
|
|
@@ -9855,11 +10162,6 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
9855
10162
|
* // Success({"a":"1","b":{"c":"2","d":"3"}})
|
|
9856
10163
|
* ```
|
|
9857
10164
|
*
|
|
9858
|
-
* If you want to decode values that are not strings, use
|
|
9859
|
-
* `Schema.toCodecStringTree` with the `keepDeclarations: true` option.
|
|
9860
|
-
* This serializer preserves values such as numbers and `Blob` objects when
|
|
9861
|
-
* compatible with the schema.
|
|
9862
|
-
*
|
|
9863
10165
|
* **Example** (Parsing non-string values)
|
|
9864
10166
|
*
|
|
9865
10167
|
* ```ts
|
|
@@ -9902,6 +10204,8 @@ export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams>
|
|
|
9902
10204
|
/**
|
|
9903
10205
|
* Schema for JavaScript `URLSearchParams` objects.
|
|
9904
10206
|
*
|
|
10207
|
+
* **Details**
|
|
10208
|
+
*
|
|
9905
10209
|
* The default JSON serializer encodes a `URLSearchParams` as a query string.
|
|
9906
10210
|
*
|
|
9907
10211
|
* @category URLSearchParams
|
|
@@ -9942,11 +10246,19 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
9942
10246
|
* instance, converts it into a tree record using bracket notation, and then
|
|
9943
10247
|
* decodes the resulting structure using the provided schema.
|
|
9944
10248
|
*
|
|
10249
|
+
* **Details**
|
|
10250
|
+
*
|
|
9945
10251
|
* The decoding process has two steps:
|
|
9946
10252
|
*
|
|
9947
10253
|
* 1. Parse `URLSearchParams` into a nested tree record.
|
|
9948
10254
|
* 2. Decode the parsed value with the given schema.
|
|
9949
10255
|
*
|
|
10256
|
+
* You can express nested values using bracket notation.
|
|
10257
|
+
*
|
|
10258
|
+
* If you want to decode values that are not strings, use
|
|
10259
|
+
* `Schema.toCodecStringTree`. This serializer preserves values such as
|
|
10260
|
+
* numbers when compatible with the schema.
|
|
10261
|
+
*
|
|
9950
10262
|
* **Example** (Decoding a flat structure)
|
|
9951
10263
|
*
|
|
9952
10264
|
* ```ts
|
|
@@ -9963,7 +10275,6 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
9963
10275
|
* console.log(String(Schema.decodeUnknownExit(schema)(urlSearchParams)))
|
|
9964
10276
|
* // Success({"a":"1"})
|
|
9965
10277
|
* ```
|
|
9966
|
-
* You can express nested values using bracket notation.
|
|
9967
10278
|
*
|
|
9968
10279
|
* **Example** (Nested fields)
|
|
9969
10280
|
*
|
|
@@ -9986,10 +10297,6 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
9986
10297
|
* // Success({"a":"1","b":{"c":"2","d":"3"}})
|
|
9987
10298
|
* ```
|
|
9988
10299
|
*
|
|
9989
|
-
* If you want to decode values that are not strings, use
|
|
9990
|
-
* `Schema.toCodecStringTree`. This serializer preserves values such as
|
|
9991
|
-
* numbers when compatible with the schema.
|
|
9992
|
-
*
|
|
9993
10300
|
* **Example** (Parsing non-string values)
|
|
9994
10301
|
*
|
|
9995
10302
|
* ```ts
|
|
@@ -10069,12 +10376,14 @@ export interface NumberFromString extends decodeTo<Finite, String> {
|
|
|
10069
10376
|
* A transformation schema that parses a string into a `number` using JavaScript
|
|
10070
10377
|
* number coercion.
|
|
10071
10378
|
*
|
|
10072
|
-
* **
|
|
10379
|
+
* **Details**
|
|
10380
|
+
*
|
|
10381
|
+
* Decoding:
|
|
10073
10382
|
* A `string` is decoded as a number, including possible non-finite values such as
|
|
10074
10383
|
* `NaN`, `Infinity`, and `-Infinity`. Use `FiniteFromString` to reject non-finite
|
|
10075
10384
|
* numbers.
|
|
10076
10385
|
*
|
|
10077
|
-
*
|
|
10386
|
+
* Encoding:
|
|
10078
10387
|
* A number is encoded as a `string`.
|
|
10079
10388
|
*
|
|
10080
10389
|
* @category Number
|
|
@@ -10098,6 +10407,8 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
10098
10407
|
/**
|
|
10099
10408
|
* A transformation schema that parses a string into a finite number.
|
|
10100
10409
|
*
|
|
10410
|
+
* **Details**
|
|
10411
|
+
*
|
|
10101
10412
|
* Decoding:
|
|
10102
10413
|
* - A `string` is decoded as a finite number, rejecting `NaN`, `Infinity`, and
|
|
10103
10414
|
* `-Infinity` values.
|
|
@@ -10126,6 +10437,8 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
10126
10437
|
/**
|
|
10127
10438
|
* A transformation schema that parses a string into a `bigint`.
|
|
10128
10439
|
*
|
|
10440
|
+
* **Details**
|
|
10441
|
+
*
|
|
10129
10442
|
* Decoding:
|
|
10130
10443
|
* - A `string` is decoded as a `bigint`.
|
|
10131
10444
|
*
|
|
@@ -10172,6 +10485,8 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
10172
10485
|
/**
|
|
10173
10486
|
* A transformation schema that trims whitespace from a string.
|
|
10174
10487
|
*
|
|
10488
|
+
* **Details**
|
|
10489
|
+
*
|
|
10175
10490
|
* Decoding:
|
|
10176
10491
|
* - A `string` is decoded as a string with no leading or trailing whitespaces.
|
|
10177
10492
|
*
|
|
@@ -10199,6 +10514,8 @@ export interface StringFromBase64 extends decodeTo<String, String> {
|
|
|
10199
10514
|
/**
|
|
10200
10515
|
* Decodes a base64 (RFC4648) encoded string into a UTF-8 string.
|
|
10201
10516
|
*
|
|
10517
|
+
* **Details**
|
|
10518
|
+
*
|
|
10202
10519
|
* Decoding:
|
|
10203
10520
|
* - A **valid** base64 encoded string is decoded as a UTF-8 `string`.
|
|
10204
10521
|
*
|
|
@@ -10228,6 +10545,8 @@ export interface StringFromBase64Url extends decodeTo<String, String> {
|
|
|
10228
10545
|
/**
|
|
10229
10546
|
* Decodes a base64 (URL) encoded string into a UTF-8 string.
|
|
10230
10547
|
*
|
|
10548
|
+
* **Details**
|
|
10549
|
+
*
|
|
10231
10550
|
* Decoding:
|
|
10232
10551
|
* - A **valid** base64 (URL) encoded string is decoded as a UTF-8 `string`.
|
|
10233
10552
|
*
|
|
@@ -10257,6 +10576,8 @@ export interface StringFromHex extends decodeTo<String, String> {
|
|
|
10257
10576
|
/**
|
|
10258
10577
|
* Decodes a hex encoded string into a UTF-8 string.
|
|
10259
10578
|
*
|
|
10579
|
+
* **Details**
|
|
10580
|
+
*
|
|
10260
10581
|
* Decoding:
|
|
10261
10582
|
* - A **valid** hex encoded string is decoded as a UTF-8 `string`.
|
|
10262
10583
|
*
|
|
@@ -10287,6 +10608,8 @@ export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
|
10287
10608
|
* Decodes a URI component encoded string into a UTF-8 string.
|
|
10288
10609
|
* Can be used to store data in a URL.
|
|
10289
10610
|
*
|
|
10611
|
+
* **Details**
|
|
10612
|
+
*
|
|
10290
10613
|
* Decoding:
|
|
10291
10614
|
* - A **valid** URI component encoded string is decoded as a UTF-8 `string`.
|
|
10292
10615
|
*
|
|
@@ -10332,6 +10655,8 @@ export const PropertyKey = Union([Finite, Symbol, String])
|
|
|
10332
10655
|
/**
|
|
10333
10656
|
* Schema for a Standard Schema v1 failure result.
|
|
10334
10657
|
*
|
|
10658
|
+
* **Details**
|
|
10659
|
+
*
|
|
10335
10660
|
* The result contains an `issues` array where each issue has a message and an
|
|
10336
10661
|
* optional path made of property keys or keyed path segments.
|
|
10337
10662
|
*
|
|
@@ -10392,7 +10717,9 @@ const Base64String = String.annotate({
|
|
|
10392
10717
|
/**
|
|
10393
10718
|
* A schema for JavaScript `Uint8Array` objects.
|
|
10394
10719
|
*
|
|
10395
|
-
* **
|
|
10720
|
+
* **Details**
|
|
10721
|
+
*
|
|
10722
|
+
* Default JSON serializer:
|
|
10396
10723
|
*
|
|
10397
10724
|
* The default JSON serializer encodes Uint8Array as a Base64 encoded string.
|
|
10398
10725
|
*
|
|
@@ -10431,6 +10758,8 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
10431
10758
|
* A transformation schema that decodes a base64 encoded string into a
|
|
10432
10759
|
* `Uint8Array`.
|
|
10433
10760
|
*
|
|
10761
|
+
* **Details**
|
|
10762
|
+
*
|
|
10434
10763
|
* Decoding:
|
|
10435
10764
|
* - A **valid** base64 encoded string is decoded as a `Uint8Array`.
|
|
10436
10765
|
*
|
|
@@ -10459,6 +10788,8 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
10459
10788
|
* A transformation schema that decodes a base64 (URL) encoded string into a
|
|
10460
10789
|
* `Uint8Array`.
|
|
10461
10790
|
*
|
|
10791
|
+
* **Details**
|
|
10792
|
+
*
|
|
10462
10793
|
* Decoding:
|
|
10463
10794
|
* - A **valid** base64 (URL) encoded string is decoded as a `Uint8Array`.
|
|
10464
10795
|
*
|
|
@@ -10492,6 +10823,8 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
10492
10823
|
* A transformation schema that decodes a hex encoded string into a
|
|
10493
10824
|
* `Uint8Array`.
|
|
10494
10825
|
*
|
|
10826
|
+
* **Details**
|
|
10827
|
+
*
|
|
10495
10828
|
* Decoding:
|
|
10496
10829
|
* - A **valid** hex encoded string is decoded as a `Uint8Array`.
|
|
10497
10830
|
*
|
|
@@ -10524,7 +10857,9 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
10524
10857
|
/**
|
|
10525
10858
|
* A schema for `DateTime.Utc` values.
|
|
10526
10859
|
*
|
|
10527
|
-
* **
|
|
10860
|
+
* **Details**
|
|
10861
|
+
*
|
|
10862
|
+
* Default JSON serializer:
|
|
10528
10863
|
*
|
|
10529
10864
|
* - encodes `DateTime.Utc` as a UTC ISO string
|
|
10530
10865
|
*
|
|
@@ -10569,6 +10904,8 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
10569
10904
|
/**
|
|
10570
10905
|
* A transformation schema that decodes a `Date` into a `DateTime.Utc`.
|
|
10571
10906
|
*
|
|
10907
|
+
* **Details**
|
|
10908
|
+
*
|
|
10572
10909
|
* Decoding:
|
|
10573
10910
|
* - A **valid** `Date` is decoded as a `DateTime.Utc`
|
|
10574
10911
|
*
|
|
@@ -10599,6 +10936,8 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
10599
10936
|
/**
|
|
10600
10937
|
* A transformation schema that decodes a date-time string into a `DateTime.Utc`.
|
|
10601
10938
|
*
|
|
10939
|
+
* **Details**
|
|
10940
|
+
*
|
|
10602
10941
|
* Decoding:
|
|
10603
10942
|
*
|
|
10604
10943
|
* - A string accepted by `DateTime.make` is parsed and normalized to UTC. Strings
|
|
@@ -10634,6 +10973,8 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
10634
10973
|
/**
|
|
10635
10974
|
* A transformation schema that decodes a number into a `DateTime.Utc`.
|
|
10636
10975
|
*
|
|
10976
|
+
* **Details**
|
|
10977
|
+
*
|
|
10637
10978
|
* Decoding:
|
|
10638
10979
|
* - A number of milliseconds since the Unix epoch is decoded as a `DateTime.Utc`
|
|
10639
10980
|
*
|
|
@@ -10664,7 +11005,9 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
10664
11005
|
/**
|
|
10665
11006
|
* A schema for `DateTime.TimeZone.Offset` values.
|
|
10666
11007
|
*
|
|
10667
|
-
* **
|
|
11008
|
+
* **Details**
|
|
11009
|
+
*
|
|
11010
|
+
* Default JSON serializer:
|
|
10668
11011
|
*
|
|
10669
11012
|
* - encodes `DateTime.TimeZone.Offset` as a number (offset in milliseconds)
|
|
10670
11013
|
*
|
|
@@ -10711,7 +11054,9 @@ const TimeZoneNamedString = String.annotate({ expected: "an IANA time zone ident
|
|
|
10711
11054
|
/**
|
|
10712
11055
|
* A schema for `DateTime.TimeZone.Named` values.
|
|
10713
11056
|
*
|
|
10714
|
-
* **
|
|
11057
|
+
* **Details**
|
|
11058
|
+
*
|
|
11059
|
+
* Default JSON serializer:
|
|
10715
11060
|
*
|
|
10716
11061
|
* - encodes `DateTime.TimeZone.Named` as a string (IANA time zone identifier)
|
|
10717
11062
|
*
|
|
@@ -10760,6 +11105,8 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
10760
11105
|
/**
|
|
10761
11106
|
* A transformation schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
10762
11107
|
*
|
|
11108
|
+
* **Details**
|
|
11109
|
+
*
|
|
10763
11110
|
* Decoding:
|
|
10764
11111
|
* - A `string` is decoded as a `DateTime.TimeZone.Named`.
|
|
10765
11112
|
*
|
|
@@ -10791,7 +11138,9 @@ const TimeZoneString = String.annotate({
|
|
|
10791
11138
|
/**
|
|
10792
11139
|
* A schema for `DateTime.TimeZone` values.
|
|
10793
11140
|
*
|
|
10794
|
-
* **
|
|
11141
|
+
* **Details**
|
|
11142
|
+
*
|
|
11143
|
+
* Default JSON serializer:
|
|
10795
11144
|
*
|
|
10796
11145
|
* - encodes `DateTime.TimeZone` as a string (IANA identifier or offset like
|
|
10797
11146
|
* `+03:00`)
|
|
@@ -10844,6 +11193,8 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
10844
11193
|
/**
|
|
10845
11194
|
* A transformation schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
10846
11195
|
*
|
|
11196
|
+
* **Details**
|
|
11197
|
+
*
|
|
10847
11198
|
* Decoding:
|
|
10848
11199
|
* - A `string` (IANA identifier or offset like `+03:00`) is decoded as a `DateTime.TimeZone`.
|
|
10849
11200
|
*
|
|
@@ -10875,7 +11226,9 @@ const DateTimeZonedString = String.annotate({
|
|
|
10875
11226
|
/**
|
|
10876
11227
|
* A schema for `DateTime.Zoned` values.
|
|
10877
11228
|
*
|
|
10878
|
-
* **
|
|
11229
|
+
* **Details**
|
|
11230
|
+
*
|
|
11231
|
+
* Default JSON serializer:
|
|
10879
11232
|
*
|
|
10880
11233
|
* - encodes offset zones as an ISO date-time with a numeric offset, such as
|
|
10881
11234
|
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM`
|
|
@@ -10931,6 +11284,8 @@ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String>
|
|
|
10931
11284
|
/**
|
|
10932
11285
|
* A transformation schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
10933
11286
|
*
|
|
11287
|
+
* **Details**
|
|
11288
|
+
*
|
|
10934
11289
|
* Decoding:
|
|
10935
11290
|
* - A `string` (e.g. `2024-01-01T00:00:00.000+00:00[Europe/London]`) is decoded as a `DateTime.Zoned`.
|
|
10936
11291
|
*
|
|
@@ -10951,6 +11306,8 @@ export const DateTimeZonedFromString: DateTimeZonedFromString = DateTimeZonedStr
|
|
|
10951
11306
|
/**
|
|
10952
11307
|
* Interface for schema-backed classes created with {@link Class}.
|
|
10953
11308
|
*
|
|
11309
|
+
* **Details**
|
|
11310
|
+
*
|
|
10954
11311
|
* A `Class` is a TypeScript class whose constructor validates its input
|
|
10955
11312
|
* against a {@link Struct} schema. Instances are always structurally valid.
|
|
10956
11313
|
*
|
|
@@ -10989,7 +11346,9 @@ export interface Class<Self, S extends Top & { readonly fields: Struct.Fields },
|
|
|
10989
11346
|
/**
|
|
10990
11347
|
* Returns a new struct with the fields modified by the provided function.
|
|
10991
11348
|
*
|
|
10992
|
-
* **
|
|
11349
|
+
* **Details**
|
|
11350
|
+
*
|
|
11351
|
+
* Options:
|
|
10993
11352
|
*
|
|
10994
11353
|
* - `unsafePreserveChecks` - if `true`, keep any `.check(...)` constraints
|
|
10995
11354
|
* that were attached to the original struct. Defaults to `false`.
|
|
@@ -11178,6 +11537,8 @@ type MissingSelfGeneric<Usage extends string> =
|
|
|
11178
11537
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
11179
11538
|
* input (unless `disableChecks` is set in the options).
|
|
11180
11539
|
*
|
|
11540
|
+
* **Details**
|
|
11541
|
+
*
|
|
11181
11542
|
* Pass the desired class type as the first type parameter. The second optional
|
|
11182
11543
|
* type parameter can be used to add nominal brands.
|
|
11183
11544
|
*
|
|
@@ -11223,6 +11584,8 @@ export const Class: {
|
|
|
11223
11584
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
11224
11585
|
* input (unless `disableChecks` is set in the options).
|
|
11225
11586
|
*
|
|
11587
|
+
* **Details**
|
|
11588
|
+
*
|
|
11226
11589
|
* Pass the desired class type as the first type parameter. The second optional
|
|
11227
11590
|
* type parameter can be used to add nominal brands.
|
|
11228
11591
|
*
|
|
@@ -11268,6 +11631,8 @@ export const Class: {
|
|
|
11268
11631
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
11269
11632
|
* input (unless `disableChecks` is set in the options).
|
|
11270
11633
|
*
|
|
11634
|
+
* **Details**
|
|
11635
|
+
*
|
|
11271
11636
|
* Pass the desired class type as the first type parameter. The second optional
|
|
11272
11637
|
* type parameter can be used to add nominal brands.
|
|
11273
11638
|
*
|
|
@@ -11316,6 +11681,8 @@ export const Class: {
|
|
|
11316
11681
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
11317
11682
|
* input (unless `disableChecks` is set in the options).
|
|
11318
11683
|
*
|
|
11684
|
+
* **Details**
|
|
11685
|
+
*
|
|
11319
11686
|
* Pass the desired class type as the first type parameter. The second optional
|
|
11320
11687
|
* type parameter can be used to add nominal brands.
|
|
11321
11688
|
*
|
|
@@ -11381,6 +11748,8 @@ export const Class: {
|
|
|
11381
11748
|
* given `tag` value. This makes instances compatible with tagged union
|
|
11382
11749
|
* discrimination patterns.
|
|
11383
11750
|
*
|
|
11751
|
+
* **Details**
|
|
11752
|
+
*
|
|
11384
11753
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
11385
11754
|
* it defaults to the `tag` value.
|
|
11386
11755
|
*
|
|
@@ -11407,6 +11776,8 @@ export const TaggedClass: {
|
|
|
11407
11776
|
* given `tag` value. This makes instances compatible with tagged union
|
|
11408
11777
|
* discrimination patterns.
|
|
11409
11778
|
*
|
|
11779
|
+
* **Details**
|
|
11780
|
+
*
|
|
11410
11781
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
11411
11782
|
* it defaults to the `tag` value.
|
|
11412
11783
|
*
|
|
@@ -11433,6 +11804,8 @@ export const TaggedClass: {
|
|
|
11433
11804
|
* given `tag` value. This makes instances compatible with tagged union
|
|
11434
11805
|
* discrimination patterns.
|
|
11435
11806
|
*
|
|
11807
|
+
* **Details**
|
|
11808
|
+
*
|
|
11436
11809
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
11437
11810
|
* it defaults to the `tag` value.
|
|
11438
11811
|
*
|
|
@@ -11463,6 +11836,8 @@ export const TaggedClass: {
|
|
|
11463
11836
|
* given `tag` value. This makes instances compatible with tagged union
|
|
11464
11837
|
* discrimination patterns.
|
|
11465
11838
|
*
|
|
11839
|
+
* **Details**
|
|
11840
|
+
*
|
|
11466
11841
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
11467
11842
|
* it defaults to the `tag` value.
|
|
11468
11843
|
*
|
|
@@ -11774,6 +12149,8 @@ export type LazyArbitrary<T> = (fc: typeof FastCheck) => FastCheck.Arbitrary<T>
|
|
|
11774
12149
|
* Derives a {@link LazyArbitrary} from a schema. The result is memoized so
|
|
11775
12150
|
* repeated calls with the same schema are cheap.
|
|
11776
12151
|
*
|
|
12152
|
+
* **Details**
|
|
12153
|
+
*
|
|
11777
12154
|
* Prefer {@link toArbitrary} when you just need the arbitrary directly.
|
|
11778
12155
|
*
|
|
11779
12156
|
* @category Arbitrary
|
|
@@ -11817,6 +12194,8 @@ export function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitrary<S["Ty
|
|
|
11817
12194
|
/**
|
|
11818
12195
|
* Annotates a schema with a custom formatter used by `toFormatter`.
|
|
11819
12196
|
*
|
|
12197
|
+
* **Details**
|
|
12198
|
+
*
|
|
11820
12199
|
* Use this when the formatter derived from the schema structure is not suitable.
|
|
11821
12200
|
* The annotation is applied through this helper because adding it directly to
|
|
11822
12201
|
* `Annotations.Bottom` would make schemas invariant.
|
|
@@ -11835,6 +12214,8 @@ export function overrideToFormatter<S extends Top>(toFormatter: () => Formatter<
|
|
|
11835
12214
|
* a value to its human-readable string representation, recursing into structs,
|
|
11836
12215
|
* arrays, and unions.
|
|
11837
12216
|
*
|
|
12217
|
+
* **Details**
|
|
12218
|
+
*
|
|
11838
12219
|
* The optional `onBefore` hook lets you intercept specific AST nodes before
|
|
11839
12220
|
* the default formatting logic runs.
|
|
11840
12221
|
*
|
|
@@ -12047,6 +12428,8 @@ export interface ToJsonSchemaOptions {
|
|
|
12047
12428
|
* Controls how additional properties are handled while resolving the JSON
|
|
12048
12429
|
* schema.
|
|
12049
12430
|
*
|
|
12431
|
+
* **Details**
|
|
12432
|
+
*
|
|
12050
12433
|
* Possible values include:
|
|
12051
12434
|
* - `false`: Disallow additional properties (default)
|
|
12052
12435
|
* - `true`: Allow additional properties
|
|
@@ -12063,6 +12446,8 @@ export interface ToJsonSchemaOptions {
|
|
|
12063
12446
|
/**
|
|
12064
12447
|
* Returns a JSON Schema document using draft 2020-12.
|
|
12065
12448
|
*
|
|
12449
|
+
* **Details**
|
|
12450
|
+
*
|
|
12066
12451
|
* The `options` parameter controls generation details such as additional
|
|
12067
12452
|
* properties and synthesized check descriptions; it does not change the draft
|
|
12068
12453
|
* target.
|
|
@@ -12203,10 +12588,12 @@ export type StringTree = Tree<string | undefined>
|
|
|
12203
12588
|
* The StringTree canonical codec converts **every leaf value to a string**, while
|
|
12204
12589
|
* preserving the original structure.
|
|
12205
12590
|
*
|
|
12591
|
+
* **Details**
|
|
12592
|
+
*
|
|
12206
12593
|
* Declarations are converted to `undefined` (unless they have a
|
|
12207
12594
|
* `toCodecJson` or `toCodec` annotation).
|
|
12208
12595
|
*
|
|
12209
|
-
*
|
|
12596
|
+
* Options:
|
|
12210
12597
|
*
|
|
12211
12598
|
* - `keepDeclarations`: if `true`, it **does not** convert declarations to
|
|
12212
12599
|
* `undefined` but instead keeps them as they are (unless they have a
|
|
@@ -12251,6 +12638,8 @@ type XmlEncoderOptions = {
|
|
|
12251
12638
|
/**
|
|
12252
12639
|
* Derives an XML encoder from a codec.
|
|
12253
12640
|
*
|
|
12641
|
+
* **Details**
|
|
12642
|
+
*
|
|
12254
12643
|
* The returned function encodes a value through `toCodecStringTree` and returns
|
|
12255
12644
|
* an `Effect` that succeeds with the XML string or fails with `SchemaError` if
|
|
12256
12645
|
* codec encoding fails.
|
|
@@ -12791,6 +13180,8 @@ export function resolveAnnotationsKey<S extends Top>(schema: S): Annotations.Key
|
|
|
12791
13180
|
* metadata to schemas. Annotations control documentation, validation messages,
|
|
12792
13181
|
* JSON Schema generation, equivalence, arbitrary generation, and more.
|
|
12793
13182
|
*
|
|
13183
|
+
* **Details**
|
|
13184
|
+
*
|
|
12794
13185
|
* Use {@link resolveAnnotations} to read the annotations attached to a schema at
|
|
12795
13186
|
* runtime.
|
|
12796
13187
|
*
|
|
@@ -12801,6 +13192,8 @@ export declare namespace Annotations {
|
|
|
12801
13192
|
* This interface is used to define the annotations that can be attached to a
|
|
12802
13193
|
* schema. You can extend this interface to define your own annotations.
|
|
12803
13194
|
*
|
|
13195
|
+
* **Details**
|
|
13196
|
+
*
|
|
12804
13197
|
* Note that both a missing key or `undefined` is used to indicate that the
|
|
12805
13198
|
* annotation is not present.
|
|
12806
13199
|
*
|
|
@@ -12853,6 +13246,8 @@ export declare namespace Annotations {
|
|
|
12853
13246
|
/**
|
|
12854
13247
|
* Human-readable description of what a value is expected to satisfy.
|
|
12855
13248
|
*
|
|
13249
|
+
* **Details**
|
|
13250
|
+
*
|
|
12856
13251
|
* For filter and refinement failures, the default formatter uses
|
|
12857
13252
|
* `message` first, then `expected`, and finally falls back to `<filter>`.
|
|
12858
13253
|
*
|
|
@@ -12909,6 +13304,8 @@ export declare namespace Annotations {
|
|
|
12909
13304
|
/**
|
|
12910
13305
|
* Complete message to use when this schema node reports an issue.
|
|
12911
13306
|
*
|
|
13307
|
+
* **Details**
|
|
13308
|
+
*
|
|
12912
13309
|
* This replaces the default message for matching issue types instead of
|
|
12913
13310
|
* only changing the expected label. For a filter or refinement failure,
|
|
12914
13311
|
* annotate the filter with `message` to replace the whole filter failure
|
|
@@ -12923,6 +13320,8 @@ export declare namespace Annotations {
|
|
|
12923
13320
|
/**
|
|
12924
13321
|
* Stable identifier for this schema node.
|
|
12925
13322
|
*
|
|
13323
|
+
* **Details**
|
|
13324
|
+
*
|
|
12926
13325
|
* Identifiers are used by schema tooling, including JSON Schema
|
|
12927
13326
|
* generation, to name references. The default formatter also uses
|
|
12928
13327
|
* `identifier` as the expected label for type-level failures, such as
|
|
@@ -13029,6 +13428,8 @@ export declare namespace Annotations {
|
|
|
13029
13428
|
/**
|
|
13030
13429
|
* Complete message to use when this filter or refinement fails.
|
|
13031
13430
|
*
|
|
13431
|
+
* **Details**
|
|
13432
|
+
*
|
|
13032
13433
|
* The default formatter checks filter annotations in this order:
|
|
13033
13434
|
* `message`, then `expected`, then `<filter>`.
|
|
13034
13435
|
*/
|
|
@@ -13036,6 +13437,8 @@ export declare namespace Annotations {
|
|
|
13036
13437
|
/**
|
|
13037
13438
|
* Stable identifier for the schema after this filter is attached.
|
|
13038
13439
|
*
|
|
13440
|
+
* **Details**
|
|
13441
|
+
*
|
|
13039
13442
|
* This can affect schema tooling such as JSON Schema generation and
|
|
13040
13443
|
* type-level failures before the filter runs, but it does not name the
|
|
13041
13444
|
* failed filter itself. For filter failure messages, use `expected` or
|
|
@@ -13054,6 +13457,8 @@ export declare namespace Annotations {
|
|
|
13054
13457
|
* structure of the container (e.g., array length, object keys) rather than
|
|
13055
13458
|
* the contents.
|
|
13056
13459
|
*
|
|
13460
|
+
* **Details**
|
|
13461
|
+
*
|
|
13057
13462
|
* Example: `minLength` on an array is a structural filter.
|
|
13058
13463
|
*/
|
|
13059
13464
|
readonly "~structural"?: boolean | undefined
|
|
@@ -13153,6 +13558,8 @@ export declare namespace Annotations {
|
|
|
13153
13558
|
/**
|
|
13154
13559
|
* Hook signature for declaration schema arbitrary annotations.
|
|
13155
13560
|
*
|
|
13561
|
+
* **Details**
|
|
13562
|
+
*
|
|
13156
13563
|
* Given arbitraries for any type parameters, returns a function that receives the
|
|
13157
13564
|
* fast-check module and derivation context and produces an arbitrary for `T`.
|
|
13158
13565
|
*
|
|
@@ -13177,6 +13584,8 @@ export declare namespace Annotations {
|
|
|
13177
13584
|
/**
|
|
13178
13585
|
* Hook signature for declaration schema formatter annotations.
|
|
13179
13586
|
*
|
|
13587
|
+
* **Details**
|
|
13588
|
+
*
|
|
13180
13589
|
* Given formatters for any type parameters, returns a formatter for `T`.
|
|
13181
13590
|
*
|
|
13182
13591
|
* @category models
|
|
@@ -13200,6 +13609,8 @@ export declare namespace Annotations {
|
|
|
13200
13609
|
/**
|
|
13201
13610
|
* Hook signature for declaration schema equivalence annotations.
|
|
13202
13611
|
*
|
|
13612
|
+
* **Details**
|
|
13613
|
+
*
|
|
13203
13614
|
* Given equivalences for any type parameters, returns an `Equivalence` for `T`.
|
|
13204
13615
|
*
|
|
13205
13616
|
* @category models
|
|
@@ -13216,6 +13627,8 @@ export declare namespace Annotations {
|
|
|
13216
13627
|
/**
|
|
13217
13628
|
* Annotations that can be attached to schema issues.
|
|
13218
13629
|
*
|
|
13630
|
+
* **Details**
|
|
13631
|
+
*
|
|
13219
13632
|
* The optional `message` field overrides the default issue message.
|
|
13220
13633
|
*
|
|
13221
13634
|
* @category models
|
|
@@ -13228,6 +13641,8 @@ export declare namespace Annotations {
|
|
|
13228
13641
|
/**
|
|
13229
13642
|
* Registry of metadata payloads emitted by built-in schema filters and checks.
|
|
13230
13643
|
*
|
|
13644
|
+
* **Details**
|
|
13645
|
+
*
|
|
13231
13646
|
* Do not augment this interface with custom metadata; extend `MetaDefinitions`
|
|
13232
13647
|
* instead.
|
|
13233
13648
|
*
|
|
@@ -13451,6 +13866,8 @@ export declare namespace Annotations {
|
|
|
13451
13866
|
/**
|
|
13452
13867
|
* Augmentable registry of schema filter metadata payloads.
|
|
13453
13868
|
*
|
|
13869
|
+
* **Details**
|
|
13870
|
+
*
|
|
13454
13871
|
* Extend this interface to add custom values accepted by annotation `meta`
|
|
13455
13872
|
* fields.
|
|
13456
13873
|
*
|