effect 4.0.0 → 4.0.2
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/ai-docs/package.json +2 -2
- package/ai-docs/tsconfig.json +2 -1
- package/dist/Array.d.ts +339 -0
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +143 -3
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +88 -0
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +44 -0
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +68 -0
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +36 -0
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +34 -0
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +18 -0
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +9 -0
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +6 -0
- package/dist/Brand.js.map +1 -1
- package/dist/ByteSize.d.ts +86 -0
- package/dist/ByteSize.d.ts.map +1 -1
- package/dist/ByteSize.js +51 -0
- package/dist/ByteSize.js.map +1 -1
- package/dist/Cache.d.ts +38 -1
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +47 -23
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +82 -0
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +61 -1
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +327 -4
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +168 -8
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +11 -0
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +6 -0
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +192 -0
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +78 -0
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +7 -0
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +5 -0
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +10 -0
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +8 -0
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +52 -12
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +55 -5
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +28 -0
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +19 -0
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +22 -0
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +20 -0
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +50 -0
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +21 -0
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +16 -0
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +26 -1
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +5 -0
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +3 -0
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +13 -0
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +5 -0
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +171 -0
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +89 -0
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +51 -0
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +22 -0
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +2 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +1 -0
- package/dist/Duration.d.ts +90 -0
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +53 -0
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +677 -22
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +251 -10
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +4 -0
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -0
- package/dist/Effectable.js.map +1 -1
- package/dist/Equal.d.ts +8 -0
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +9 -1
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +21 -0
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +16 -0
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +36 -0
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +11 -0
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +49 -8
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +7 -0
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +40 -0
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +27 -0
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +20 -0
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +11 -0
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +21 -0
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +21 -4
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +35 -0
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +19 -0
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +20 -0
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +14 -0
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +15 -0
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +8 -0
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +55 -0
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +28 -0
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +3 -0
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +39 -1
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +30 -0
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +20 -0
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +247 -12
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +149 -28
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +5 -0
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +14 -0
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +12 -0
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +91 -0
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +39 -0
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +17 -0
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +22 -5
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +49 -0
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +19 -0
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +7 -0
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +6 -0
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +127 -0
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +51 -0
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +4 -0
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +3 -0
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +5 -0
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +5 -0
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +16 -0
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +11 -0
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +14 -0
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +10 -0
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +100 -0
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +45 -1
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +7 -0
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +4 -0
- package/dist/LayerMap.js.map +1 -1
- package/dist/LayerRef.d.ts +5 -0
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +3 -0
- package/dist/LayerRef.js.map +1 -1
- package/dist/LogLevel.d.ts +20 -0
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +9 -0
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +25 -0
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +30 -4
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +5 -0
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +9 -1
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +51 -0
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +39 -0
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +59 -0
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +31 -0
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +32 -0
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +16 -0
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +16 -0
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +10 -0
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +20 -0
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +18 -0
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +31 -0
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +17 -0
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +9 -0
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +6 -0
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +4 -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 +61 -0
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +31 -0
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +41 -0
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +20 -0
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +134 -0
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +61 -0
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +29 -0
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +24 -0
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +7 -0
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +3 -0
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +24 -0
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +47 -21
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +6 -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 +7 -0
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +5 -0
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +8 -0
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +7 -0
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +28 -5
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +42 -42
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +84 -0
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +48 -0
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +5 -0
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +4 -0
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +67 -5
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +60 -8
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +20 -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 +60 -0
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +58 -8
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +13 -0
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +9 -0
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +23 -0
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +24 -1
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +6 -0
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +3 -0
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +100 -0
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +43 -0
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +6 -0
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +4 -0
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +8 -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 +4 -0
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +3 -0
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +20 -0
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +16 -0
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +21 -0
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +19 -0
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +3 -0
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +4 -0
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +32 -0
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +12 -0
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +42 -0
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +27 -6
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +6 -0
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +6 -0
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +91 -0
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +41 -0
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +9 -0
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +7 -0
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +57 -0
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +32 -0
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +7 -0
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +5 -0
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +496 -1
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +280 -1
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +107 -0
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +81 -1
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +69 -2
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +63 -4
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +33 -0
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +18 -0
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +25 -0
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +26 -0
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +147 -0
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +99 -0
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +53 -0
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +46 -0
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +19 -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 +34 -0
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +50 -19
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +9 -0
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +6 -0
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +26 -0
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +10 -0
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +125 -1
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +75 -1
- package/dist/Sink.js.map +1 -1
- package/dist/StandardSchema.d.ts +1 -0
- package/dist/StandardSchema.d.ts.map +1 -1
- package/dist/StandardSchema.js +1 -0
- package/dist/Stdio.d.ts +7 -0
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +5 -0
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +603 -6
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +316 -57
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +87 -0
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +61 -0
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +46 -0
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +19 -0
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +65 -0
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +25 -0
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +2 -0
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +2 -0
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +63 -0
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +24 -0
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +3 -0
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +1 -0
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +8 -0
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +4 -0
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +23 -0
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +12 -0
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +68 -0
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +28 -0
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +38 -0
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +18 -0
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +52 -0
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +23 -0
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +15 -0
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +8 -0
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +83 -0
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +52 -7
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +51 -0
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +29 -4
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +30 -0
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +22 -1
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +25 -0
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +19 -0
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +51 -0
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +30 -0
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +24 -0
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +32 -18
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +14 -0
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +7 -0
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +25 -0
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +29 -13
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +25 -0
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +12 -0
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +36 -0
- package/dist/Types.d.ts.map +1 -1
- package/dist/Types.js +1 -0
- package/dist/UndefinedOr.d.ts +15 -0
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +9 -0
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +15 -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 +4 -0
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +1 -0
- package/dist/Utils.js.map +1 -1
- package/dist/Version.d.ts +26 -0
- package/dist/Version.d.ts.map +1 -0
- package/dist/Version.js +36 -0
- package/dist/Version.js.map +1 -0
- package/dist/ai/Chat.js +1 -1
- package/dist/ai/Chat.js.map +1 -1
- package/dist/ai/DecisionModel.d.ts +22 -0
- package/dist/ai/DecisionModel.d.ts.map +1 -1
- package/dist/ai/DecisionModel.js +22 -4
- package/dist/ai/DecisionModel.js.map +1 -1
- package/dist/ai/LanguageModel.d.ts +8 -0
- package/dist/ai/LanguageModel.d.ts.map +1 -1
- package/dist/ai/LanguageModel.js +27 -15
- package/dist/ai/LanguageModel.js.map +1 -1
- package/dist/ai/McpSchema.d.ts +508 -508
- package/dist/ai/McpSchema.d.ts.map +1 -1
- package/dist/ai/McpSchema.js +1 -1
- package/dist/ai/McpSchema.js.map +1 -1
- package/dist/ai/McpServer.d.ts +32 -11
- package/dist/ai/McpServer.d.ts.map +1 -1
- package/dist/ai/McpServer.js +224 -172
- package/dist/ai/McpServer.js.map +1 -1
- package/dist/ai/Response.d.ts.map +1 -1
- package/dist/ai/Response.js +22 -12
- package/dist/ai/Response.js.map +1 -1
- package/dist/ai/Telemetry.d.ts +49 -41
- package/dist/ai/Telemetry.d.ts.map +1 -1
- package/dist/ai/Telemetry.js +6 -8
- package/dist/ai/Telemetry.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2024_11_05.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2025_03_26.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2025_06_18.js.map +1 -1
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js +1 -0
- package/dist/ai/internal/mcpProtocol/v2025_11_25.js.map +1 -1
- package/dist/ai/internal/mcpRuntime.js +79 -46
- package/dist/ai/internal/mcpRuntime.js.map +1 -1
- package/dist/ai/internal/mcpSchema/v2024_11_05.js +3 -1
- package/dist/ai/internal/mcpSchema/v2024_11_05.js.map +1 -1
- package/dist/ai/internal/mcpStatefulRuntime.js +1 -0
- package/dist/ai/internal/mcpStatefulRuntime.js.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.js +11 -2
- package/dist/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/cluster/K8sHttpClient.js +5 -2
- package/dist/cluster/K8sHttpClient.js.map +1 -1
- package/dist/cluster/Sharding.d.ts.map +1 -1
- package/dist/cluster/Sharding.js +14 -7
- package/dist/cluster/Sharding.js.map +1 -1
- package/dist/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/cluster/SqlMessageStorage.js +21 -12
- package/dist/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/cluster/SqlRunnerStorage.js +30 -44
- package/dist/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/cluster/internal/entityManager.js +63 -62
- package/dist/cluster/internal/entityManager.js.map +1 -1
- package/dist/cluster/internal/interruptors.js +8 -0
- package/dist/cluster/internal/interruptors.js.map +1 -1
- package/dist/cluster/internal/resourceMap.js +39 -14
- package/dist/cluster/internal/resourceMap.js.map +1 -1
- package/dist/cluster/internal/resourceRef.js +168 -87
- package/dist/cluster/internal/resourceRef.js.map +1 -1
- package/dist/encoding/Base64.d.ts +4 -0
- package/dist/encoding/Base64.d.ts.map +1 -1
- package/dist/encoding/Base64.js +4 -0
- package/dist/encoding/Base64.js.map +1 -1
- package/dist/encoding/Base64Url.d.ts +4 -0
- package/dist/encoding/Base64Url.d.ts.map +1 -1
- package/dist/encoding/Base64Url.js +4 -0
- package/dist/encoding/Base64Url.js.map +1 -1
- package/dist/encoding/EncodingError.d.ts +4 -0
- package/dist/encoding/EncodingError.d.ts.map +1 -1
- package/dist/encoding/EncodingError.js +4 -0
- package/dist/encoding/EncodingError.js.map +1 -1
- package/dist/encoding/Hex.d.ts +5 -0
- package/dist/encoding/Hex.d.ts.map +1 -1
- package/dist/encoding/Hex.js +5 -0
- package/dist/encoding/Hex.js.map +1 -1
- package/dist/encoding/Toml.js +2 -2
- package/dist/encoding/Toml.js.map +1 -1
- package/dist/encoding/Yaml.d.ts.map +1 -1
- package/dist/encoding/Yaml.js +6 -4
- package/dist/encoding/Yaml.js.map +1 -1
- package/dist/encoding/index.d.ts +4 -0
- package/dist/encoding/index.d.ts.map +1 -1
- package/dist/encoding/index.js +4 -0
- package/dist/encoding/index.js.map +1 -1
- package/dist/eventlog/SqlEventJournal.js +8 -4
- package/dist/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/eventlog/SqlEventLogServerUnencrypted.d.ts +27 -10
- package/dist/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/eventlog/SqlEventLogServerUnencrypted.js +49 -7
- package/dist/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/http/Headers.d.ts +3 -1
- package/dist/http/Headers.d.ts.map +1 -1
- package/dist/http/Headers.js +4 -2
- package/dist/http/Headers.js.map +1 -1
- package/dist/http/HttpClient.d.ts +9 -0
- package/dist/http/HttpClient.d.ts.map +1 -1
- package/dist/http/HttpClient.js +40 -21
- package/dist/http/HttpClient.js.map +1 -1
- package/dist/http/HttpClientResponse.js +3 -1
- package/dist/http/HttpClientResponse.js.map +1 -1
- package/dist/http/HttpEffect.d.ts +3 -0
- package/dist/http/HttpEffect.d.ts.map +1 -1
- package/dist/http/HttpEffect.js +5 -2
- package/dist/http/HttpEffect.js.map +1 -1
- package/dist/http/HttpMiddleware.d.ts +17 -0
- package/dist/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/http/HttpMiddleware.js +58 -40
- package/dist/http/HttpMiddleware.js.map +1 -1
- package/dist/http/HttpServer.d.ts +1 -1
- package/dist/http/HttpServer.d.ts.map +1 -1
- package/dist/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/http/HttpStaticServer.js +14 -0
- package/dist/http/HttpStaticServer.js.map +1 -1
- package/dist/http/HttpTraceContext.d.ts +1 -1
- package/dist/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/http/HttpTraceContext.js +4 -4
- package/dist/http/HttpTraceContext.js.map +1 -1
- package/dist/http/internal/tracing.d.ts +2 -0
- package/dist/http/internal/tracing.d.ts.map +1 -0
- package/dist/http/internal/tracing.js +37 -0
- package/dist/http/internal/tracing.js.map +1 -0
- package/dist/http-api/HttpApiBuilder.js +2 -1
- package/dist/http-api/HttpApiBuilder.js.map +1 -1
- package/dist/http-api/HttpApiClient.d.ts +12 -3
- package/dist/http-api/HttpApiClient.d.ts.map +1 -1
- package/dist/http-api/HttpApiClient.js.map +1 -1
- package/dist/http-api/HttpApiError.d.ts +4 -2
- package/dist/http-api/HttpApiError.d.ts.map +1 -1
- package/dist/http-api/HttpApiError.js +7 -3
- package/dist/http-api/HttpApiError.js.map +1 -1
- package/dist/http-api/HttpApiSecurity.d.ts +8 -8
- package/dist/http-api/HttpApiSecurity.js +8 -8
- package/dist/index.d.ts +155 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +155 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/arbitrary/array.js +3 -3
- package/dist/internal/arbitrary/array.js.map +1 -1
- package/dist/internal/arbitrary/model.js +26 -11
- package/dist/internal/arbitrary/model.js.map +1 -1
- package/dist/internal/arbitrary/runner.js +8 -8
- package/dist/internal/arbitrary/runner.js.map +1 -1
- package/dist/internal/arbitrary/schema.js +4 -5
- package/dist/internal/arbitrary/schema.js.map +1 -1
- package/dist/internal/core.js +43 -2
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +1 -1
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/effect.js +104 -120
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/rcRef.js +59 -23
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/schedule.js +7 -5
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.js +11 -8
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/standardSchema.js +2 -2
- package/dist/internal/schema/standardSchema.js.map +1 -1
- package/dist/internal/version.d.ts +2 -0
- package/dist/internal/version.d.ts.map +1 -0
- package/dist/internal/version.js +3 -0
- package/dist/internal/version.js.map +1 -0
- package/dist/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/observability/OtlpExporter.js +5 -6
- package/dist/observability/OtlpExporter.js.map +1 -1
- package/dist/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/observability/OtlpLogger.js +23 -27
- package/dist/observability/OtlpLogger.js.map +1 -1
- package/dist/observability/OtlpMetrics.d.ts +5 -3
- package/dist/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/observability/OtlpMetrics.js +21 -94
- package/dist/observability/OtlpMetrics.js.map +1 -1
- package/dist/observability/OtlpResource.d.ts +4 -3
- package/dist/observability/OtlpResource.d.ts.map +1 -1
- package/dist/observability/OtlpResource.js +20 -23
- package/dist/observability/OtlpResource.js.map +1 -1
- package/dist/observability/OtlpTracer.d.ts +1 -0
- package/dist/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/observability/OtlpTracer.js +32 -36
- package/dist/observability/OtlpTracer.js.map +1 -1
- package/dist/observability/internal/otlpProtobuf.js +32 -1
- package/dist/observability/internal/otlpProtobuf.js.map +1 -1
- package/dist/reactivity/AsyncResult.d.ts +1 -1
- package/dist/reactivity/Atom.d.ts +5 -5
- package/dist/reactivity/Atom.d.ts.map +1 -1
- package/dist/reactivity/Atom.js +9 -5
- package/dist/reactivity/Atom.js.map +1 -1
- package/dist/reactivity/AtomHttpApi.d.ts +2 -2
- package/dist/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/reactivity/AtomRegistry.d.ts +8 -0
- package/dist/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/reactivity/AtomRegistry.js.map +1 -1
- package/dist/rpc/RpcClient.d.ts +21 -3
- package/dist/rpc/RpcClient.d.ts.map +1 -1
- package/dist/rpc/RpcClient.js +58 -34
- package/dist/rpc/RpcClient.js.map +1 -1
- package/dist/rpc/RpcServer.d.ts.map +1 -1
- package/dist/rpc/RpcServer.js +20 -23
- package/dist/rpc/RpcServer.js.map +1 -1
- package/dist/rpc/Utils.d.ts +2 -3
- package/dist/rpc/Utils.d.ts.map +1 -1
- package/dist/rpc/Utils.js +3 -4
- package/dist/rpc/Utils.js.map +1 -1
- package/dist/rpc/internal/tracing.d.ts +2 -0
- package/dist/rpc/internal/tracing.d.ts.map +1 -0
- package/dist/rpc/internal/tracing.js +18 -0
- package/dist/rpc/internal/tracing.js.map +1 -0
- package/dist/schema/SchemaCompiler/runtime.js +9 -1
- package/dist/schema/SchemaCompiler/runtime.js.map +1 -1
- package/dist/sql/SqlClient.js +4 -4
- package/dist/sql/SqlClient.js.map +1 -1
- package/dist/sql/Statement.d.ts +21 -1
- package/dist/sql/Statement.d.ts.map +1 -1
- package/dist/sql/Statement.js +55 -7
- package/dist/sql/Statement.js.map +1 -1
- package/dist/testing/TestClock.d.ts +8 -0
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +7 -0
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +7 -0
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +6 -0
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/workflow/WorkflowEngine.d.ts +2 -0
- package/dist/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/workflow/WorkflowEngine.js +1 -0
- package/dist/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +3 -3
- package/src/Array.ts +351 -3
- package/src/BigDecimal.ts +88 -0
- package/src/BigInt.ts +68 -0
- package/src/Boolean.ts +34 -0
- package/src/Brand.ts +10 -0
- package/src/ByteSize.ts +87 -0
- package/src/Cache.ts +72 -24
- package/src/Cause.ts +83 -1
- package/src/Channel.ts +368 -18
- package/src/ChannelSchema.ts +13 -0
- package/src/Chunk.ts +193 -0
- package/src/Clock.ts +7 -0
- package/src/Combiner.ts +10 -0
- package/src/Config.ts +82 -8
- package/src/ConfigProvider.ts +28 -0
- package/src/Console.ts +26 -0
- package/src/Context.ts +50 -0
- package/src/Cron.ts +32 -1
- package/src/Crypto.ts +5 -0
- package/src/Data.ts +13 -0
- package/src/DateTime.ts +171 -0
- package/src/Deferred.ts +51 -0
- package/src/Differ.ts +2 -0
- package/src/Duration.ts +90 -0
- package/src/Effect.ts +692 -27
- package/src/Effectable.ts +4 -0
- package/src/Equal.ts +12 -1
- package/src/Equivalence.ts +22 -0
- package/src/ErrorReporter.ts +36 -0
- package/src/ExecutionPlan.ts +58 -14
- package/src/Exit.ts +40 -0
- package/src/Fiber.ts +20 -0
- package/src/FiberHandle.ts +29 -4
- package/src/FiberMap.ts +38 -0
- package/src/FiberSet.ts +21 -0
- package/src/FileSystem.ts +16 -0
- package/src/Filter.ts +55 -0
- package/src/Formatter.ts +42 -1
- package/src/Function.ts +30 -0
- package/src/Graph.ts +317 -36
- package/src/HKT.ts +5 -0
- package/src/Hash.ts +15 -0
- package/src/HashMap.ts +91 -0
- package/src/HashRing.ts +32 -5
- package/src/HashSet.ts +53 -0
- package/src/Inspectable.ts +8 -0
- package/src/Iterable.ts +127 -0
- package/src/JsonPatch.ts +5 -0
- package/src/JsonPointer.ts +5 -0
- package/src/JsonSchema.ts +17 -0
- package/src/Latch.ts +14 -0
- package/src/Layer.ts +101 -1
- package/src/LayerMap.ts +7 -0
- package/src/LayerRef.ts +5 -0
- package/src/LogLevel.ts +20 -0
- package/src/Logger.ts +41 -5
- package/src/ManagedRuntime.ts +12 -1
- package/src/Match.ts +52 -0
- package/src/Metric.ts +69 -0
- package/src/MutableHashMap.ts +44 -0
- package/src/MutableHashSet.ts +17 -0
- package/src/MutableList.ts +21 -0
- package/src/MutableRef.ts +32 -0
- package/src/Newtype.ts +9 -0
- package/src/NonEmptyIterable.ts +4 -0
- package/src/Number.ts +61 -0
- package/src/Optic.ts +57 -0
- package/src/Option.ts +134 -0
- package/src/Order.ts +30 -0
- package/src/Ordering.ts +7 -0
- package/src/PartitionedSemaphore.ts +61 -22
- package/src/Path.ts +6 -0
- package/src/Pipeable.ts +7 -0
- package/src/PlatformError.ts +8 -0
- package/src/Pool.ts +48 -37
- package/src/Predicate.ts +85 -0
- package/src/PrimaryKey.ts +5 -0
- package/src/PubSub.ts +90 -9
- package/src/Pull.ts +20 -0
- package/src/Queue.ts +80 -10
- package/src/Random.ts +13 -0
- package/src/RcMap.ts +49 -2
- package/src/RcRef.ts +6 -0
- package/src/Record.ts +100 -0
- package/src/Redactable.ts +6 -0
- package/src/Redacted.ts +8 -0
- package/src/Reducer.ts +4 -0
- package/src/Ref.ts +42 -0
- package/src/References.ts +21 -0
- package/src/RegExp.ts +4 -0
- package/src/Request.ts +32 -0
- package/src/RequestResolver.ts +59 -10
- package/src/Resource.ts +7 -0
- package/src/Result.ts +93 -0
- package/src/Runtime.ts +10 -0
- package/src/Schedule.ts +61 -0
- package/src/Scheduler.ts +7 -0
- package/src/Schema.ts +499 -4
- package/src/SchemaAST.ts +115 -1
- package/src/SchemaGetter.ts +80 -4
- package/src/SchemaIssue.ts +34 -0
- package/src/SchemaParser.ts +26 -0
- package/src/SchemaRepresentation.ts +148 -0
- package/src/SchemaTransformation.ts +53 -0
- package/src/Scope.ts +19 -0
- package/src/ScopedCache.ts +82 -19
- package/src/ScopedRef.ts +9 -0
- package/src/Semaphore.ts +26 -0
- package/src/Sink.ts +126 -2
- package/src/StandardSchema.ts +1 -0
- package/src/Stdio.ts +7 -0
- package/src/Stream.ts +780 -103
- package/src/String.ts +87 -0
- package/src/Struct.ts +46 -0
- package/src/SubscriptionRef.ts +65 -0
- package/src/Symbol.ts +2 -0
- package/src/SynchronizedRef.ts +63 -0
- package/src/Take.ts +3 -0
- package/src/Terminal.ts +8 -0
- package/src/Tracer.ts +23 -0
- package/src/Trie.ts +68 -0
- package/src/Tuple.ts +38 -0
- package/src/TxChunk.ts +52 -0
- package/src/TxDeferred.ts +15 -0
- package/src/TxHashMap.ts +97 -6
- package/src/TxHashSet.ts +83 -3
- package/src/TxPriorityQueue.ts +34 -2
- package/src/TxPubSub.ts +26 -0
- package/src/TxQueue.ts +51 -0
- package/src/TxReentrantLock.ts +53 -36
- package/src/TxRef.ts +14 -0
- package/src/TxSemaphore.ts +47 -31
- package/src/TxSubscriptionRef.ts +25 -0
- package/src/Types.ts +36 -0
- package/src/UndefinedOr.ts +15 -0
- package/src/Unify.ts +15 -0
- package/src/Utils.ts +4 -0
- package/src/Version.ts +38 -0
- package/src/ai/Chat.ts +1 -1
- package/src/ai/DecisionModel.ts +42 -1
- package/src/ai/LanguageModel.ts +43 -21
- package/src/ai/McpSchema.ts +3 -3
- package/src/ai/McpServer.ts +119 -39
- package/src/ai/Response.ts +27 -12
- package/src/ai/Telemetry.ts +62 -58
- package/src/ai/internal/mcpProtocol/v2024_11_05.ts +1 -0
- package/src/ai/internal/mcpProtocol/v2025_03_26.ts +1 -0
- package/src/ai/internal/mcpProtocol/v2025_06_18.ts +1 -0
- package/src/ai/internal/mcpProtocol/v2025_11_25.ts +1 -0
- package/src/ai/internal/mcpRuntime.ts +84 -43
- package/src/ai/internal/mcpSchema/v2024_11_05.ts +4 -2
- package/src/ai/internal/mcpStatefulRuntime.ts +2 -0
- package/src/cluster/ClusterWorkflowEngine.ts +18 -4
- package/src/cluster/K8sHttpClient.ts +12 -2
- package/src/cluster/Sharding.ts +24 -24
- package/src/cluster/SqlMessageStorage.ts +26 -13
- package/src/cluster/SqlRunnerStorage.ts +85 -113
- package/src/cluster/internal/entityManager.ts +68 -80
- package/src/cluster/internal/interruptors.ts +13 -0
- package/src/cluster/internal/resourceMap.ts +55 -17
- package/src/cluster/internal/resourceRef.ts +189 -96
- package/src/encoding/Base64.ts +4 -0
- package/src/encoding/Base64Url.ts +4 -0
- package/src/encoding/EncodingError.ts +5 -0
- package/src/encoding/Hex.ts +5 -0
- package/src/encoding/Toml.ts +2 -2
- package/src/encoding/Yaml.ts +8 -4
- package/src/encoding/index.ts +4 -0
- package/src/eventlog/SqlEventJournal.ts +18 -4
- package/src/eventlog/SqlEventLogServerUnencrypted.ts +282 -235
- package/src/http/Headers.ts +8 -2
- package/src/http/HttpClient.ts +44 -27
- package/src/http/HttpClientResponse.ts +3 -1
- package/src/http/HttpEffect.ts +11 -2
- package/src/http/HttpMiddleware.ts +67 -46
- package/src/http/HttpServer.ts +1 -1
- package/src/http/HttpStaticServer.ts +16 -0
- package/src/http/HttpTraceContext.ts +8 -4
- package/src/http/internal/tracing.ts +52 -0
- package/src/http-api/HttpApiBuilder.ts +5 -1
- package/src/http-api/HttpApiClient.ts +13 -4
- package/src/http-api/HttpApiError.ts +8 -3
- package/src/http-api/HttpApiSecurity.ts +8 -8
- package/src/index.ts +156 -0
- package/src/internal/arbitrary/array.ts +3 -3
- package/src/internal/arbitrary/model.ts +37 -14
- package/src/internal/arbitrary/runner.ts +7 -7
- package/src/internal/arbitrary/schema.ts +4 -3
- package/src/internal/core.ts +56 -2
- package/src/internal/dateTime.ts +3 -1
- package/src/internal/effect.ts +156 -156
- package/src/internal/rcRef.ts +83 -33
- package/src/internal/schedule.ts +23 -17
- package/src/internal/schema/fromJsonSchemaDocument.ts +5 -3
- package/src/internal/schema/standardSchema.ts +2 -2
- package/src/internal/version.ts +2 -0
- package/src/observability/OtlpExporter.ts +9 -6
- package/src/observability/OtlpLogger.ts +20 -21
- package/src/observability/OtlpMetrics.ts +34 -93
- package/src/observability/OtlpResource.ts +18 -27
- package/src/observability/OtlpTracer.ts +34 -40
- package/src/observability/internal/otlpProtobuf.ts +60 -0
- package/src/reactivity/AsyncResult.ts +1 -1
- package/src/reactivity/Atom.ts +10 -6
- package/src/reactivity/AtomHttpApi.ts +2 -4
- package/src/reactivity/AtomRegistry.ts +7 -0
- package/src/rpc/RpcClient.ts +74 -46
- package/src/rpc/RpcServer.ts +28 -25
- package/src/rpc/Utils.ts +4 -10
- package/src/rpc/internal/tracing.ts +22 -0
- package/src/schema/SchemaCompiler/runtime.ts +4 -1
- package/src/sql/SqlClient.ts +4 -4
- package/src/sql/Statement.ts +59 -7
- package/src/testing/TestClock.ts +9 -0
- package/src/testing/TestConsole.ts +8 -0
- package/src/testing/index.ts +3 -0
- package/src/workflow/WorkflowEngine.ts +4 -0
package/dist/Schema.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* generation, formatting, equivalence, optics, and differs derived from schema
|
|
10
10
|
* definitions.
|
|
11
11
|
*
|
|
12
|
+
* @stability stable
|
|
12
13
|
* @since 4.0.0
|
|
13
14
|
*/
|
|
14
15
|
import * as BigDecimal_ from "./BigDecimal.ts";
|
|
@@ -59,6 +60,7 @@ declare const TypeId = "~effect/Schema/Schema";
|
|
|
59
60
|
* @see {@link optionalKey} — mark a struct field as optional
|
|
60
61
|
* @see {@link optional} — mark a struct field as optional with `| undefined`
|
|
61
62
|
*
|
|
63
|
+
* @stability stable
|
|
62
64
|
* @category models
|
|
63
65
|
* @since 4.0.0
|
|
64
66
|
*/
|
|
@@ -68,6 +70,7 @@ export type Optionality = "required" | "optional";
|
|
|
68
70
|
*
|
|
69
71
|
* @see {@link mutableKey} — mark a struct field as mutable
|
|
70
72
|
*
|
|
73
|
+
* @stability stable
|
|
71
74
|
* @category models
|
|
72
75
|
* @since 4.0.0
|
|
73
76
|
*/
|
|
@@ -78,6 +81,7 @@ export type Mutability = "readonly" | "mutable";
|
|
|
78
81
|
* @see {@link withConstructorDefault} — add a default to a schema field
|
|
79
82
|
* @see {@link tag} — creates a literal field with a constructor default
|
|
80
83
|
*
|
|
84
|
+
* @stability stable
|
|
81
85
|
* @category models
|
|
82
86
|
* @since 4.0.0
|
|
83
87
|
*/
|
|
@@ -93,6 +97,7 @@ export type ConstructorDefault = "no-default" | "with-default";
|
|
|
93
97
|
* @see {@link BottomWithoutNew.makeEffect}
|
|
94
98
|
* @see {@link BottomWithoutNew.make}
|
|
95
99
|
*
|
|
100
|
+
* @stability stable
|
|
96
101
|
* @category options
|
|
97
102
|
* @since 3.13.4
|
|
98
103
|
*/
|
|
@@ -116,6 +121,7 @@ export interface MakeOptions {
|
|
|
116
121
|
* Use as the base for schema interfaces that provide a specialized construct
|
|
117
122
|
* signature.
|
|
118
123
|
*
|
|
124
|
+
* @stability stable
|
|
119
125
|
* @category models
|
|
120
126
|
* @since 4.0.0
|
|
121
127
|
*/
|
|
@@ -236,6 +242,7 @@ export interface BottomWithoutNew<out T, out E, out RD, out RE, out Ast extends
|
|
|
236
242
|
*
|
|
237
243
|
* @see {@link BottomWithoutNew} for the schema protocol without a construct signature
|
|
238
244
|
*
|
|
245
|
+
* @stability stable
|
|
239
246
|
* @category utility types
|
|
240
247
|
* @since 4.0.0
|
|
241
248
|
*/
|
|
@@ -263,6 +270,7 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.
|
|
|
263
270
|
* @see {@link BottomWithoutNew} for the fully parameterized schema interface when every
|
|
264
271
|
* view must be supplied directly.
|
|
265
272
|
*
|
|
273
|
+
* @stability stable
|
|
266
274
|
* @category utility types
|
|
267
275
|
* @since 4.0.0
|
|
268
276
|
*/
|
|
@@ -285,6 +293,7 @@ export interface BottomLazyWithoutNew<out Ast extends SchemaAST.AST, out Rebuild
|
|
|
285
293
|
*
|
|
286
294
|
* @see {@link BottomLazyWithoutNew} for the lazy schema protocol without a construct signature
|
|
287
295
|
*
|
|
296
|
+
* @stability stable
|
|
288
297
|
* @category utility types
|
|
289
298
|
* @since 4.0.0
|
|
290
299
|
*/
|
|
@@ -294,6 +303,7 @@ export interface BottomLazy<out Ast extends SchemaAST.AST, out Rebuild extends T
|
|
|
294
303
|
/**
|
|
295
304
|
* Type-level representation returned by {@link declareConstructor}.
|
|
296
305
|
*
|
|
306
|
+
* @stability stable
|
|
297
307
|
* @category constructors
|
|
298
308
|
* @since 4.0.0
|
|
299
309
|
*/
|
|
@@ -351,6 +361,7 @@ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<C
|
|
|
351
361
|
* Effect.runSync(Schema.decodeUnknownEffect(schema)({ value: 1 })) // => { value: 1 }
|
|
352
362
|
* ```
|
|
353
363
|
*
|
|
364
|
+
* @stability stable
|
|
354
365
|
* @category constructors
|
|
355
366
|
* @since 4.0.0
|
|
356
367
|
*/
|
|
@@ -358,6 +369,7 @@ export declare function declareConstructor<T, E = T, Iso = T>(): <const TypePara
|
|
|
358
369
|
/**
|
|
359
370
|
* Type-level representation returned by {@link declare}.
|
|
360
371
|
*
|
|
372
|
+
* @stability stable
|
|
361
373
|
* @category constructors
|
|
362
374
|
* @since 3.13.3
|
|
363
375
|
*/
|
|
@@ -393,6 +405,7 @@ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [
|
|
|
393
405
|
*
|
|
394
406
|
* @see {@link declareConstructor} for creating schemas for parametric types.
|
|
395
407
|
*
|
|
408
|
+
* @stability stable
|
|
396
409
|
* @category constructors
|
|
397
410
|
* @since 3.10.0
|
|
398
411
|
*/
|
|
@@ -423,6 +436,7 @@ export declare function declare<T, Iso = T>(is: (u: unknown) => u is T, annotati
|
|
|
423
436
|
* type E = typeof bottom["Encoded"] // string
|
|
424
437
|
* ```
|
|
425
438
|
*
|
|
439
|
+
* @stability stable
|
|
426
440
|
* @category utility types
|
|
427
441
|
* @since 4.0.0
|
|
428
442
|
*/
|
|
@@ -453,6 +467,7 @@ export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"]
|
|
|
453
467
|
*
|
|
454
468
|
* @see {@link annotateEncoded} to annotate the encoded side instead.
|
|
455
469
|
*
|
|
470
|
+
* @stability stable
|
|
456
471
|
* @category annotations
|
|
457
472
|
* @since 4.0.0
|
|
458
473
|
*/
|
|
@@ -483,6 +498,7 @@ export declare function annotate<S extends Top>(annotations: Annotations.Bottom<
|
|
|
483
498
|
*
|
|
484
499
|
* @see {@link annotate} to annotate the type side instead.
|
|
485
500
|
*
|
|
501
|
+
* @stability stable
|
|
486
502
|
* @category annotations
|
|
487
503
|
* @since 4.0.0
|
|
488
504
|
*/
|
|
@@ -515,6 +531,7 @@ export declare function annotateEncoded<S extends Top>(annotations: Annotations.
|
|
|
515
531
|
* schema.fields.username.ast.context?.annotations?.messageMissingKey // => "Username is required"
|
|
516
532
|
* ```
|
|
517
533
|
*
|
|
534
|
+
* @stability stable
|
|
518
535
|
* @category annotations
|
|
519
536
|
* @since 4.0.0
|
|
520
537
|
*/
|
|
@@ -534,6 +551,7 @@ export declare function annotateKey<S extends Top>(annotations: Annotations.Key<
|
|
|
534
551
|
* - {@link ConstraintDecoder}`<T, RD>` — for decode-only APIs
|
|
535
552
|
* - {@link ConstraintEncoder}`<E, RE>` — for encode-only APIs
|
|
536
553
|
*
|
|
554
|
+
* @stability stable
|
|
537
555
|
* @category models
|
|
538
556
|
* @since 4.0.0
|
|
539
557
|
*/
|
|
@@ -559,6 +577,7 @@ unknown, Mutability, Optionality, ConstructorDefault, Mutability, Optionality> {
|
|
|
559
577
|
*
|
|
560
578
|
* @see {@link Top} for the complete schema protocol.
|
|
561
579
|
*
|
|
580
|
+
* @stability stable
|
|
562
581
|
* @category models
|
|
563
582
|
* @since 4.0.0
|
|
564
583
|
*/
|
|
@@ -592,6 +611,7 @@ export interface Constraint {
|
|
|
592
611
|
* @see {@link Constraint} for the generic lightweight schema constraint.
|
|
593
612
|
* @see {@link Codec} for the full schema protocol with codec type views.
|
|
594
613
|
*
|
|
614
|
+
* @stability stable
|
|
595
615
|
* @category models
|
|
596
616
|
* @since 4.0.0
|
|
597
617
|
*/
|
|
@@ -615,6 +635,7 @@ export interface ConstraintCodec<out T, out E = T, out RD = never, out RE = neve
|
|
|
615
635
|
* @see {@link ConstraintCodec} for APIs that need both decoded and encoded codec views.
|
|
616
636
|
* @see {@link Codec} for the full schema protocol with codec type views.
|
|
617
637
|
*
|
|
638
|
+
* @stability stable
|
|
618
639
|
* @category models
|
|
619
640
|
* @since 4.0.0
|
|
620
641
|
*/
|
|
@@ -634,6 +655,7 @@ export interface ConstraintDecoder<out T, out RD = never> extends ConstraintCode
|
|
|
634
655
|
* @see {@link ConstraintCodec} for APIs that need both decoded and encoded codec views.
|
|
635
656
|
* @see {@link Codec} for the full schema protocol with codec type views.
|
|
636
657
|
*
|
|
658
|
+
* @stability stable
|
|
637
659
|
* @category models
|
|
638
660
|
* @since 4.0.0
|
|
639
661
|
*/
|
|
@@ -649,6 +671,7 @@ export interface ConstraintEncoder<out E, out RE = never> extends ConstraintCode
|
|
|
649
671
|
* exposed by {@link Constraint}, but does not call methods such as `annotate`,
|
|
650
672
|
* `check`, `rebuild`, `make`, or `makeEffect`.
|
|
651
673
|
*
|
|
674
|
+
* @stability stable
|
|
652
675
|
* @category models
|
|
653
676
|
* @since 4.0.0
|
|
654
677
|
*/
|
|
@@ -658,6 +681,7 @@ export interface ConstraintRebuildable extends Constraint {
|
|
|
658
681
|
/**
|
|
659
682
|
* Namespace of type-level helpers for {@link Schema}.
|
|
660
683
|
*
|
|
684
|
+
* @stability stable
|
|
661
685
|
* @since 3.10.0
|
|
662
686
|
*/
|
|
663
687
|
export declare namespace Schema {
|
|
@@ -708,6 +732,7 @@ export declare namespace Schema {
|
|
|
708
732
|
* @see {@link Codec} — also tracks Encoded, DecodingServices, EncodingServices
|
|
709
733
|
* @see {@link Schema.Type} — extract the decoded type at the type level
|
|
710
734
|
*
|
|
735
|
+
* @stability stable
|
|
711
736
|
* @category models
|
|
712
737
|
* @since 3.10.0
|
|
713
738
|
*/
|
|
@@ -718,6 +743,7 @@ export interface Schema<out T> extends Top {
|
|
|
718
743
|
/**
|
|
719
744
|
* Namespace of type-level helpers for {@link Codec}.
|
|
720
745
|
*
|
|
746
|
+
* @stability stable
|
|
721
747
|
* @since 4.0.0
|
|
722
748
|
*/
|
|
723
749
|
export declare namespace Codec {
|
|
@@ -810,6 +836,7 @@ export declare namespace Codec {
|
|
|
810
836
|
* @see {@link Codec.EncodingServices} — extract required encoding services
|
|
811
837
|
* @see {@link revealCodec} — helper to make TypeScript infer the full Codec type
|
|
812
838
|
*
|
|
839
|
+
* @stability stable
|
|
813
840
|
* @category models
|
|
814
841
|
* @since 4.0.0
|
|
815
842
|
*/
|
|
@@ -832,6 +859,7 @@ export interface Codec<out T, out E = T, out RD = never, out RE = never> extends
|
|
|
832
859
|
* @see {@link Codec} for preserving both decoded and encoded type information.
|
|
833
860
|
* @see {@link Encoder} for the encode-only view.
|
|
834
861
|
*
|
|
862
|
+
* @stability stable
|
|
835
863
|
* @category models
|
|
836
864
|
* @since 4.0.0
|
|
837
865
|
*/
|
|
@@ -854,6 +882,7 @@ export interface Decoder<out T, out RD = never> extends Schema<T> {
|
|
|
854
882
|
* @see {@link Codec} for preserving both decoded and encoded type information.
|
|
855
883
|
* @see {@link Decoder} for the decode-only view.
|
|
856
884
|
*
|
|
885
|
+
* @stability stable
|
|
857
886
|
* @category models
|
|
858
887
|
* @since 4.0.0
|
|
859
888
|
*/
|
|
@@ -885,6 +914,7 @@ export interface Encoder<out E, out RE = never> extends Schema<unknown> {
|
|
|
885
914
|
* type Enc = typeof codec["Encoded"] // string
|
|
886
915
|
* ```
|
|
887
916
|
*
|
|
917
|
+
* @stability stable
|
|
888
918
|
* @category utility types
|
|
889
919
|
* @since 4.0.0
|
|
890
920
|
*/
|
|
@@ -904,6 +934,7 @@ export declare function revealCodec<T, E, RD, RE>(codec: Codec<T, E, RD, RE>): C
|
|
|
904
934
|
* `Optic` automatically. You normally interact with this interface through
|
|
905
935
|
* {@link Optic_} utilities rather than constructing it directly.
|
|
906
936
|
*
|
|
937
|
+
* @stability stable
|
|
907
938
|
* @category models
|
|
908
939
|
* @since 4.0.0
|
|
909
940
|
*/
|
|
@@ -943,6 +974,7 @@ declare const SchemaError_base: new <A extends Record<string, any> = {}>(args: i
|
|
|
943
974
|
* ```
|
|
944
975
|
*
|
|
945
976
|
* @see {@link isSchemaError} for narrowing unknown values
|
|
977
|
+
* @stability stable
|
|
946
978
|
* @category errors
|
|
947
979
|
* @since 4.0.0
|
|
948
980
|
*/
|
|
@@ -971,6 +1003,7 @@ export declare class SchemaError extends SchemaError_base<{
|
|
|
971
1003
|
* Schema.isSchemaError(error) // => true
|
|
972
1004
|
* ```
|
|
973
1005
|
*
|
|
1006
|
+
* @stability stable
|
|
974
1007
|
* @category guards
|
|
975
1008
|
* @since 4.0.0
|
|
976
1009
|
*/
|
|
@@ -1040,6 +1073,7 @@ export declare function isSchemaError(u: unknown): u is SchemaError;
|
|
|
1040
1073
|
* invalidResult.issues?.map((issue) => issue.path) // => [["name"], ["age"]]
|
|
1041
1074
|
* ```
|
|
1042
1075
|
*
|
|
1076
|
+
* @stability stable
|
|
1043
1077
|
* @category converting
|
|
1044
1078
|
* @since 4.0.0
|
|
1045
1079
|
*/
|
|
@@ -1055,6 +1089,7 @@ export declare function toStandardSchemaV1<S extends ConstraintDecoder<unknown>>
|
|
|
1055
1089
|
*
|
|
1056
1090
|
* https://github.com/standard-schema/standard-schema/pull/134
|
|
1057
1091
|
*
|
|
1092
|
+
* @stability stable
|
|
1058
1093
|
* @category converting
|
|
1059
1094
|
* @since 4.0.0
|
|
1060
1095
|
*/
|
|
@@ -1093,6 +1128,7 @@ export declare function toStandardJSONSchemaV1<S extends Constraint>(self: S): S
|
|
|
1093
1128
|
* }
|
|
1094
1129
|
* ```
|
|
1095
1130
|
*
|
|
1131
|
+
* @stability stable
|
|
1096
1132
|
* @category guards
|
|
1097
1133
|
* @since 3.10.0
|
|
1098
1134
|
*/
|
|
@@ -1142,6 +1178,7 @@ export declare const is: typeof SchemaParser.is;
|
|
|
1142
1178
|
* }
|
|
1143
1179
|
* ```
|
|
1144
1180
|
*
|
|
1181
|
+
* @stability stable
|
|
1145
1182
|
* @category guards
|
|
1146
1183
|
* @since 4.0.0
|
|
1147
1184
|
*/
|
|
@@ -1164,6 +1201,7 @@ export declare const asserts: <S extends Constraint, I>(schema: S, input: I) =>
|
|
|
1164
1201
|
*
|
|
1165
1202
|
* @see {@link SchemaParser.decodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1166
1203
|
*
|
|
1204
|
+
* @stability stable
|
|
1167
1205
|
* @category decoding
|
|
1168
1206
|
* @since 4.0.0
|
|
1169
1207
|
*/
|
|
@@ -1186,6 +1224,7 @@ export declare function decodeUnknownEffect<S extends Constraint>(schema: S, opt
|
|
|
1186
1224
|
*
|
|
1187
1225
|
* @see {@link SchemaParser.decodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1188
1226
|
*
|
|
1227
|
+
* @stability stable
|
|
1189
1228
|
* @category decoding
|
|
1190
1229
|
* @since 4.0.0
|
|
1191
1230
|
*/
|
|
@@ -1217,6 +1256,7 @@ export declare const decodeEffect: <S extends Constraint>(schema: S, options?: S
|
|
|
1217
1256
|
*
|
|
1218
1257
|
* @see {@link SchemaParser.decodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1219
1258
|
*
|
|
1259
|
+
* @stability stable
|
|
1220
1260
|
* @category decoding
|
|
1221
1261
|
* @since 4.0.0
|
|
1222
1262
|
*/
|
|
@@ -1248,6 +1288,7 @@ export declare function decodeUnknownExit<S extends ConstraintDecoder<unknown>>(
|
|
|
1248
1288
|
*
|
|
1249
1289
|
* @see {@link SchemaParser.decodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1250
1290
|
*
|
|
1291
|
+
* @stability stable
|
|
1251
1292
|
* @category decoding
|
|
1252
1293
|
* @since 4.0.0
|
|
1253
1294
|
*/
|
|
@@ -1275,6 +1316,7 @@ export declare const decodeExit: <S extends ConstraintDecoder<unknown>>(schema:
|
|
|
1275
1316
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1276
1317
|
* instead.
|
|
1277
1318
|
*
|
|
1319
|
+
* @stability stable
|
|
1278
1320
|
* @category decoding
|
|
1279
1321
|
* @since 3.10.0
|
|
1280
1322
|
*/
|
|
@@ -1301,6 +1343,7 @@ export declare const decodeUnknownOption: <S extends ConstraintDecoder<unknown>>
|
|
|
1301
1343
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1302
1344
|
* instead.
|
|
1303
1345
|
*
|
|
1346
|
+
* @stability stable
|
|
1304
1347
|
* @category decoding
|
|
1305
1348
|
* @since 3.10.0
|
|
1306
1349
|
*/
|
|
@@ -1331,6 +1374,7 @@ export declare const decodeOption: <S extends ConstraintDecoder<unknown>>(schema
|
|
|
1331
1374
|
*
|
|
1332
1375
|
* @see {@link SchemaParser.decodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1333
1376
|
*
|
|
1377
|
+
* @stability stable
|
|
1334
1378
|
* @category decoding
|
|
1335
1379
|
* @since 4.0.0
|
|
1336
1380
|
*/
|
|
@@ -1360,6 +1404,7 @@ export declare function decodeUnknownResult<S extends ConstraintDecoder<unknown>
|
|
|
1360
1404
|
*
|
|
1361
1405
|
* @see {@link SchemaParser.decodeResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1362
1406
|
*
|
|
1407
|
+
* @stability stable
|
|
1363
1408
|
* @category decoding
|
|
1364
1409
|
* @since 4.0.0
|
|
1365
1410
|
*/
|
|
@@ -1388,6 +1433,7 @@ export declare const decodeResult: <S extends ConstraintDecoder<unknown>>(schema
|
|
|
1388
1433
|
*
|
|
1389
1434
|
* @see {@link SchemaParser.decodeUnknownPromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1390
1435
|
*
|
|
1436
|
+
* @stability stable
|
|
1391
1437
|
* @category decoding
|
|
1392
1438
|
* @since 3.10.0
|
|
1393
1439
|
*/
|
|
@@ -1416,6 +1462,7 @@ export declare function decodeUnknownPromise<S extends ConstraintDecoder<unknown
|
|
|
1416
1462
|
*
|
|
1417
1463
|
* @see {@link SchemaParser.decodePromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1418
1464
|
*
|
|
1465
|
+
* @stability stable
|
|
1419
1466
|
* @category decoding
|
|
1420
1467
|
* @since 3.10.0
|
|
1421
1468
|
*/
|
|
@@ -1454,6 +1501,7 @@ export declare const decodePromise: <S extends ConstraintDecoder<unknown>>(schem
|
|
|
1454
1501
|
*
|
|
1455
1502
|
* @see {@link SchemaParser.decodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1456
1503
|
*
|
|
1504
|
+
* @stability stable
|
|
1457
1505
|
* @category decoding
|
|
1458
1506
|
* @since 4.0.0
|
|
1459
1507
|
*/
|
|
@@ -1481,6 +1529,7 @@ export declare function decodeUnknownSync<S extends ConstraintDecoder<unknown>>(
|
|
|
1481
1529
|
*
|
|
1482
1530
|
* @see {@link SchemaParser.decodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1483
1531
|
*
|
|
1532
|
+
* @stability stable
|
|
1484
1533
|
* @category decoding
|
|
1485
1534
|
* @since 4.0.0
|
|
1486
1535
|
*/
|
|
@@ -1513,6 +1562,7 @@ export declare const decodeSync: <S extends ConstraintDecoder<unknown>>(schema:
|
|
|
1513
1562
|
*
|
|
1514
1563
|
* @see {@link SchemaParser.encodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1515
1564
|
*
|
|
1565
|
+
* @stability stable
|
|
1516
1566
|
* @category encoding
|
|
1517
1567
|
* @since 4.0.0
|
|
1518
1568
|
*/
|
|
@@ -1535,6 +1585,7 @@ export declare function encodeUnknownEffect<S extends Constraint>(schema: S, opt
|
|
|
1535
1585
|
*
|
|
1536
1586
|
* @see {@link SchemaParser.encodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1537
1587
|
*
|
|
1588
|
+
* @stability stable
|
|
1538
1589
|
* @category encoding
|
|
1539
1590
|
* @since 4.0.0
|
|
1540
1591
|
*/
|
|
@@ -1565,6 +1616,7 @@ export declare const encodeEffect: <S extends Constraint>(schema: S, options?: S
|
|
|
1565
1616
|
*
|
|
1566
1617
|
* @see {@link SchemaParser.encodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1567
1618
|
*
|
|
1619
|
+
* @stability stable
|
|
1568
1620
|
* @category encoding
|
|
1569
1621
|
* @since 4.0.0
|
|
1570
1622
|
*/
|
|
@@ -1596,6 +1648,7 @@ export declare function encodeUnknownExit<S extends ConstraintEncoder<unknown>>(
|
|
|
1596
1648
|
*
|
|
1597
1649
|
* @see {@link SchemaParser.encodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1598
1650
|
*
|
|
1651
|
+
* @stability stable
|
|
1599
1652
|
* @category encoding
|
|
1600
1653
|
* @since 4.0.0
|
|
1601
1654
|
*/
|
|
@@ -1623,6 +1676,7 @@ export declare const encodeExit: <S extends ConstraintEncoder<unknown>>(schema:
|
|
|
1623
1676
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1624
1677
|
* instead.
|
|
1625
1678
|
*
|
|
1679
|
+
* @stability stable
|
|
1626
1680
|
* @category encoding
|
|
1627
1681
|
* @since 3.10.0
|
|
1628
1682
|
*/
|
|
@@ -1649,6 +1703,7 @@ export declare const encodeUnknownOption: <S extends ConstraintEncoder<unknown>>
|
|
|
1649
1703
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1650
1704
|
* instead.
|
|
1651
1705
|
*
|
|
1706
|
+
* @stability stable
|
|
1652
1707
|
* @category encoding
|
|
1653
1708
|
* @since 3.10.0
|
|
1654
1709
|
*/
|
|
@@ -1678,6 +1733,7 @@ export declare const encodeOption: <S extends ConstraintEncoder<unknown>>(schema
|
|
|
1678
1733
|
*
|
|
1679
1734
|
* @see {@link SchemaParser.encodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1680
1735
|
*
|
|
1736
|
+
* @stability stable
|
|
1681
1737
|
* @category encoding
|
|
1682
1738
|
* @since 4.0.0
|
|
1683
1739
|
*/
|
|
@@ -1707,6 +1763,7 @@ export declare function encodeUnknownResult<S extends ConstraintEncoder<unknown>
|
|
|
1707
1763
|
*
|
|
1708
1764
|
* @see {@link SchemaParser.encodeResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1709
1765
|
*
|
|
1766
|
+
* @stability stable
|
|
1710
1767
|
* @category encoding
|
|
1711
1768
|
* @since 4.0.0
|
|
1712
1769
|
*/
|
|
@@ -1734,6 +1791,7 @@ export declare const encodeResult: <S extends ConstraintEncoder<unknown>>(schema
|
|
|
1734
1791
|
*
|
|
1735
1792
|
* @see {@link SchemaParser.encodeUnknownPromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1736
1793
|
*
|
|
1794
|
+
* @stability stable
|
|
1737
1795
|
* @category encoding
|
|
1738
1796
|
* @since 3.10.0
|
|
1739
1797
|
*/
|
|
@@ -1762,6 +1820,7 @@ export declare function encodeUnknownPromise<S extends ConstraintEncoder<unknown
|
|
|
1762
1820
|
*
|
|
1763
1821
|
* @see {@link SchemaParser.encodePromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1764
1822
|
*
|
|
1823
|
+
* @stability stable
|
|
1765
1824
|
* @category encoding
|
|
1766
1825
|
* @since 3.10.0
|
|
1767
1826
|
*/
|
|
@@ -1789,6 +1848,7 @@ export declare const encodePromise: <S extends ConstraintEncoder<unknown>>(schem
|
|
|
1789
1848
|
*
|
|
1790
1849
|
* @see {@link SchemaParser.encodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1791
1850
|
*
|
|
1851
|
+
* @stability stable
|
|
1792
1852
|
* @category encoding
|
|
1793
1853
|
* @since 4.0.0
|
|
1794
1854
|
*/
|
|
@@ -1814,6 +1874,7 @@ export declare function encodeUnknownSync<S extends ConstraintEncoder<unknown>>(
|
|
|
1814
1874
|
*
|
|
1815
1875
|
* @see {@link SchemaParser.encodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1816
1876
|
*
|
|
1877
|
+
* @stability stable
|
|
1817
1878
|
* @category encoding
|
|
1818
1879
|
* @since 4.0.0
|
|
1819
1880
|
*/
|
|
@@ -1832,6 +1893,7 @@ export declare const encodeSync: <S extends ConstraintEncoder<unknown>>(schema:
|
|
|
1832
1893
|
* the bridge between the untyped AST representation and the strongly-typed
|
|
1833
1894
|
* schema.
|
|
1834
1895
|
*
|
|
1896
|
+
* @stability stable
|
|
1835
1897
|
* @category constructors
|
|
1836
1898
|
* @since 3.10.0
|
|
1837
1899
|
*/
|
|
@@ -1839,6 +1901,7 @@ export declare const make: <S extends Constraint>(ast: S["ast"], options?: objec
|
|
|
1839
1901
|
/**
|
|
1840
1902
|
* Checks whether a value is a `Schema`.
|
|
1841
1903
|
*
|
|
1904
|
+
* @stability stable
|
|
1842
1905
|
* @category guards
|
|
1843
1906
|
* @since 3.10.0
|
|
1844
1907
|
*/
|
|
@@ -1846,6 +1909,7 @@ export declare function isSchema(u: unknown): u is Top;
|
|
|
1846
1909
|
/**
|
|
1847
1910
|
* Type-level representation returned by {@link optionalKey}.
|
|
1848
1911
|
*
|
|
1912
|
+
* @stability stable
|
|
1849
1913
|
* @category models
|
|
1850
1914
|
* @since 4.0.0
|
|
1851
1915
|
*/
|
|
@@ -1882,6 +1946,7 @@ interface optionalKeyLambda extends Lambda {
|
|
|
1882
1946
|
* type Person = typeof schema["Type"]
|
|
1883
1947
|
* ```
|
|
1884
1948
|
*
|
|
1949
|
+
* @stability stable
|
|
1885
1950
|
* @category combinators
|
|
1886
1951
|
* @since 4.0.0
|
|
1887
1952
|
*/
|
|
@@ -1898,6 +1963,7 @@ interface requiredKeyLambda extends Lambda {
|
|
|
1898
1963
|
* Use to remove optional-key wrapping from a schema field that was previously
|
|
1899
1964
|
* wrapped with {@link optionalKey}.
|
|
1900
1965
|
*
|
|
1966
|
+
* @stability stable
|
|
1901
1967
|
* @category combinators
|
|
1902
1968
|
* @since 4.0.0
|
|
1903
1969
|
*/
|
|
@@ -1905,6 +1971,7 @@ export declare const requiredKey: requiredKeyLambda;
|
|
|
1905
1971
|
/**
|
|
1906
1972
|
* Type-level representation returned by {@link optional}.
|
|
1907
1973
|
*
|
|
1974
|
+
* @stability stable
|
|
1908
1975
|
* @category models
|
|
1909
1976
|
* @since 3.10.0
|
|
1910
1977
|
*/
|
|
@@ -1941,6 +2008,7 @@ interface optionalLambda extends Lambda {
|
|
|
1941
2008
|
* type Person = typeof schema.Type
|
|
1942
2009
|
* ```
|
|
1943
2010
|
*
|
|
2011
|
+
* @stability stable
|
|
1944
2012
|
* @category combinators
|
|
1945
2013
|
* @since 3.10.0
|
|
1946
2014
|
*/
|
|
@@ -1961,6 +2029,7 @@ interface requiredLambda extends Lambda {
|
|
|
1961
2029
|
*
|
|
1962
2030
|
* This also unwraps the `UndefinedOr` member added by `optional`.
|
|
1963
2031
|
*
|
|
2032
|
+
* @stability stable
|
|
1964
2033
|
* @category combinators
|
|
1965
2034
|
* @since 3.10.0
|
|
1966
2035
|
*/
|
|
@@ -1968,6 +2037,7 @@ export declare const required: requiredLambda;
|
|
|
1968
2037
|
/**
|
|
1969
2038
|
* Type-level representation returned by {@link mutableKey}.
|
|
1970
2039
|
*
|
|
2040
|
+
* @stability stable
|
|
1971
2041
|
* @category models
|
|
1972
2042
|
* @since 4.0.0
|
|
1973
2043
|
*/
|
|
@@ -1989,6 +2059,7 @@ interface mutableKeyLambda extends Lambda {
|
|
|
1989
2059
|
* Makes a struct field mutable (removes the `readonly` modifier on the property).
|
|
1990
2060
|
* Use {@link readonlyKey} to reverse.
|
|
1991
2061
|
*
|
|
2062
|
+
* @stability stable
|
|
1992
2063
|
* @category combinators
|
|
1993
2064
|
* @since 4.0.0
|
|
1994
2065
|
*/
|
|
@@ -2005,6 +2076,7 @@ interface readonlyKeyLambda extends Lambda {
|
|
|
2005
2076
|
* Use to remove mutable-key wrapping from a schema field that was previously
|
|
2006
2077
|
* wrapped with {@link mutableKey}.
|
|
2007
2078
|
*
|
|
2079
|
+
* @stability stable
|
|
2008
2080
|
* @category combinators
|
|
2009
2081
|
* @since 4.0.0
|
|
2010
2082
|
*/
|
|
@@ -2012,6 +2084,7 @@ export declare const readonlyKey: readonlyKeyLambda;
|
|
|
2012
2084
|
/**
|
|
2013
2085
|
* Type-level representation returned by {@link toType}.
|
|
2014
2086
|
*
|
|
2087
|
+
* @stability stable
|
|
2015
2088
|
* @category transforming
|
|
2016
2089
|
* @since 4.0.0
|
|
2017
2090
|
*/
|
|
@@ -2033,6 +2106,7 @@ interface toTypeLambda extends Lambda {
|
|
|
2033
2106
|
* Extracts the type-side schema: sets `Encoded` to equal the decoded `Type`,
|
|
2034
2107
|
* discarding the encoding transformation path.
|
|
2035
2108
|
*
|
|
2109
|
+
* @stability stable
|
|
2036
2110
|
* @category transforming
|
|
2037
2111
|
* @since 4.0.0
|
|
2038
2112
|
*/
|
|
@@ -2040,6 +2114,7 @@ export declare const toType: toTypeLambda;
|
|
|
2040
2114
|
/**
|
|
2041
2115
|
* Type-level representation returned by {@link toEncoded}.
|
|
2042
2116
|
*
|
|
2117
|
+
* @stability stable
|
|
2043
2118
|
* @category transforming
|
|
2044
2119
|
* @since 4.0.0
|
|
2045
2120
|
*/
|
|
@@ -2061,6 +2136,7 @@ interface toEncodedLambda extends Lambda {
|
|
|
2061
2136
|
* Extracts the encoded-side schema: sets `Type` to equal the `Encoded`,
|
|
2062
2137
|
* discarding the decoding transformation path.
|
|
2063
2138
|
*
|
|
2139
|
+
* @stability stable
|
|
2064
2140
|
* @category transforming
|
|
2065
2141
|
* @since 4.0.0
|
|
2066
2142
|
*/
|
|
@@ -2069,6 +2145,7 @@ declare const FlipTypeId = "~effect/Schema/flip";
|
|
|
2069
2145
|
/**
|
|
2070
2146
|
* Type-level representation returned by {@link flip}.
|
|
2071
2147
|
*
|
|
2148
|
+
* @stability stable
|
|
2072
2149
|
* @category transforming
|
|
2073
2150
|
* @since 4.0.0
|
|
2074
2151
|
*/
|
|
@@ -2104,6 +2181,7 @@ export interface flip<S extends Top> extends BottomLazy<SchemaAST.AST, flip<S>,
|
|
|
2104
2181
|
* Schema.decodeSync(flipped)(42) // => "42"
|
|
2105
2182
|
* ```
|
|
2106
2183
|
*
|
|
2184
|
+
* @stability stable
|
|
2107
2185
|
* @category transforming
|
|
2108
2186
|
* @since 4.0.0
|
|
2109
2187
|
*/
|
|
@@ -2111,6 +2189,7 @@ export declare function flip<S extends Top>(schema: S): S extends flip<infer F>
|
|
|
2111
2189
|
/**
|
|
2112
2190
|
* Type-level representation returned by {@link Literal}.
|
|
2113
2191
|
*
|
|
2192
|
+
* @stability stable
|
|
2114
2193
|
* @category models
|
|
2115
2194
|
* @since 3.10.0
|
|
2116
2195
|
*/
|
|
@@ -2134,6 +2213,7 @@ export interface Literal<L extends SchemaAST.LiteralValue> extends Bottom<L, L,
|
|
|
2134
2213
|
* @see {@link Literals} for a schema that represents a union of literals.
|
|
2135
2214
|
* @see {@link tag} for a schema that represents a literal value that can be
|
|
2136
2215
|
* used as a discriminator field in tagged unions and has a constructor default.
|
|
2216
|
+
* @stability stable
|
|
2137
2217
|
* @category constructors
|
|
2138
2218
|
* @since 3.10.0
|
|
2139
2219
|
*/
|
|
@@ -2141,6 +2221,7 @@ export declare function Literal<L extends SchemaAST.LiteralValue>(literal: L): L
|
|
|
2141
2221
|
/**
|
|
2142
2222
|
* Namespace for {@link TemplateLiteral} helper types.
|
|
2143
2223
|
*
|
|
2224
|
+
* @stability stable
|
|
2144
2225
|
* @since 3.10.0
|
|
2145
2226
|
*/
|
|
2146
2227
|
export declare namespace TemplateLiteral {
|
|
@@ -2197,6 +2278,7 @@ export declare namespace TemplateLiteral {
|
|
|
2197
2278
|
/**
|
|
2198
2279
|
* Type-level representation returned by {@link TemplateLiteral}.
|
|
2199
2280
|
*
|
|
2281
|
+
* @stability stable
|
|
2200
2282
|
* @category models
|
|
2201
2283
|
* @since 3.10.0
|
|
2202
2284
|
*/
|
|
@@ -2235,6 +2317,7 @@ export interface TemplateLiteral<Parts extends TemplateLiteral.Parts> extends Bo
|
|
|
2235
2317
|
* ```
|
|
2236
2318
|
*
|
|
2237
2319
|
* @see {@link TemplateLiteralParser} for a schema that also parses matched parts into a tuple.
|
|
2320
|
+
* @stability stable
|
|
2238
2321
|
* @category constructors
|
|
2239
2322
|
* @since 3.10.0
|
|
2240
2323
|
*/
|
|
@@ -2242,6 +2325,7 @@ export declare function TemplateLiteral<const Parts extends TemplateLiteral.Part
|
|
|
2242
2325
|
/**
|
|
2243
2326
|
* Namespace for {@link TemplateLiteralParser} helper types.
|
|
2244
2327
|
*
|
|
2328
|
+
* @stability stable
|
|
2245
2329
|
* @since 3.10.0
|
|
2246
2330
|
*/
|
|
2247
2331
|
export declare namespace TemplateLiteralParser {
|
|
@@ -2265,6 +2349,7 @@ export declare namespace TemplateLiteralParser {
|
|
|
2265
2349
|
/**
|
|
2266
2350
|
* Type-level representation returned by {@link TemplateLiteralParser}.
|
|
2267
2351
|
*
|
|
2352
|
+
* @stability stable
|
|
2268
2353
|
* @category models
|
|
2269
2354
|
* @since 3.10.0
|
|
2270
2355
|
*/
|
|
@@ -2310,6 +2395,7 @@ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> exte
|
|
|
2310
2395
|
* ```
|
|
2311
2396
|
*
|
|
2312
2397
|
* @see {@link TemplateLiteral} for a validation-only version that keeps the string encoded.
|
|
2398
|
+
* @stability stable
|
|
2313
2399
|
* @category constructors
|
|
2314
2400
|
* @since 3.10.0
|
|
2315
2401
|
*/
|
|
@@ -2317,6 +2403,7 @@ export declare function TemplateLiteralParser<const Parts extends TemplateLitera
|
|
|
2317
2403
|
/**
|
|
2318
2404
|
* Type-level representation returned by {@link Enum}.
|
|
2319
2405
|
*
|
|
2406
|
+
* @stability stable
|
|
2320
2407
|
* @category models
|
|
2321
2408
|
* @since 4.0.0
|
|
2322
2409
|
*/
|
|
@@ -2347,6 +2434,7 @@ export interface Enum<A extends {
|
|
|
2347
2434
|
* Schema.decodeSync(schema)(Direction.Up) // => "Up"
|
|
2348
2435
|
* ```
|
|
2349
2436
|
*
|
|
2437
|
+
* @stability stable
|
|
2350
2438
|
* @category constructors
|
|
2351
2439
|
* @since 4.0.0
|
|
2352
2440
|
*/
|
|
@@ -2356,6 +2444,7 @@ export declare function Enum<A extends {
|
|
|
2356
2444
|
/**
|
|
2357
2445
|
* Type-level representation of {@link Never}.
|
|
2358
2446
|
*
|
|
2447
|
+
* @stability stable
|
|
2359
2448
|
* @category models
|
|
2360
2449
|
* @since 3.10.0
|
|
2361
2450
|
*/
|
|
@@ -2364,6 +2453,7 @@ export interface Never extends Bottom<never, never, never, never, SchemaAST.Neve
|
|
|
2364
2453
|
/**
|
|
2365
2454
|
* Schema for the `never` type. Always fails validation — no value satisfies it.
|
|
2366
2455
|
*
|
|
2456
|
+
* @stability stable
|
|
2367
2457
|
* @category schemas
|
|
2368
2458
|
* @since 3.10.0
|
|
2369
2459
|
*/
|
|
@@ -2371,6 +2461,7 @@ export declare const Never: Never;
|
|
|
2371
2461
|
/**
|
|
2372
2462
|
* Type-level representation of {@link Any}.
|
|
2373
2463
|
*
|
|
2464
|
+
* @stability stable
|
|
2374
2465
|
* @category models
|
|
2375
2466
|
* @since 3.10.0
|
|
2376
2467
|
*/
|
|
@@ -2380,6 +2471,7 @@ export interface Any extends Bottom<any, any, never, never, SchemaAST.Any, Any>
|
|
|
2380
2471
|
* Schema for the `any` type. Accepts any value without validation.
|
|
2381
2472
|
*
|
|
2382
2473
|
* @see {@link Unknown} for a safer alternative that uses `unknown`.
|
|
2474
|
+
* @stability stable
|
|
2383
2475
|
* @category schemas
|
|
2384
2476
|
* @since 3.10.0
|
|
2385
2477
|
*/
|
|
@@ -2387,6 +2479,7 @@ export declare const Any: Any;
|
|
|
2387
2479
|
/**
|
|
2388
2480
|
* Type-level representation of {@link Unknown}.
|
|
2389
2481
|
*
|
|
2482
|
+
* @stability stable
|
|
2390
2483
|
* @category models
|
|
2391
2484
|
* @since 3.10.0
|
|
2392
2485
|
*/
|
|
@@ -2401,6 +2494,7 @@ export interface Unknown extends Bottom<unknown, unknown, never, never, SchemaAS
|
|
|
2401
2494
|
* TypeScript's `unknown` safety at use sites.
|
|
2402
2495
|
*
|
|
2403
2496
|
* @see {@link Any} for the `any` variant.
|
|
2497
|
+
* @stability stable
|
|
2404
2498
|
* @category schemas
|
|
2405
2499
|
* @since 3.10.0
|
|
2406
2500
|
*/
|
|
@@ -2408,6 +2502,7 @@ export declare const Unknown: Unknown;
|
|
|
2408
2502
|
/**
|
|
2409
2503
|
* Type-level representation of {@link Null}.
|
|
2410
2504
|
*
|
|
2505
|
+
* @stability stable
|
|
2411
2506
|
* @category models
|
|
2412
2507
|
* @since 3.10.0
|
|
2413
2508
|
*/
|
|
@@ -2417,6 +2512,7 @@ export interface Null extends Bottom<null, null, never, never, SchemaAST.Null, N
|
|
|
2417
2512
|
* Schema for the `null` literal. Validates that the input is strictly `null`.
|
|
2418
2513
|
*
|
|
2419
2514
|
* @see {@link NullOr} for a union with another schema.
|
|
2515
|
+
* @stability stable
|
|
2420
2516
|
* @category schemas
|
|
2421
2517
|
* @since 3.10.0
|
|
2422
2518
|
*/
|
|
@@ -2424,6 +2520,7 @@ export declare const Null: Null;
|
|
|
2424
2520
|
/**
|
|
2425
2521
|
* Type-level representation of {@link Undefined}.
|
|
2426
2522
|
*
|
|
2523
|
+
* @stability stable
|
|
2427
2524
|
* @category models
|
|
2428
2525
|
* @since 3.10.0
|
|
2429
2526
|
*/
|
|
@@ -2433,6 +2530,7 @@ export interface Undefined extends Bottom<undefined, undefined, never, never, Sc
|
|
|
2433
2530
|
* Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
|
|
2434
2531
|
*
|
|
2435
2532
|
* @see {@link UndefinedOr} for a union with another schema.
|
|
2533
|
+
* @stability stable
|
|
2436
2534
|
* @category schemas
|
|
2437
2535
|
* @since 3.10.0
|
|
2438
2536
|
*/
|
|
@@ -2440,6 +2538,7 @@ export declare const Undefined: Undefined;
|
|
|
2440
2538
|
/**
|
|
2441
2539
|
* Type-level representation of {@link String}.
|
|
2442
2540
|
*
|
|
2541
|
+
* @stability stable
|
|
2443
2542
|
* @category models
|
|
2444
2543
|
* @since 4.0.0
|
|
2445
2544
|
*/
|
|
@@ -2448,6 +2547,7 @@ export interface String extends Bottom<string, string, never, never, SchemaAST.S
|
|
|
2448
2547
|
/**
|
|
2449
2548
|
* Schema for `string` values. Validates that the input is `typeof` `"string"`.
|
|
2450
2549
|
*
|
|
2550
|
+
* @stability stable
|
|
2451
2551
|
* @category schemas
|
|
2452
2552
|
* @since 4.0.0
|
|
2453
2553
|
*/
|
|
@@ -2455,6 +2555,7 @@ export declare const String: String;
|
|
|
2455
2555
|
/**
|
|
2456
2556
|
* Type-level representation of {@link StringForLiteralAutocomplete}.
|
|
2457
2557
|
*
|
|
2558
|
+
* @stability stable
|
|
2458
2559
|
* @category models
|
|
2459
2560
|
* @since 4.0.0
|
|
2460
2561
|
*/
|
|
@@ -2491,6 +2592,7 @@ export interface StringForLiteralAutocomplete extends Bottom<string & {}, string
|
|
|
2491
2592
|
*
|
|
2492
2593
|
* @see {@link String} for a schema whose type is plain `string`.
|
|
2493
2594
|
* @see {@link Literals} for the known literals to include in the union.
|
|
2595
|
+
* @stability stable
|
|
2494
2596
|
* @category schemas
|
|
2495
2597
|
* @since 4.0.0
|
|
2496
2598
|
*/
|
|
@@ -2498,6 +2600,7 @@ export declare const StringForLiteralAutocomplete: StringForLiteralAutocomplete;
|
|
|
2498
2600
|
/**
|
|
2499
2601
|
* Type-level representation of {@link Number}.
|
|
2500
2602
|
*
|
|
2603
|
+
* @stability stable
|
|
2501
2604
|
* @category models
|
|
2502
2605
|
* @since 4.0.0
|
|
2503
2606
|
*/
|
|
@@ -2514,6 +2617,7 @@ export interface Number extends Bottom<number, number, never, never, SchemaAST.N
|
|
|
2514
2617
|
* - Non-finite values are serialized as strings (`"NaN"`, `"Infinity"`, `"-Infinity"`).
|
|
2515
2618
|
*
|
|
2516
2619
|
* @see {@link Finite} for a schema that excludes non-finite values.
|
|
2620
|
+
* @stability stable
|
|
2517
2621
|
* @category schemas
|
|
2518
2622
|
* @since 4.0.0
|
|
2519
2623
|
*/
|
|
@@ -2521,6 +2625,7 @@ export declare const Number: Number;
|
|
|
2521
2625
|
/**
|
|
2522
2626
|
* Type-level representation of {@link Boolean}.
|
|
2523
2627
|
*
|
|
2628
|
+
* @stability stable
|
|
2524
2629
|
* @category models
|
|
2525
2630
|
* @since 4.0.0
|
|
2526
2631
|
*/
|
|
@@ -2535,6 +2640,7 @@ export interface Boolean extends Bottom<boolean, boolean, never, never, SchemaAS
|
|
|
2535
2640
|
*
|
|
2536
2641
|
* @see {@link BooleanFromBit} for a schema that decodes bit literals `0` or `1` into a boolean
|
|
2537
2642
|
*
|
|
2643
|
+
* @stability stable
|
|
2538
2644
|
* @category schemas
|
|
2539
2645
|
* @since 4.0.0
|
|
2540
2646
|
*/
|
|
@@ -2542,6 +2648,7 @@ export declare const Boolean: Boolean;
|
|
|
2542
2648
|
/**
|
|
2543
2649
|
* Type-level representation of {@link Symbol}.
|
|
2544
2650
|
*
|
|
2651
|
+
* @stability stable
|
|
2545
2652
|
* @category models
|
|
2546
2653
|
* @since 4.0.0
|
|
2547
2654
|
*/
|
|
@@ -2551,6 +2658,7 @@ export interface Symbol extends Bottom<symbol, symbol, never, never, SchemaAST.S
|
|
|
2551
2658
|
* Schema for `symbol` values. Validates that the input is `typeof` `"symbol"`.
|
|
2552
2659
|
*
|
|
2553
2660
|
* @see {@link UniqueSymbol} for a schema that matches a specific symbol.
|
|
2661
|
+
* @stability stable
|
|
2554
2662
|
* @category schemas
|
|
2555
2663
|
* @since 4.0.0
|
|
2556
2664
|
*/
|
|
@@ -2558,6 +2666,7 @@ export declare const Symbol: Symbol;
|
|
|
2558
2666
|
/**
|
|
2559
2667
|
* Type-level representation of {@link BigInt}.
|
|
2560
2668
|
*
|
|
2669
|
+
* @stability stable
|
|
2561
2670
|
* @category models
|
|
2562
2671
|
* @since 4.0.0
|
|
2563
2672
|
*/
|
|
@@ -2573,6 +2682,7 @@ export interface BigInt extends Bottom<bigint, bigint, never, never, SchemaAST.B
|
|
|
2573
2682
|
*
|
|
2574
2683
|
* @see {@link BigIntFromString} for parsing string input into a bigint
|
|
2575
2684
|
*
|
|
2685
|
+
* @stability stable
|
|
2576
2686
|
* @category schemas
|
|
2577
2687
|
* @since 4.0.0
|
|
2578
2688
|
*/
|
|
@@ -2580,6 +2690,7 @@ export declare const BigInt: BigInt;
|
|
|
2580
2690
|
/**
|
|
2581
2691
|
* Type-level representation of {@link Void}.
|
|
2582
2692
|
*
|
|
2693
|
+
* @stability stable
|
|
2583
2694
|
* @category models
|
|
2584
2695
|
* @since 3.10.0
|
|
2585
2696
|
*/
|
|
@@ -2601,6 +2712,7 @@ export interface Void extends Bottom<void, void, never, never, SchemaAST.Void, V
|
|
|
2601
2712
|
* as `void`.
|
|
2602
2713
|
*
|
|
2603
2714
|
* @see {@link Undefined} for a schema that matches only the exact `undefined` value.
|
|
2715
|
+
* @stability stable
|
|
2604
2716
|
* @category schemas
|
|
2605
2717
|
* @since 3.10.0
|
|
2606
2718
|
*/
|
|
@@ -2608,6 +2720,7 @@ export declare const Void: Void;
|
|
|
2608
2720
|
/**
|
|
2609
2721
|
* Type-level representation of {@link ObjectKeyword}.
|
|
2610
2722
|
*
|
|
2723
|
+
* @stability stable
|
|
2611
2724
|
* @category models
|
|
2612
2725
|
* @since 4.0.0
|
|
2613
2726
|
*/
|
|
@@ -2617,6 +2730,7 @@ export interface ObjectKeyword extends Bottom<object, object, never, never, Sche
|
|
|
2617
2730
|
* Schema for the `object` type. Validates that the input is a non-null object or function
|
|
2618
2731
|
* (i.e. `typeof value === "object" && value !== null || typeof value === "function"`).
|
|
2619
2732
|
*
|
|
2733
|
+
* @stability stable
|
|
2620
2734
|
* @category schemas
|
|
2621
2735
|
* @since 4.0.0
|
|
2622
2736
|
*/
|
|
@@ -2624,6 +2738,7 @@ export declare const ObjectKeyword: ObjectKeyword;
|
|
|
2624
2738
|
/**
|
|
2625
2739
|
* Type-level representation returned by {@link UniqueSymbol}.
|
|
2626
2740
|
*
|
|
2741
|
+
* @stability stable
|
|
2627
2742
|
* @category models
|
|
2628
2743
|
* @since 4.0.0
|
|
2629
2744
|
*/
|
|
@@ -2649,6 +2764,7 @@ export interface UniqueSymbol<sym extends symbol> extends Bottom<sym, sym, never
|
|
|
2649
2764
|
* ```
|
|
2650
2765
|
*
|
|
2651
2766
|
* @see {@link Symbol} for a schema that accepts any symbol.
|
|
2767
|
+
* @stability stable
|
|
2652
2768
|
* @category constructors
|
|
2653
2769
|
* @since 4.0.0
|
|
2654
2770
|
*/
|
|
@@ -2668,6 +2784,7 @@ export declare function UniqueSymbol<const sym extends symbol>(symbol: sym): Uni
|
|
|
2668
2784
|
* - `Struct.MakeIn<F>` — constructor input (optional/defaulted fields may be omitted)
|
|
2669
2785
|
* - `Struct.DecodingServices<F>` / `Struct.EncodingServices<F>` — required services
|
|
2670
2786
|
*
|
|
2787
|
+
* @stability stable
|
|
2671
2788
|
* @since 3.10.0
|
|
2672
2789
|
*/
|
|
2673
2790
|
export declare namespace Struct {
|
|
@@ -2795,6 +2912,7 @@ export declare namespace Struct {
|
|
|
2795
2912
|
/**
|
|
2796
2913
|
* Type-level representation returned by {@link Struct}.
|
|
2797
2914
|
*
|
|
2915
|
+
* @stability stable
|
|
2798
2916
|
* @category models
|
|
2799
2917
|
* @since 3.10.0
|
|
2800
2918
|
*/
|
|
@@ -2880,6 +2998,7 @@ export interface Struct<Fields extends Struct.Fields> extends BottomLazy<SchemaA
|
|
|
2880
2998
|
* Schema.decodeUnknownSync(Person)({ name: "Alice", age: 30 }) // => { name: "Alice", age: 30 }
|
|
2881
2999
|
* ```
|
|
2882
3000
|
*
|
|
3001
|
+
* @stability stable
|
|
2883
3002
|
* @category constructors
|
|
2884
3003
|
* @since 3.10.0
|
|
2885
3004
|
*/
|
|
@@ -2913,6 +3032,7 @@ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
|
|
|
2913
3032
|
* Schema.decodeSync(schema)({ a: "a", c: 1 }) // => { a: "a", c: 1 }
|
|
2914
3033
|
* ```
|
|
2915
3034
|
*
|
|
3035
|
+
* @stability stable
|
|
2916
3036
|
* @category combinators
|
|
2917
3037
|
* @since 4.0.0
|
|
2918
3038
|
*/
|
|
@@ -2920,6 +3040,7 @@ export declare function fieldsAssign<const NewFields extends Struct.Fields>(fiel
|
|
|
2920
3040
|
/**
|
|
2921
3041
|
* Type-level representation returned by {@link encodeKeys}.
|
|
2922
3042
|
*
|
|
3043
|
+
* @stability stable
|
|
2923
3044
|
* @category transforming
|
|
2924
3045
|
* @since 4.0.0
|
|
2925
3046
|
*/
|
|
@@ -2954,6 +3075,7 @@ export interface encodeKeys<S extends Constraint & {
|
|
|
2954
3075
|
* Schema.decodeUnknownSync(Encoded)({ full_name: "Alice", age: 30 }) // => { name: "Alice", age: 30 }
|
|
2955
3076
|
* ```
|
|
2956
3077
|
*
|
|
3078
|
+
* @stability stable
|
|
2957
3079
|
* @category transforming
|
|
2958
3080
|
* @since 4.0.0
|
|
2959
3081
|
*/
|
|
@@ -2989,6 +3111,7 @@ export declare function encodeKeys<S extends Constraint & {
|
|
|
2989
3111
|
* alice.fullName // => "Alice Smith"
|
|
2990
3112
|
* ```
|
|
2991
3113
|
*
|
|
3114
|
+
* @stability stable
|
|
2992
3115
|
* @category transforming
|
|
2993
3116
|
* @since 4.0.0
|
|
2994
3117
|
*/
|
|
@@ -3004,6 +3127,7 @@ export declare function extendTo<S extends Struct<Struct.Fields>, const Fields e
|
|
|
3004
3127
|
* - `Record.Type<K, V>` — decoded type of the record
|
|
3005
3128
|
* - `Record.Encoded<K, V>` — encoded type of the record
|
|
3006
3129
|
*
|
|
3130
|
+
* @stability stable
|
|
3007
3131
|
* @since 3.10.0
|
|
3008
3132
|
*/
|
|
3009
3133
|
export declare namespace Record {
|
|
@@ -3146,6 +3270,7 @@ export declare namespace Record {
|
|
|
3146
3270
|
/**
|
|
3147
3271
|
* Type-level representation returned by {@link Record}.
|
|
3148
3272
|
*
|
|
3273
|
+
* @stability stable
|
|
3149
3274
|
* @category models
|
|
3150
3275
|
* @since 4.0.0
|
|
3151
3276
|
*/
|
|
@@ -3195,6 +3320,7 @@ export interface $Record<Key extends Record.Key, Value extends Constraint> exten
|
|
|
3195
3320
|
* Schema.decodeUnknownSync(schema)({ a: 1, b: 2 }) // => { a: 1, b: 2 }
|
|
3196
3321
|
* ```
|
|
3197
3322
|
*
|
|
3323
|
+
* @stability stable
|
|
3198
3324
|
* @category constructors
|
|
3199
3325
|
* @since 3.10.0
|
|
3200
3326
|
*/
|
|
@@ -3207,6 +3333,7 @@ export declare function Record<Key extends Record.Key, Value extends Constraint>
|
|
|
3207
3333
|
* - `StructWithRest.Type<S, R>` — decoded type (struct type intersected with record types)
|
|
3208
3334
|
* - `StructWithRest.Encoded<S, R>` — encoded type
|
|
3209
3335
|
*
|
|
3336
|
+
* @stability stable
|
|
3210
3337
|
* @since 4.0.0
|
|
3211
3338
|
*/
|
|
3212
3339
|
export declare namespace StructWithRest {
|
|
@@ -3334,6 +3461,7 @@ export declare namespace StructWithRest {
|
|
|
3334
3461
|
/**
|
|
3335
3462
|
* Type-level representation returned by {@link StructWithRest}.
|
|
3336
3463
|
*
|
|
3464
|
+
* @stability stable
|
|
3337
3465
|
* @category models
|
|
3338
3466
|
* @since 4.0.0
|
|
3339
3467
|
*/
|
|
@@ -3373,6 +3501,7 @@ export interface StructWithRest<S extends StructWithRest.Objects, Records extend
|
|
|
3373
3501
|
* type T = typeof schema.Type
|
|
3374
3502
|
* ```
|
|
3375
3503
|
*
|
|
3504
|
+
* @stability stable
|
|
3376
3505
|
* @category constructors
|
|
3377
3506
|
* @since 4.0.0
|
|
3378
3507
|
*/
|
|
@@ -3387,6 +3516,7 @@ export declare function StructWithRest<const S extends StructWithRest.Objects, c
|
|
|
3387
3516
|
* - `Tuple.Encoded<E>` — encoded tuple type
|
|
3388
3517
|
* - `Tuple.MakeIn<E>` — constructor input tuple
|
|
3389
3518
|
*
|
|
3519
|
+
* @stability stable
|
|
3390
3520
|
* @since 3.10.0
|
|
3391
3521
|
*/
|
|
3392
3522
|
export declare namespace Tuple {
|
|
@@ -3484,6 +3614,7 @@ export declare namespace Tuple {
|
|
|
3484
3614
|
/**
|
|
3485
3615
|
* Type-level representation returned by {@link Tuple}.
|
|
3486
3616
|
*
|
|
3617
|
+
* @stability stable
|
|
3487
3618
|
* @category models
|
|
3488
3619
|
* @since 3.10.0
|
|
3489
3620
|
*/
|
|
@@ -3529,6 +3660,7 @@ export interface Tuple<Elements extends Tuple.Elements> extends BottomLazy<Schem
|
|
|
3529
3660
|
* Schema.decodeUnknownSync(schema)(["hello", 42]) // => ["hello", 42]
|
|
3530
3661
|
* ```
|
|
3531
3662
|
*
|
|
3663
|
+
* @stability stable
|
|
3532
3664
|
* @category constructors
|
|
3533
3665
|
* @since 3.10.0
|
|
3534
3666
|
*/
|
|
@@ -3543,6 +3675,7 @@ export declare function Tuple<const Elements extends ReadonlyArray<Constraint>>(
|
|
|
3543
3675
|
* - `TupleWithRest.Type<T, R>` — decoded type (fixed elements + rest)
|
|
3544
3676
|
* - `TupleWithRest.Encoded<T, R>` — encoded type
|
|
3545
3677
|
*
|
|
3678
|
+
* @stability stable
|
|
3546
3679
|
* @since 4.0.0
|
|
3547
3680
|
*/
|
|
3548
3681
|
export declare namespace TupleWithRest {
|
|
@@ -3652,6 +3785,7 @@ export declare namespace TupleWithRest {
|
|
|
3652
3785
|
/**
|
|
3653
3786
|
* Type-level representation returned by {@link TupleWithRest}.
|
|
3654
3787
|
*
|
|
3788
|
+
* @stability stable
|
|
3655
3789
|
* @category models
|
|
3656
3790
|
* @since 4.0.0
|
|
3657
3791
|
*/
|
|
@@ -3691,6 +3825,7 @@ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends T
|
|
|
3691
3825
|
* Schema.decodeUnknownSync(schema)(["hello", 1, true, false]) // => ["hello", 1, true, false]
|
|
3692
3826
|
* ```
|
|
3693
3827
|
*
|
|
3828
|
+
* @stability stable
|
|
3694
3829
|
* @category constructors
|
|
3695
3830
|
* @since 4.0.0
|
|
3696
3831
|
*/
|
|
@@ -3698,6 +3833,7 @@ export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Res
|
|
|
3698
3833
|
/**
|
|
3699
3834
|
* Type-level representation returned by {@link Array}.
|
|
3700
3835
|
*
|
|
3836
|
+
* @stability stable
|
|
3701
3837
|
* @category models
|
|
3702
3838
|
* @since 4.0.0
|
|
3703
3839
|
*/
|
|
@@ -3734,6 +3870,7 @@ export {
|
|
|
3734
3870
|
* Schema.decodeUnknownSync(schema)(["a", "b", "c"]) // => ["a", "b", "c"]
|
|
3735
3871
|
* ```
|
|
3736
3872
|
*
|
|
3873
|
+
* @stability stable
|
|
3737
3874
|
* @category constructors
|
|
3738
3875
|
* @since 4.0.0
|
|
3739
3876
|
*/
|
|
@@ -3741,6 +3878,7 @@ ArraySchema as Array };
|
|
|
3741
3878
|
/**
|
|
3742
3879
|
* Type-level representation returned by {@link NonEmptyArray}.
|
|
3743
3880
|
*
|
|
3881
|
+
* @stability stable
|
|
3744
3882
|
* @category models
|
|
3745
3883
|
* @since 3.10.0
|
|
3746
3884
|
*/
|
|
@@ -3772,6 +3910,7 @@ interface NonEmptyArrayLambda extends Lambda {
|
|
|
3772
3910
|
* Schema.decodeUnknownSync(schema)([1, 2, 3]) // => [1, 2, 3]
|
|
3773
3911
|
* ```
|
|
3774
3912
|
*
|
|
3913
|
+
* @stability stable
|
|
3775
3914
|
* @category constructors
|
|
3776
3915
|
* @since 3.10.0
|
|
3777
3916
|
*/
|
|
@@ -3779,6 +3918,7 @@ export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
|
3779
3918
|
/**
|
|
3780
3919
|
* Type-level representation returned by {@link ArrayEnsure}.
|
|
3781
3920
|
*
|
|
3921
|
+
* @stability stable
|
|
3782
3922
|
* @category constructors
|
|
3783
3923
|
* @since 3.10.0
|
|
3784
3924
|
*/
|
|
@@ -3808,6 +3948,7 @@ export interface ArrayEnsure<S extends Constraint> extends decodeTo<$Array<toTyp
|
|
|
3808
3948
|
* @see {@link Array} for accepting only array input
|
|
3809
3949
|
* @see {@link NonEmptyArray} for requiring at least one decoded element
|
|
3810
3950
|
*
|
|
3951
|
+
* @stability stable
|
|
3811
3952
|
* @category constructors
|
|
3812
3953
|
* @since 3.10.0
|
|
3813
3954
|
*/
|
|
@@ -3815,6 +3956,7 @@ export declare function ArrayEnsure<S extends Constraint>(schema: S): ArrayEnsur
|
|
|
3815
3956
|
/**
|
|
3816
3957
|
* Type-level representation returned by {@link UniqueArray}.
|
|
3817
3958
|
*
|
|
3959
|
+
* @stability stable
|
|
3818
3960
|
* @category models
|
|
3819
3961
|
* @since 4.0.0
|
|
3820
3962
|
*/
|
|
@@ -3829,6 +3971,7 @@ export interface UniqueArray<S extends Constraint> extends $Array<S> {
|
|
|
3829
3971
|
* The equivalence used to determine uniqueness is the one provided by
|
|
3830
3972
|
* `Schema.toEquivalence(item)`.
|
|
3831
3973
|
*
|
|
3974
|
+
* @stability stable
|
|
3832
3975
|
* @category constructors
|
|
3833
3976
|
* @since 4.0.0
|
|
3834
3977
|
*/
|
|
@@ -3836,6 +3979,7 @@ export declare function UniqueArray<S extends Constraint>(item: S): UniqueArray<
|
|
|
3836
3979
|
/**
|
|
3837
3980
|
* Type-level representation returned by {@link mutable}.
|
|
3838
3981
|
*
|
|
3982
|
+
* @stability stable
|
|
3839
3983
|
* @category transforming
|
|
3840
3984
|
* @since 3.10.0
|
|
3841
3985
|
*/
|
|
@@ -3882,6 +4026,7 @@ interface mutableLambda extends Lambda {
|
|
|
3882
4026
|
* value // => [1, 2, 3]
|
|
3883
4027
|
* ```
|
|
3884
4028
|
*
|
|
4029
|
+
* @stability stable
|
|
3885
4030
|
* @category transforming
|
|
3886
4031
|
* @since 3.10.0
|
|
3887
4032
|
*/
|
|
@@ -3889,6 +4034,7 @@ export declare const mutable: mutableLambda;
|
|
|
3889
4034
|
/**
|
|
3890
4035
|
* Type-level representation returned by {@link Union}.
|
|
3891
4036
|
*
|
|
4037
|
+
* @stability stable
|
|
3892
4038
|
* @category models
|
|
3893
4039
|
* @since 3.10.0
|
|
3894
4040
|
*/
|
|
@@ -3958,6 +4104,7 @@ export interface Union<Members extends ReadonlyArray<Constraint>> extends Bottom
|
|
|
3958
4104
|
* Schema.decodeUnknownSync(schema)(42) // => 42
|
|
3959
4105
|
* ```
|
|
3960
4106
|
*
|
|
4107
|
+
* @stability stable
|
|
3961
4108
|
* @category constructors
|
|
3962
4109
|
* @since 3.10.0
|
|
3963
4110
|
*/
|
|
@@ -3965,6 +4112,7 @@ export declare function Union<const Members extends ReadonlyArray<Constraint>>(m
|
|
|
3965
4112
|
/**
|
|
3966
4113
|
* Type-level representation returned by {@link Literals}.
|
|
3967
4114
|
*
|
|
4115
|
+
* @stability stable
|
|
3968
4116
|
* @category models
|
|
3969
4117
|
* @since 4.0.0
|
|
3970
4118
|
*/
|
|
@@ -3997,6 +4145,7 @@ export interface Literals<L extends ReadonlyArray<SchemaAST.LiteralValue>> exten
|
|
|
3997
4145
|
* ```
|
|
3998
4146
|
*
|
|
3999
4147
|
* @see {@link Literal} for a schema that represents a single literal.
|
|
4148
|
+
* @stability stable
|
|
4000
4149
|
* @category constructors
|
|
4001
4150
|
* @since 4.0.0
|
|
4002
4151
|
*/
|
|
@@ -4004,6 +4153,7 @@ export declare function Literals<const L extends ReadonlyArray<SchemaAST.Literal
|
|
|
4004
4153
|
/**
|
|
4005
4154
|
* Type-level representation returned by {@link NullOr}.
|
|
4006
4155
|
*
|
|
4156
|
+
* @stability stable
|
|
4007
4157
|
* @category models
|
|
4008
4158
|
* @since 3.10.0
|
|
4009
4159
|
*/
|
|
@@ -4017,6 +4167,7 @@ interface NullOrLambda extends Lambda {
|
|
|
4017
4167
|
/**
|
|
4018
4168
|
* Creates a union schema of `S | null`.
|
|
4019
4169
|
*
|
|
4170
|
+
* @stability stable
|
|
4020
4171
|
* @category constructors
|
|
4021
4172
|
* @since 3.10.0
|
|
4022
4173
|
*/
|
|
@@ -4024,6 +4175,7 @@ export declare const NullOr: NullOrLambda;
|
|
|
4024
4175
|
/**
|
|
4025
4176
|
* Type-level representation returned by {@link UndefinedOr}.
|
|
4026
4177
|
*
|
|
4178
|
+
* @stability stable
|
|
4027
4179
|
* @category models
|
|
4028
4180
|
* @since 3.10.0
|
|
4029
4181
|
*/
|
|
@@ -4037,6 +4189,7 @@ interface UndefinedOrLambda extends Lambda {
|
|
|
4037
4189
|
/**
|
|
4038
4190
|
* Creates a union schema of `S | undefined`.
|
|
4039
4191
|
*
|
|
4192
|
+
* @stability stable
|
|
4040
4193
|
* @category constructors
|
|
4041
4194
|
* @since 3.10.0
|
|
4042
4195
|
*/
|
|
@@ -4044,6 +4197,7 @@ export declare const UndefinedOr: UndefinedOrLambda;
|
|
|
4044
4197
|
/**
|
|
4045
4198
|
* Type-level representation returned by {@link NullishOr}.
|
|
4046
4199
|
*
|
|
4200
|
+
* @stability stable
|
|
4047
4201
|
* @category models
|
|
4048
4202
|
* @since 3.10.0
|
|
4049
4203
|
*/
|
|
@@ -4057,6 +4211,7 @@ interface NullishOrLambda extends Lambda {
|
|
|
4057
4211
|
/**
|
|
4058
4212
|
* Creates a union schema of `S | null | undefined`.
|
|
4059
4213
|
*
|
|
4214
|
+
* @stability stable
|
|
4060
4215
|
* @category constructors
|
|
4061
4216
|
* @since 3.10.0
|
|
4062
4217
|
*/
|
|
@@ -4064,6 +4219,7 @@ export declare const NullishOr: NullishOrLambda;
|
|
|
4064
4219
|
/**
|
|
4065
4220
|
* Type-level representation returned by {@link suspend}.
|
|
4066
4221
|
*
|
|
4222
|
+
* @stability stable
|
|
4067
4223
|
* @category models
|
|
4068
4224
|
* @since 3.10.0
|
|
4069
4225
|
*/
|
|
@@ -4098,6 +4254,7 @@ export interface suspend<S extends Constraint> extends BottomLazy<SchemaAST.Susp
|
|
|
4098
4254
|
* Schema.decodeSync(Tree)({ value: 1, children: [] }) // => { value: 1, children: [] }
|
|
4099
4255
|
* ```
|
|
4100
4256
|
*
|
|
4257
|
+
* @stability stable
|
|
4101
4258
|
* @category constructors
|
|
4102
4259
|
* @since 3.10.0
|
|
4103
4260
|
*/
|
|
@@ -4118,6 +4275,7 @@ export declare function suspend<S extends Constraint>(f: () => S): suspend<S>;
|
|
|
4118
4275
|
* Schema.is(AgeSchema)(121) // => false
|
|
4119
4276
|
* ```
|
|
4120
4277
|
*
|
|
4278
|
+
* @stability stable
|
|
4121
4279
|
* @category filtering
|
|
4122
4280
|
* @since 4.0.0
|
|
4123
4281
|
*/
|
|
@@ -4125,6 +4283,7 @@ export declare function check<S extends Top>(...checks: readonly [SchemaAST.Chec
|
|
|
4125
4283
|
/**
|
|
4126
4284
|
* Type-level representation returned by {@link refine}.
|
|
4127
4285
|
*
|
|
4286
|
+
* @stability stable
|
|
4128
4287
|
* @category filtering
|
|
4129
4288
|
* @since 3.10.0
|
|
4130
4289
|
*/
|
|
@@ -4150,6 +4309,7 @@ export interface refine<T extends S["Type"], S extends Constraint> extends Botto
|
|
|
4150
4309
|
* names type-level failures before the refinement runs; it does not name the
|
|
4151
4310
|
* failed refinement itself.
|
|
4152
4311
|
*
|
|
4312
|
+
* @stability stable
|
|
4153
4313
|
* @category filtering
|
|
4154
4314
|
* @since 3.10.0
|
|
4155
4315
|
*/
|
|
@@ -4159,6 +4319,7 @@ type FromBrandKeys<A extends Brand.Brand<any>> = A extends unknown ? Brand.Brand
|
|
|
4159
4319
|
/**
|
|
4160
4320
|
* Type-level representation returned by {@link brand}.
|
|
4161
4321
|
*
|
|
4322
|
+
* @stability stable
|
|
4162
4323
|
* @category branding
|
|
4163
4324
|
* @since 3.10.0
|
|
4164
4325
|
*/
|
|
@@ -4194,6 +4355,7 @@ export interface brand<S extends Constraint, B extends string> extends BottomLaz
|
|
|
4194
4355
|
*
|
|
4195
4356
|
* @see {@link fromBrand} for applying a Brand constructor's checks along with its branded type
|
|
4196
4357
|
*
|
|
4358
|
+
* @stability stable
|
|
4197
4359
|
* @category branding
|
|
4198
4360
|
* @since 3.10.0
|
|
4199
4361
|
*/
|
|
@@ -4214,6 +4376,7 @@ export declare function brand<B extends string>(identifier: B & EnsureSingleBran
|
|
|
4214
4376
|
*
|
|
4215
4377
|
* @see {@link brand} for adding a brand without constructor checks
|
|
4216
4378
|
*
|
|
4379
|
+
* @stability stable
|
|
4217
4380
|
* @category branding
|
|
4218
4381
|
* @since 3.10.0
|
|
4219
4382
|
*/
|
|
@@ -4223,6 +4386,7 @@ export declare function fromBrand<A extends Brand.Brand<any>>(identifier: Brand.
|
|
|
4223
4386
|
/**
|
|
4224
4387
|
* Type-level representation returned by {@link middlewareDecoding}.
|
|
4225
4388
|
*
|
|
4389
|
+
* @stability stable
|
|
4226
4390
|
* @category decoding
|
|
4227
4391
|
* @since 4.0.0
|
|
4228
4392
|
*/
|
|
@@ -4261,6 +4425,7 @@ export interface middlewareDecoding<S extends Constraint, RD> extends BottomLazy
|
|
|
4261
4425
|
* ```
|
|
4262
4426
|
*
|
|
4263
4427
|
* @see {@link catchDecoding} for a simpler error-recovery variant
|
|
4428
|
+
* @stability stable
|
|
4264
4429
|
* @category decoding
|
|
4265
4430
|
* @since 4.0.0
|
|
4266
4431
|
*/
|
|
@@ -4268,6 +4433,7 @@ export declare function middlewareDecoding<S extends Constraint, RD>(decode: (ef
|
|
|
4268
4433
|
/**
|
|
4269
4434
|
* Type-level representation returned by {@link middlewareEncoding}.
|
|
4270
4435
|
*
|
|
4436
|
+
* @stability stable
|
|
4271
4437
|
* @category encoding
|
|
4272
4438
|
* @since 4.0.0
|
|
4273
4439
|
*/
|
|
@@ -4306,6 +4472,7 @@ export interface middlewareEncoding<S extends Constraint, RE> extends BottomLazy
|
|
|
4306
4472
|
* ```
|
|
4307
4473
|
*
|
|
4308
4474
|
* @see {@link catchEncoding} for a simpler error-recovery variant
|
|
4475
|
+
* @stability stable
|
|
4309
4476
|
* @category encoding
|
|
4310
4477
|
* @since 4.0.0
|
|
4311
4478
|
*/
|
|
@@ -4330,6 +4497,7 @@ export declare function middlewareEncoding<S extends Constraint, RE>(encode: (ef
|
|
|
4330
4497
|
* ```
|
|
4331
4498
|
*
|
|
4332
4499
|
* @see {@link catchDecodingWithContext} to add service requirements to the handler
|
|
4500
|
+
* @stability stable
|
|
4333
4501
|
* @category error handling
|
|
4334
4502
|
* @since 4.0.0
|
|
4335
4503
|
*/
|
|
@@ -4351,6 +4519,7 @@ export declare function catchDecoding<S extends Constraint>(f: (issue: SchemaIss
|
|
|
4351
4519
|
* @see {@link catchDecoding} for recovery handlers that do not require services
|
|
4352
4520
|
* @see {@link middlewareDecoding} for intercepting or replacing the full decoding pipeline
|
|
4353
4521
|
*
|
|
4522
|
+
* @stability stable
|
|
4354
4523
|
* @category error handling
|
|
4355
4524
|
* @since 4.0.0
|
|
4356
4525
|
*/
|
|
@@ -4364,6 +4533,7 @@ export declare function catchDecodingWithContext<S extends Constraint, R = never
|
|
|
4364
4533
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
4365
4534
|
*
|
|
4366
4535
|
* @see {@link catchEncodingWithContext} to add service requirements to the handler
|
|
4536
|
+
* @stability stable
|
|
4367
4537
|
* @category error handling
|
|
4368
4538
|
* @since 4.0.0
|
|
4369
4539
|
*/
|
|
@@ -4385,6 +4555,7 @@ export declare function catchEncoding<S extends Constraint>(f: (issue: SchemaIss
|
|
|
4385
4555
|
* @see {@link catchEncoding} for recovery handlers that do not require services
|
|
4386
4556
|
* @see {@link middlewareEncoding} for intercepting or replacing the full encoding pipeline
|
|
4387
4557
|
*
|
|
4558
|
+
* @stability stable
|
|
4388
4559
|
* @category error handling
|
|
4389
4560
|
* @since 4.0.0
|
|
4390
4561
|
*/
|
|
@@ -4392,6 +4563,7 @@ export declare function catchEncodingWithContext<S extends Constraint, R = never
|
|
|
4392
4563
|
/**
|
|
4393
4564
|
* Type-level representation returned by {@link decodeTo}.
|
|
4394
4565
|
*
|
|
4566
|
+
* @stability stable
|
|
4395
4567
|
* @category transforming
|
|
4396
4568
|
* @since 4.0.0
|
|
4397
4569
|
*/
|
|
@@ -4409,6 +4581,7 @@ export interface decodeTo<To extends Constraint, From extends Constraint, RD = n
|
|
|
4409
4581
|
/**
|
|
4410
4582
|
* Type-level representation returned by {@link decodeTo} without a custom transformation.
|
|
4411
4583
|
*
|
|
4584
|
+
* @stability stable
|
|
4412
4585
|
* @category transforming
|
|
4413
4586
|
* @since 3.10.0
|
|
4414
4587
|
*/
|
|
@@ -4458,6 +4631,7 @@ export interface compose<To extends Constraint, From extends Constraint> extends
|
|
|
4458
4631
|
* Schema.decodeUnknownSync(NumberFromString)("123") // => 123
|
|
4459
4632
|
* ```
|
|
4460
4633
|
*
|
|
4634
|
+
* @stability stable
|
|
4461
4635
|
* @category transforming
|
|
4462
4636
|
* @since 4.0.0
|
|
4463
4637
|
*/
|
|
@@ -4505,6 +4679,7 @@ export declare function decodeTo<To extends Constraint, From extends Constraint,
|
|
|
4505
4679
|
* Schema.decodeUnknownSync(Trimmed)(" hello ") // => "hello"
|
|
4506
4680
|
* ```
|
|
4507
4681
|
*
|
|
4682
|
+
* @stability stable
|
|
4508
4683
|
* @category transforming
|
|
4509
4684
|
* @since 4.0.0
|
|
4510
4685
|
*/
|
|
@@ -4539,6 +4714,7 @@ export declare function decode<S extends Constraint, RD = never, RE = never>(tra
|
|
|
4539
4714
|
* Schema.decodeSync(NumberFromString)("42") // => 42
|
|
4540
4715
|
* ```
|
|
4541
4716
|
*
|
|
4717
|
+
* @stability stable
|
|
4542
4718
|
* @category transforming
|
|
4543
4719
|
* @since 4.0.0
|
|
4544
4720
|
*/
|
|
@@ -4570,6 +4746,7 @@ export declare function encodeTo<To extends Constraint, From extends Constraint,
|
|
|
4570
4746
|
* Schema.encodeSync(UpperFromLower)("hello") // => "HELLO"
|
|
4571
4747
|
* ```
|
|
4572
4748
|
*
|
|
4749
|
+
* @stability stable
|
|
4573
4750
|
* @category transforming
|
|
4574
4751
|
* @since 4.0.0
|
|
4575
4752
|
*/
|
|
@@ -4584,6 +4761,7 @@ export declare function encode<S extends Constraint, RD = never, RE = never>(tra
|
|
|
4584
4761
|
*
|
|
4585
4762
|
* Only schemas that satisfy this constraint can be passed to {@link withConstructorDefault}.
|
|
4586
4763
|
*
|
|
4764
|
+
* @stability stable
|
|
4587
4765
|
* @category models
|
|
4588
4766
|
* @since 4.0.0
|
|
4589
4767
|
*/
|
|
@@ -4593,6 +4771,7 @@ export interface WithoutConstructorDefault {
|
|
|
4593
4771
|
/**
|
|
4594
4772
|
* Type-level representation returned by {@link withConstructorDefault}.
|
|
4595
4773
|
*
|
|
4774
|
+
* @stability stable
|
|
4596
4775
|
* @category constructors
|
|
4597
4776
|
* @since 3.10.0
|
|
4598
4777
|
*/
|
|
@@ -4629,6 +4808,7 @@ export interface withConstructorDefault<S extends Constraint & WithoutConstructo
|
|
|
4629
4808
|
* MySchema.make({}).name // => "anonymous"
|
|
4630
4809
|
* ```
|
|
4631
4810
|
*
|
|
4811
|
+
* @stability stable
|
|
4632
4812
|
* @category constructors
|
|
4633
4813
|
* @since 3.10.0
|
|
4634
4814
|
*/
|
|
@@ -4636,6 +4816,7 @@ export declare function withConstructorDefault<S extends Constraint & WithoutCon
|
|
|
4636
4816
|
/**
|
|
4637
4817
|
* Type-level representation returned by {@link withDecodingDefaultKey}.
|
|
4638
4818
|
*
|
|
4819
|
+
* @stability stable
|
|
4639
4820
|
* @category decoding
|
|
4640
4821
|
* @since 4.0.0
|
|
4641
4822
|
*/
|
|
@@ -4651,6 +4832,7 @@ export interface withDecodingDefaultKey<S extends Constraint, R = never> extends
|
|
|
4651
4832
|
* - `"passthrough"` (default): pass the value through during encoding
|
|
4652
4833
|
* - `"omit"`: omit the key from the encoded output
|
|
4653
4834
|
*
|
|
4835
|
+
* @stability stable
|
|
4654
4836
|
* @category options
|
|
4655
4837
|
* @since 4.0.0
|
|
4656
4838
|
*/
|
|
@@ -4687,6 +4869,7 @@ export type DecodingDefaultOptions = {
|
|
|
4687
4869
|
*
|
|
4688
4870
|
* @see {@link withDecodingDefault} for the value-level variant (key absent **or** `undefined`)
|
|
4689
4871
|
* @see {@link withDecodingDefaultTypeKey} for the variant where the default is a `Type` value
|
|
4872
|
+
* @stability stable
|
|
4690
4873
|
* @category decoding
|
|
4691
4874
|
* @since 4.0.0
|
|
4692
4875
|
*/
|
|
@@ -4694,6 +4877,7 @@ export declare function withDecodingDefaultKey<S extends Constraint, R = never>(
|
|
|
4694
4877
|
/**
|
|
4695
4878
|
* Type-level representation returned by {@link withDecodingDefaultTypeKey}.
|
|
4696
4879
|
*
|
|
4880
|
+
* @stability stable
|
|
4697
4881
|
* @category decoding
|
|
4698
4882
|
* @since 4.0.0
|
|
4699
4883
|
*/
|
|
@@ -4719,6 +4903,7 @@ export interface withDecodingDefaultTypeKey<S extends Constraint, R = never> ext
|
|
|
4719
4903
|
*
|
|
4720
4904
|
* @see {@link withDecodingDefaultKey} for the variant where the default is an `Encoded` value
|
|
4721
4905
|
* @see {@link withDecodingDefaultType} for the value-level variant
|
|
4906
|
+
* @stability stable
|
|
4722
4907
|
* @category decoding
|
|
4723
4908
|
* @since 4.0.0
|
|
4724
4909
|
*/
|
|
@@ -4726,6 +4911,7 @@ export declare function withDecodingDefaultTypeKey<S extends Constraint, R = nev
|
|
|
4726
4911
|
/**
|
|
4727
4912
|
* Type-level representation returned by {@link withDecodingDefault}.
|
|
4728
4913
|
*
|
|
4914
|
+
* @stability stable
|
|
4729
4915
|
* @category decoding
|
|
4730
4916
|
* @since 3.10.0
|
|
4731
4917
|
*/
|
|
@@ -4767,6 +4953,7 @@ export interface withDecodingDefault<S extends Constraint, R = never> extends de
|
|
|
4767
4953
|
*
|
|
4768
4954
|
* @see {@link withDecodingDefaultKey} for the key-level variant (key absent only, not `undefined`)
|
|
4769
4955
|
* @see {@link withDecodingDefaultType} for the variant where the default is a `Type` value
|
|
4956
|
+
* @stability stable
|
|
4770
4957
|
* @category decoding
|
|
4771
4958
|
* @since 3.10.0
|
|
4772
4959
|
*/
|
|
@@ -4774,6 +4961,7 @@ export declare function withDecodingDefault<S extends Constraint, R = never>(def
|
|
|
4774
4961
|
/**
|
|
4775
4962
|
* Type-level representation returned by {@link withDecodingDefaultType}.
|
|
4776
4963
|
*
|
|
4964
|
+
* @stability stable
|
|
4777
4965
|
* @category decoding
|
|
4778
4966
|
* @since 4.0.0
|
|
4779
4967
|
*/
|
|
@@ -4804,6 +4992,7 @@ export interface withDecodingDefaultType<S extends Constraint, R = never> extend
|
|
|
4804
4992
|
*
|
|
4805
4993
|
* @see {@link withDecodingDefault} for the variant where the default is an `Encoded` value
|
|
4806
4994
|
* @see {@link withDecodingDefaultTypeKey} for the key-level variant
|
|
4995
|
+
* @stability stable
|
|
4807
4996
|
* @category decoding
|
|
4808
4997
|
* @since 4.0.0
|
|
4809
4998
|
*/
|
|
@@ -4811,6 +5000,7 @@ export declare function withDecodingDefaultType<S extends Constraint, R = never>
|
|
|
4811
5000
|
/**
|
|
4812
5001
|
* Type-level representation returned by {@link tag}.
|
|
4813
5002
|
*
|
|
5003
|
+
* @stability stable
|
|
4814
5004
|
* @category constructors
|
|
4815
5005
|
* @since 3.10.0
|
|
4816
5006
|
*/
|
|
@@ -4835,6 +5025,7 @@ export interface tag<Tag extends SchemaAST.LiteralValue> extends withConstructor
|
|
|
4835
5025
|
*
|
|
4836
5026
|
* @see {@link tagDefaultOmit} to also omit the tag during encoding
|
|
4837
5027
|
* @see {@link TaggedStruct} for a shorthand that adds `_tag` automatically
|
|
5028
|
+
* @stability stable
|
|
4838
5029
|
* @category constructors
|
|
4839
5030
|
* @since 3.10.0
|
|
4840
5031
|
*/
|
|
@@ -4867,6 +5058,7 @@ export declare function tag<Tag extends SchemaAST.LiteralValue>(literal: Tag): t
|
|
|
4867
5058
|
* ```
|
|
4868
5059
|
*
|
|
4869
5060
|
* @see {@link tag} for the variant that keeps the tag during encoding
|
|
5061
|
+
* @stability stable
|
|
4870
5062
|
* @category constructors
|
|
4871
5063
|
* @since 4.0.0
|
|
4872
5064
|
*/
|
|
@@ -4874,6 +5066,7 @@ export declare function tagDefaultOmit<Tag extends SchemaAST.LiteralValue>(liter
|
|
|
4874
5066
|
/**
|
|
4875
5067
|
* Type-level representation returned by {@link TaggedStruct}.
|
|
4876
5068
|
*
|
|
5069
|
+
* @stability stable
|
|
4877
5070
|
* @category models
|
|
4878
5071
|
* @since 3.10.0
|
|
4879
5072
|
*/
|
|
@@ -4924,6 +5117,7 @@ export type TaggedStruct<Tag extends SchemaAST.LiteralValue, Fields extends Stru
|
|
|
4924
5117
|
* tagged.fields._tag.schema.literal // => "A"
|
|
4925
5118
|
* ```
|
|
4926
5119
|
*
|
|
5120
|
+
* @stability stable
|
|
4927
5121
|
* @category constructors
|
|
4928
5122
|
* @since 3.10.0
|
|
4929
5123
|
*/
|
|
@@ -4945,6 +5139,10 @@ type TaggedUnionUtils<Tag extends PropertyKey, Members extends ReadonlyArray<Con
|
|
|
4945
5139
|
readonly [K in Tag]: PropertyKey;
|
|
4946
5140
|
};
|
|
4947
5141
|
}> = Flatten<Members>> = {
|
|
5142
|
+
/**
|
|
5143
|
+
* Property key used to discriminate union members.
|
|
5144
|
+
*/
|
|
5145
|
+
readonly tag: Tag;
|
|
4948
5146
|
/**
|
|
4949
5147
|
* Discriminant values in flattened member order.
|
|
4950
5148
|
*/
|
|
@@ -4988,6 +5186,7 @@ type TaggedUnionUtils<Tag extends PropertyKey, Members extends ReadonlyArray<Con
|
|
|
4988
5186
|
/**
|
|
4989
5187
|
* Type-level representation returned by {@link toTaggedUnion}.
|
|
4990
5188
|
*
|
|
5189
|
+
* @stability stable
|
|
4991
5190
|
* @category combinators
|
|
4992
5191
|
* @since 4.0.0
|
|
4993
5192
|
*/
|
|
@@ -5023,6 +5222,7 @@ export type toTaggedUnion<Tag extends PropertyKey, Members extends ReadonlyArray
|
|
|
5023
5222
|
* ```
|
|
5024
5223
|
*
|
|
5025
5224
|
* @see {@link TaggedUnion} for a shorthand that builds the union from scratch
|
|
5225
|
+
* @stability stable
|
|
5026
5226
|
* @category combinators
|
|
5027
5227
|
* @since 4.0.0
|
|
5028
5228
|
*/
|
|
@@ -5032,6 +5232,7 @@ export declare function toTaggedUnion<const Tag extends PropertyKey>(tag: Tag):
|
|
|
5032
5232
|
/**
|
|
5033
5233
|
* Type-level representation returned by {@link TaggedUnion}.
|
|
5034
5234
|
*
|
|
5235
|
+
* @stability stable
|
|
5035
5236
|
* @category models
|
|
5036
5237
|
* @since 4.0.0
|
|
5037
5238
|
*/
|
|
@@ -5057,6 +5258,7 @@ export interface TaggedUnion<Cases extends Record<string, Constraint>> extends B
|
|
|
5057
5258
|
readonly "Iso": {
|
|
5058
5259
|
[K in keyof Cases]: Cases[K]["Type"];
|
|
5059
5260
|
}[keyof Cases];
|
|
5261
|
+
readonly tag: "_tag";
|
|
5060
5262
|
readonly cases: Cases;
|
|
5061
5263
|
readonly isAnyOf: <const Keys>(keys: ReadonlyArray<Keys>) => (value: Cases[keyof Cases]["Type"]) => value is Extract<Cases[keyof Cases]["Type"], {
|
|
5062
5264
|
_tag: Keys;
|
|
@@ -5084,7 +5286,7 @@ export interface TaggedUnion<Cases extends Record<string, Constraint>> extends B
|
|
|
5084
5286
|
/**
|
|
5085
5287
|
* Builds a discriminated union from a record of field sets, one per variant.
|
|
5086
5288
|
* Each key becomes the `_tag` literal and the value is passed to {@link TaggedStruct}.
|
|
5087
|
-
* The result includes `cases`, `guards`, `isAnyOf`, `match`, and `matchOrElse` utilities.
|
|
5289
|
+
* The result includes `tag`, `cases`, `guards`, `isAnyOf`, `match`, and `matchOrElse` utilities.
|
|
5088
5290
|
*
|
|
5089
5291
|
* **Example** (Pattern matching a discriminated union)
|
|
5090
5292
|
*
|
|
@@ -5105,6 +5307,7 @@ export interface TaggedUnion<Cases extends Record<string, Constraint>> extends B
|
|
|
5105
5307
|
* ```
|
|
5106
5308
|
*
|
|
5107
5309
|
* @see {@link toTaggedUnion} to augment an existing union instead
|
|
5310
|
+
* @stability stable
|
|
5108
5311
|
* @category constructors
|
|
5109
5312
|
* @since 4.0.0
|
|
5110
5313
|
*/
|
|
@@ -5114,6 +5317,7 @@ export declare function TaggedUnion<const CasesByTag extends Record<string, Stru
|
|
|
5114
5317
|
/**
|
|
5115
5318
|
* Type-level representation returned by {@link Opaque}.
|
|
5116
5319
|
*
|
|
5320
|
+
* @stability stable
|
|
5117
5321
|
* @category models
|
|
5118
5322
|
* @since 4.0.0
|
|
5119
5323
|
*/
|
|
@@ -5148,6 +5352,7 @@ export interface Opaque<Self, S extends Top, Brand> extends BottomLazyWithoutNew
|
|
|
5148
5352
|
* person.name // => "Alice"
|
|
5149
5353
|
* ```
|
|
5150
5354
|
*
|
|
5355
|
+
* @stability stable
|
|
5151
5356
|
* @category constructors
|
|
5152
5357
|
* @since 4.0.0
|
|
5153
5358
|
*/
|
|
@@ -5155,6 +5360,7 @@ export declare function Opaque<Self, Brand = {}>(): <S extends Top>(schema: S) =
|
|
|
5155
5360
|
/**
|
|
5156
5361
|
* Type-level representation returned by {@link instanceOf}.
|
|
5157
5362
|
*
|
|
5363
|
+
* @stability stable
|
|
5158
5364
|
* @category models
|
|
5159
5365
|
* @since 3.10.0
|
|
5160
5366
|
*/
|
|
@@ -5176,6 +5382,7 @@ export interface instanceOf<T, Iso = T> extends declare<T, Iso> {
|
|
|
5176
5382
|
* decoded.toISOString() // => "2024-01-01T00:00:00.000Z"
|
|
5177
5383
|
* ```
|
|
5178
5384
|
*
|
|
5385
|
+
* @stability stable
|
|
5179
5386
|
* @category constructors
|
|
5180
5387
|
* @since 3.10.0
|
|
5181
5388
|
*/
|
|
@@ -5184,6 +5391,7 @@ export declare function instanceOf<C extends abstract new (...args: any) => any,
|
|
|
5184
5391
|
* Constructs an `SchemaAST.Link` that describes how a value of type `T` encodes to and decodes from a `To` schema.
|
|
5185
5392
|
* Used when building low-level AST transformations that bridge two schema types.
|
|
5186
5393
|
*
|
|
5394
|
+
* @stability stable
|
|
5187
5395
|
* @category transforming
|
|
5188
5396
|
* @since 4.0.0
|
|
5189
5397
|
*/
|
|
@@ -5246,6 +5454,7 @@ export declare function link<T>(): <To extends Constraint>(encodeTo: To, transfo
|
|
|
5246
5454
|
* }
|
|
5247
5455
|
* ```
|
|
5248
5456
|
*
|
|
5457
|
+
* @stability stable
|
|
5249
5458
|
* @category constructors
|
|
5250
5459
|
* @since 4.0.0
|
|
5251
5460
|
*/
|
|
@@ -5266,6 +5475,7 @@ export declare const makeFilter: <T>(filter: (input: T, ast: SchemaAST.AST, opti
|
|
|
5266
5475
|
* `reportInput`) or a full {@link SchemaIssue.Issue} (returned unchanged);
|
|
5267
5476
|
* the result is wrapped in an {@link SchemaIssue.Pointer} at the given `path`.
|
|
5268
5477
|
*
|
|
5478
|
+
* @stability stable
|
|
5269
5479
|
* @category models
|
|
5270
5480
|
* @since 3.10.0
|
|
5271
5481
|
*/
|
|
@@ -5293,6 +5503,7 @@ export type FilterIssue = string | SchemaIssue.Issue | {
|
|
|
5293
5503
|
* to returning that element directly; otherwise the entries are grouped
|
|
5294
5504
|
* into an {@link SchemaIssue.Composite}.
|
|
5295
5505
|
*
|
|
5506
|
+
* @stability stable
|
|
5296
5507
|
* @category models
|
|
5297
5508
|
* @since 3.10.0
|
|
5298
5509
|
*/
|
|
@@ -5301,6 +5512,7 @@ export type FilterOutput = undefined | boolean | FilterIssue | ReadonlyArray<Fil
|
|
|
5301
5512
|
* Groups multiple checks into a single {@link SchemaAST.FilterGroup}, applying
|
|
5302
5513
|
* optional shared annotations to the group as a whole.
|
|
5303
5514
|
*
|
|
5515
|
+
* @stability stable
|
|
5304
5516
|
* @category constructors
|
|
5305
5517
|
* @since 4.0.0
|
|
5306
5518
|
*/
|
|
@@ -5320,6 +5532,7 @@ export declare function makeFilterGroup<T>(checks: readonly [SchemaAST.Check<T>,
|
|
|
5320
5532
|
* During arbitrary generation, this applies a `patterns`
|
|
5321
5533
|
* constraint to ensure generated strings match the trimmed pattern.
|
|
5322
5534
|
*
|
|
5535
|
+
* @stability stable
|
|
5323
5536
|
* @category validation
|
|
5324
5537
|
* @since 4.0.0
|
|
5325
5538
|
*/
|
|
@@ -5340,6 +5553,7 @@ export declare function isTrimmed(annotations?: Annotations.Filter): SchemaAST.F
|
|
|
5340
5553
|
* During arbitrary generation, this applies a `patterns`
|
|
5341
5554
|
* constraint to ensure generated strings match the specified RegExp pattern.
|
|
5342
5555
|
*
|
|
5556
|
+
* @stability stable
|
|
5343
5557
|
* @category validation
|
|
5344
5558
|
* @since 4.0.0
|
|
5345
5559
|
*/
|
|
@@ -5359,6 +5573,7 @@ export declare function isPattern(regExp: globalThis.RegExp, annotations?: Annot
|
|
|
5359
5573
|
* During arbitrary generation, this applies a `patterns`
|
|
5360
5574
|
* constraint to ensure generated strings match the number string pattern.
|
|
5361
5575
|
*
|
|
5576
|
+
* @stability stable
|
|
5362
5577
|
* @category validation
|
|
5363
5578
|
* @since 4.0.0
|
|
5364
5579
|
*/
|
|
@@ -5377,6 +5592,7 @@ export declare function isStringFinite(annotations?: Annotations.Filter): Schema
|
|
|
5377
5592
|
* This check corresponds to a `pattern` constraint with the same signed
|
|
5378
5593
|
* base-10 integer pattern.
|
|
5379
5594
|
*
|
|
5595
|
+
* @stability stable
|
|
5380
5596
|
* @category validation
|
|
5381
5597
|
* @since 4.0.0
|
|
5382
5598
|
*/
|
|
@@ -5390,6 +5606,7 @@ export declare function isStringBigInt(annotations?: Annotations.Filter): Schema
|
|
|
5390
5606
|
* The check uses the pattern `^Symbol\((.*)\)$`. It is not a general test for
|
|
5391
5607
|
* whether a string can be passed to JavaScript's `Symbol()` function.
|
|
5392
5608
|
*
|
|
5609
|
+
* @stability stable
|
|
5393
5610
|
* @category validation
|
|
5394
5611
|
* @since 4.0.0
|
|
5395
5612
|
*/
|
|
@@ -5421,6 +5638,7 @@ export declare function isStringSymbol(annotations?: Annotations.Filter): Schema
|
|
|
5421
5638
|
* constraint to ensure generated strings match the UUID pattern.
|
|
5422
5639
|
*
|
|
5423
5640
|
* @see {@link isGUID} for shape-only GUID validation.
|
|
5641
|
+
* @stability stable
|
|
5424
5642
|
* @category validation
|
|
5425
5643
|
* @since 4.0.0
|
|
5426
5644
|
*/
|
|
@@ -5446,6 +5664,7 @@ export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotati
|
|
|
5446
5664
|
* constraint to ensure generated strings match the GUID pattern.
|
|
5447
5665
|
*
|
|
5448
5666
|
* @see {@link isUUID} for strict UUID validation.
|
|
5667
|
+
* @stability stable
|
|
5449
5668
|
* @category validation
|
|
5450
5669
|
* @since 4.0.0
|
|
5451
5670
|
*/
|
|
@@ -5466,6 +5685,7 @@ export declare function isGUID(annotations?: Annotations.Filter): SchemaAST.Filt
|
|
|
5466
5685
|
* During arbitrary generation, this applies a `patterns`
|
|
5467
5686
|
* constraint to ensure generated strings match the ULID pattern.
|
|
5468
5687
|
*
|
|
5688
|
+
* @stability stable
|
|
5469
5689
|
* @category validation
|
|
5470
5690
|
* @since 4.0.0
|
|
5471
5691
|
*/
|
|
@@ -5485,6 +5705,7 @@ export declare function isULID(annotations?: Annotations.Filter): SchemaAST.Filt
|
|
|
5485
5705
|
* During arbitrary generation, this applies a `patterns`
|
|
5486
5706
|
* constraint to ensure generated strings match the Base64 pattern.
|
|
5487
5707
|
*
|
|
5708
|
+
* @stability stable
|
|
5488
5709
|
* @category validation
|
|
5489
5710
|
* @since 4.0.0
|
|
5490
5711
|
*/
|
|
@@ -5505,6 +5726,7 @@ export declare function isBase64(annotations?: Annotations.Filter): SchemaAST.Fi
|
|
|
5505
5726
|
* During arbitrary generation, this applies a `patterns`
|
|
5506
5727
|
* constraint to ensure generated strings match the Base64URL pattern.
|
|
5507
5728
|
*
|
|
5729
|
+
* @stability stable
|
|
5508
5730
|
* @category validation
|
|
5509
5731
|
* @since 4.0.0
|
|
5510
5732
|
*/
|
|
@@ -5518,6 +5740,7 @@ export declare function isBase64Url(annotations?: Annotations.Filter): SchemaAST
|
|
|
5518
5740
|
* metadata. If the prefix ends with a high surrogate, the JSON Schema pattern
|
|
5519
5741
|
* omits that code unit so Unicode matching cannot reject a valid string.
|
|
5520
5742
|
*
|
|
5743
|
+
* @stability stable
|
|
5521
5744
|
* @category validation
|
|
5522
5745
|
* @since 4.0.0
|
|
5523
5746
|
*/
|
|
@@ -5531,6 +5754,7 @@ export declare function isStartingWith(startsWith: string, annotations?: Annotat
|
|
|
5531
5754
|
* metadata. If the suffix begins with a low surrogate, the JSON Schema pattern
|
|
5532
5755
|
* omits that code unit so Unicode matching cannot reject a valid string.
|
|
5533
5756
|
*
|
|
5757
|
+
* @stability stable
|
|
5534
5758
|
* @category validation
|
|
5535
5759
|
* @since 4.0.0
|
|
5536
5760
|
*/
|
|
@@ -5545,6 +5769,7 @@ export declare function isEndingWith(endsWith: string, annotations?: Annotations
|
|
|
5545
5769
|
* omitted from the JSON Schema pattern so Unicode matching cannot reject a
|
|
5546
5770
|
* valid string.
|
|
5547
5771
|
*
|
|
5772
|
+
* @stability stable
|
|
5548
5773
|
* @category validation
|
|
5549
5774
|
* @since 4.0.0
|
|
5550
5775
|
*/
|
|
@@ -5558,6 +5783,7 @@ export declare function isIncluding(includes: string, annotations?: Annotations.
|
|
|
5558
5783
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
5559
5784
|
* change when uppercased.
|
|
5560
5785
|
*
|
|
5786
|
+
* @stability stable
|
|
5561
5787
|
* @category validation
|
|
5562
5788
|
* @since 4.0.0
|
|
5563
5789
|
*/
|
|
@@ -5571,6 +5797,7 @@ export declare function isUppercased(annotations?: Annotations.Filter): SchemaAS
|
|
|
5571
5797
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
5572
5798
|
* change when lowercased.
|
|
5573
5799
|
*
|
|
5800
|
+
* @stability stable
|
|
5574
5801
|
* @category validation
|
|
5575
5802
|
* @since 4.0.0
|
|
5576
5803
|
*/
|
|
@@ -5584,6 +5811,7 @@ export declare function isLowercased(annotations?: Annotations.Filter): SchemaAS
|
|
|
5584
5811
|
* Empty strings pass. Strings whose first character has no lowercase form, such
|
|
5585
5812
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
5586
5813
|
*
|
|
5814
|
+
* @stability stable
|
|
5587
5815
|
* @category validation
|
|
5588
5816
|
* @since 4.0.0
|
|
5589
5817
|
*/
|
|
@@ -5597,6 +5825,7 @@ export declare function isCapitalized(annotations?: Annotations.Filter): SchemaA
|
|
|
5597
5825
|
* Empty strings pass. Strings whose first character has no uppercase form, such
|
|
5598
5826
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
5599
5827
|
*
|
|
5828
|
+
* @stability stable
|
|
5600
5829
|
* @category validation
|
|
5601
5830
|
* @since 4.0.0
|
|
5602
5831
|
*/
|
|
@@ -5604,6 +5833,7 @@ export declare function isUncapitalized(annotations?: Annotations.Filter): Schem
|
|
|
5604
5833
|
/**
|
|
5605
5834
|
* Type-level representation of {@link Finite}.
|
|
5606
5835
|
*
|
|
5836
|
+
* @stability stable
|
|
5607
5837
|
* @category models
|
|
5608
5838
|
* @since 3.10.0
|
|
5609
5839
|
*/
|
|
@@ -5613,6 +5843,7 @@ export interface Finite extends Number {
|
|
|
5613
5843
|
/**
|
|
5614
5844
|
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
5615
5845
|
*
|
|
5846
|
+
* @stability stable
|
|
5616
5847
|
* @category schemas
|
|
5617
5848
|
* @since 3.10.0
|
|
5618
5849
|
*/
|
|
@@ -5631,6 +5862,7 @@ export declare const Finite: Finite;
|
|
|
5631
5862
|
*
|
|
5632
5863
|
* During arbitrary generation, this applies a finite-number constraint.
|
|
5633
5864
|
*
|
|
5865
|
+
* @stability stable
|
|
5634
5866
|
* @category validation
|
|
5635
5867
|
* @since 4.0.0
|
|
5636
5868
|
*/
|
|
@@ -5639,6 +5871,7 @@ export declare const isFinite: (annotations?: Annotations.Filter) => SchemaAST.F
|
|
|
5639
5871
|
* Creates a greater-than (`>`) check for any ordered type from an
|
|
5640
5872
|
* `Order.Order` instance.
|
|
5641
5873
|
*
|
|
5874
|
+
* @stability stable
|
|
5642
5875
|
* @category validation
|
|
5643
5876
|
* @since 4.0.0
|
|
5644
5877
|
*/
|
|
@@ -5651,6 +5884,7 @@ export declare function makeIsGreaterThan<T>(options: {
|
|
|
5651
5884
|
* Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
|
|
5652
5885
|
* `Order.Order` instance.
|
|
5653
5886
|
*
|
|
5887
|
+
* @stability stable
|
|
5654
5888
|
* @category validation
|
|
5655
5889
|
* @since 4.0.0
|
|
5656
5890
|
*/
|
|
@@ -5663,6 +5897,7 @@ export declare function makeIsGreaterThanOrEqualTo<T>(options: {
|
|
|
5663
5897
|
* Creates a less-than (`<`) check for any ordered type from an `Order.Order`
|
|
5664
5898
|
* instance.
|
|
5665
5899
|
*
|
|
5900
|
+
* @stability stable
|
|
5666
5901
|
* @category validation
|
|
5667
5902
|
* @since 4.0.0
|
|
5668
5903
|
*/
|
|
@@ -5675,6 +5910,7 @@ export declare function makeIsLessThan<T>(options: {
|
|
|
5675
5910
|
* Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
|
|
5676
5911
|
* `Order.Order` instance.
|
|
5677
5912
|
*
|
|
5913
|
+
* @stability stable
|
|
5678
5914
|
* @category validation
|
|
5679
5915
|
* @since 4.0.0
|
|
5680
5916
|
*/
|
|
@@ -5687,6 +5923,7 @@ export declare function makeIsLessThanOrEqualTo<T>(options: {
|
|
|
5687
5923
|
* Creates an inclusive or exclusive range check for any ordered type from an
|
|
5688
5924
|
* `Order.Order` instance.
|
|
5689
5925
|
*
|
|
5926
|
+
* @stability stable
|
|
5690
5927
|
* @category validation
|
|
5691
5928
|
* @since 4.0.0
|
|
5692
5929
|
*/
|
|
@@ -5709,6 +5946,7 @@ export declare function makeIsBetween<T>(deriveOptions: {
|
|
|
5709
5946
|
* Creates a divisibility check for any numeric type from a remainder function
|
|
5710
5947
|
* and a zero value.
|
|
5711
5948
|
*
|
|
5949
|
+
* @stability stable
|
|
5712
5950
|
* @category validation
|
|
5713
5951
|
* @since 4.0.0
|
|
5714
5952
|
*/
|
|
@@ -5733,6 +5971,7 @@ export declare function makeIsMultipleOf<T>(options: {
|
|
|
5733
5971
|
* `exclusiveMinimum` constraint to ensure generated numbers are greater than
|
|
5734
5972
|
* the specified value.
|
|
5735
5973
|
*
|
|
5974
|
+
* @stability stable
|
|
5736
5975
|
* @category validation
|
|
5737
5976
|
* @since 4.0.0
|
|
5738
5977
|
*/
|
|
@@ -5752,6 +5991,7 @@ export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Ann
|
|
|
5752
5991
|
* During arbitrary generation, this applies a `minimum` constraint
|
|
5753
5992
|
* to ensure generated numbers are greater than or equal to the specified value.
|
|
5754
5993
|
*
|
|
5994
|
+
* @stability stable
|
|
5755
5995
|
* @category validation
|
|
5756
5996
|
* @since 4.0.0
|
|
5757
5997
|
*/
|
|
@@ -5771,6 +6011,7 @@ export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Ann
|
|
|
5771
6011
|
* `exclusiveMaximum` constraint to ensure generated numbers are less than the
|
|
5772
6012
|
* specified value.
|
|
5773
6013
|
*
|
|
6014
|
+
* @stability stable
|
|
5774
6015
|
* @category validation
|
|
5775
6016
|
* @since 4.0.0
|
|
5776
6017
|
*/
|
|
@@ -5790,6 +6031,7 @@ export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annota
|
|
|
5790
6031
|
* During arbitrary generation, this applies a `maximum` constraint
|
|
5791
6032
|
* to ensure generated numbers are less than or equal to the specified value.
|
|
5792
6033
|
*
|
|
6034
|
+
* @stability stable
|
|
5793
6035
|
* @category validation
|
|
5794
6036
|
* @since 4.0.0
|
|
5795
6037
|
*/
|
|
@@ -5812,6 +6054,7 @@ export declare const isLessThanOrEqualTo: (maximum: number, annotations?: Annota
|
|
|
5812
6054
|
* `exclusiveMaximum` flags to ensure generated numbers fall within the
|
|
5813
6055
|
* specified range.
|
|
5814
6056
|
*
|
|
6057
|
+
* @stability stable
|
|
5815
6058
|
* @category validation
|
|
5816
6059
|
* @since 4.0.0
|
|
5817
6060
|
*/
|
|
@@ -5836,6 +6079,7 @@ export declare const isBetween: (options: {
|
|
|
5836
6079
|
*
|
|
5837
6080
|
* Throws a `RangeError` when `divisor` is zero or is not finite.
|
|
5838
6081
|
*
|
|
6082
|
+
* @stability stable
|
|
5839
6083
|
* @category validation
|
|
5840
6084
|
* @since 4.0.0
|
|
5841
6085
|
*/
|
|
@@ -5854,6 +6098,7 @@ export declare function isMultipleOf(divisor: number, annotations?: Annotations.
|
|
|
5854
6098
|
*
|
|
5855
6099
|
* During arbitrary generation, this applies an integer constraint.
|
|
5856
6100
|
*
|
|
6101
|
+
* @stability stable
|
|
5857
6102
|
* @category validation
|
|
5858
6103
|
* @since 4.0.0
|
|
5859
6104
|
*/
|
|
@@ -5861,6 +6106,7 @@ export declare function isInt(annotations?: Annotations.Filter): SchemaAST.Filte
|
|
|
5861
6106
|
/**
|
|
5862
6107
|
* Type-level representation of {@link Int}.
|
|
5863
6108
|
*
|
|
6109
|
+
* @stability stable
|
|
5864
6110
|
* @category models
|
|
5865
6111
|
* @since 3.10.0
|
|
5866
6112
|
*/
|
|
@@ -5870,6 +6116,7 @@ export interface Int extends Number {
|
|
|
5870
6116
|
/**
|
|
5871
6117
|
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
5872
6118
|
*
|
|
6119
|
+
* @stability stable
|
|
5873
6120
|
* @category schemas
|
|
5874
6121
|
* @since 3.10.0
|
|
5875
6122
|
*/
|
|
@@ -5877,6 +6124,7 @@ export declare const Int: Int;
|
|
|
5877
6124
|
/**
|
|
5878
6125
|
* Type-level representation of {@link Natural}.
|
|
5879
6126
|
*
|
|
6127
|
+
* @stability stable
|
|
5880
6128
|
* @category models
|
|
5881
6129
|
* @since 4.0.0
|
|
5882
6130
|
*/
|
|
@@ -5892,6 +6140,7 @@ export interface Natural extends Int {
|
|
|
5892
6140
|
*
|
|
5893
6141
|
* @see {@link Int} for safe integers that may be negative
|
|
5894
6142
|
*
|
|
6143
|
+
* @stability stable
|
|
5895
6144
|
* @category schemas
|
|
5896
6145
|
* @since 4.0.0
|
|
5897
6146
|
*/
|
|
@@ -5912,6 +6161,7 @@ export declare const Natural: Natural;
|
|
|
5912
6161
|
* During arbitrary generation, this applies integer and range
|
|
5913
6162
|
* constraints to ensure generated numbers are 32-bit signed integers.
|
|
5914
6163
|
*
|
|
6164
|
+
* @stability stable
|
|
5915
6165
|
* @category validation
|
|
5916
6166
|
* @since 4.0.0
|
|
5917
6167
|
*/
|
|
@@ -5932,6 +6182,7 @@ export declare function isInt32(annotations?: Annotations.Filter): SchemaAST.Fil
|
|
|
5932
6182
|
* During arbitrary generation, this applies integer and range
|
|
5933
6183
|
* constraints to ensure generated numbers are 32-bit unsigned integers.
|
|
5934
6184
|
*
|
|
6185
|
+
* @stability stable
|
|
5935
6186
|
* @category validation
|
|
5936
6187
|
* @since 4.0.0
|
|
5937
6188
|
*/
|
|
@@ -5945,6 +6196,7 @@ export declare function isUint32(annotations?: Annotations.Filter): SchemaAST.Fi
|
|
|
5945
6196
|
*
|
|
5946
6197
|
* During arbitrary generation, this applies an exclusive lower bound.
|
|
5947
6198
|
*
|
|
6199
|
+
* @stability stable
|
|
5948
6200
|
* @category validation
|
|
5949
6201
|
* @since 4.0.0
|
|
5950
6202
|
*/
|
|
@@ -5964,6 +6216,7 @@ export declare const isGreaterThanDate: (exclusiveMinimum: globalThis.Date, anno
|
|
|
5964
6216
|
*
|
|
5965
6217
|
* During arbitrary generation, this applies an inclusive lower bound.
|
|
5966
6218
|
*
|
|
6219
|
+
* @stability stable
|
|
5967
6220
|
* @category validation
|
|
5968
6221
|
* @since 4.0.0
|
|
5969
6222
|
*/
|
|
@@ -5977,6 +6230,7 @@ export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, anno
|
|
|
5977
6230
|
*
|
|
5978
6231
|
* During arbitrary generation, this applies an exclusive upper bound.
|
|
5979
6232
|
*
|
|
6233
|
+
* @stability stable
|
|
5980
6234
|
* @category validation
|
|
5981
6235
|
* @since 4.0.0
|
|
5982
6236
|
*/
|
|
@@ -5996,6 +6250,7 @@ export declare const isLessThanDate: (exclusiveMaximum: globalThis.Date, annotat
|
|
|
5996
6250
|
*
|
|
5997
6251
|
* During arbitrary generation, this applies an inclusive upper bound.
|
|
5998
6252
|
*
|
|
6253
|
+
* @stability stable
|
|
5999
6254
|
* @category validation
|
|
6000
6255
|
* @since 4.0.0
|
|
6001
6256
|
*/
|
|
@@ -6015,6 +6270,7 @@ export declare const isLessThanOrEqualToDate: (maximum: globalThis.Date, annotat
|
|
|
6015
6270
|
*
|
|
6016
6271
|
* During arbitrary generation, this applies the specified lower and upper bounds.
|
|
6017
6272
|
*
|
|
6273
|
+
* @stability stable
|
|
6018
6274
|
* @category validation
|
|
6019
6275
|
* @since 4.0.0
|
|
6020
6276
|
*/
|
|
@@ -6033,6 +6289,7 @@ export declare const isBetweenDate: (options: {
|
|
|
6033
6289
|
*
|
|
6034
6290
|
* During arbitrary generation, this applies an exclusive lower bound.
|
|
6035
6291
|
*
|
|
6292
|
+
* @stability stable
|
|
6036
6293
|
* @category validation
|
|
6037
6294
|
* @since 4.0.0
|
|
6038
6295
|
*/
|
|
@@ -6047,6 +6304,7 @@ export declare const isGreaterThanBigInt: (exclusiveMinimum: bigint, annotations
|
|
|
6047
6304
|
*
|
|
6048
6305
|
* During arbitrary generation, this applies an inclusive lower bound.
|
|
6049
6306
|
*
|
|
6307
|
+
* @stability stable
|
|
6050
6308
|
* @category validation
|
|
6051
6309
|
* @since 4.0.0
|
|
6052
6310
|
*/
|
|
@@ -6060,6 +6318,7 @@ export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations
|
|
|
6060
6318
|
*
|
|
6061
6319
|
* During arbitrary generation, this applies an exclusive upper bound.
|
|
6062
6320
|
*
|
|
6321
|
+
* @stability stable
|
|
6063
6322
|
* @category validation
|
|
6064
6323
|
* @since 4.0.0
|
|
6065
6324
|
*/
|
|
@@ -6074,6 +6333,7 @@ export declare const isLessThanBigInt: (exclusiveMaximum: bigint, annotations?:
|
|
|
6074
6333
|
*
|
|
6075
6334
|
* During arbitrary generation, this applies an inclusive upper bound.
|
|
6076
6335
|
*
|
|
6336
|
+
* @stability stable
|
|
6077
6337
|
* @category validation
|
|
6078
6338
|
* @since 4.0.0
|
|
6079
6339
|
*/
|
|
@@ -6088,6 +6348,7 @@ export declare const isLessThanOrEqualToBigInt: (maximum: bigint, annotations?:
|
|
|
6088
6348
|
*
|
|
6089
6349
|
* During arbitrary generation, this applies the specified lower and upper bounds.
|
|
6090
6350
|
*
|
|
6351
|
+
* @stability stable
|
|
6091
6352
|
* @category validation
|
|
6092
6353
|
* @since 4.0.0
|
|
6093
6354
|
*/
|
|
@@ -6128,6 +6389,7 @@ export declare const isBetweenBigInt: (options: {
|
|
|
6128
6389
|
* Schema.is(NonEmptyArraySchema)([1]) // => true
|
|
6129
6390
|
* ```
|
|
6130
6391
|
*
|
|
6392
|
+
* @stability stable
|
|
6131
6393
|
* @category validation
|
|
6132
6394
|
* @since 4.0.0
|
|
6133
6395
|
*/
|
|
@@ -6150,6 +6412,7 @@ export declare function isMinLength(minLength: number, annotations?: Annotations
|
|
|
6150
6412
|
* During arbitrary generation, this applies a `minLength: 1`
|
|
6151
6413
|
* constraint to ensure generated strings or arrays are non-empty.
|
|
6152
6414
|
*
|
|
6415
|
+
* @stability stable
|
|
6153
6416
|
* @category validation
|
|
6154
6417
|
* @since 4.0.0
|
|
6155
6418
|
*/
|
|
@@ -6175,6 +6438,7 @@ export declare function isNonEmpty(annotations?: Annotations.Filter): SchemaAST.
|
|
|
6175
6438
|
* constraint to ensure generated strings or arrays have at most the required
|
|
6176
6439
|
* length.
|
|
6177
6440
|
*
|
|
6441
|
+
* @stability stable
|
|
6178
6442
|
* @category validation
|
|
6179
6443
|
* @since 4.0.0
|
|
6180
6444
|
*/
|
|
@@ -6201,6 +6465,7 @@ export declare function isMaxLength(maxLength: number, annotations?: Annotations
|
|
|
6201
6465
|
* `maxLength` constraints to ensure generated strings or arrays have a length
|
|
6202
6466
|
* within the specified range.
|
|
6203
6467
|
*
|
|
6468
|
+
* @stability stable
|
|
6204
6469
|
* @category validation
|
|
6205
6470
|
* @since 4.0.0
|
|
6206
6471
|
*/
|
|
@@ -6225,6 +6490,7 @@ export declare function isBetweenLength(minimum: number, maximum: number, annota
|
|
|
6225
6490
|
* @see {@link isMinLength} for counting UTF-16 code units
|
|
6226
6491
|
* @see {@link isMaxCodePoints}
|
|
6227
6492
|
* @see {@link isBetweenCodePoints}
|
|
6493
|
+
* @stability stable
|
|
6228
6494
|
* @category validation
|
|
6229
6495
|
* @since 4.0.0
|
|
6230
6496
|
*/
|
|
@@ -6247,6 +6513,7 @@ export declare function isMinCodePoints(minCodePoints: number, annotations?: Ann
|
|
|
6247
6513
|
* @see {@link isMaxLength} for counting UTF-16 code units
|
|
6248
6514
|
* @see {@link isMinCodePoints}
|
|
6249
6515
|
* @see {@link isBetweenCodePoints}
|
|
6516
|
+
* @stability stable
|
|
6250
6517
|
* @category validation
|
|
6251
6518
|
* @since 4.0.0
|
|
6252
6519
|
*/
|
|
@@ -6269,6 +6536,7 @@ export declare function isMaxCodePoints(maxCodePoints: number, annotations?: Ann
|
|
|
6269
6536
|
* @see {@link isBetweenLength} for counting UTF-16 code units
|
|
6270
6537
|
* @see {@link isMinCodePoints}
|
|
6271
6538
|
* @see {@link isMaxCodePoints}
|
|
6539
|
+
* @stability stable
|
|
6272
6540
|
* @category validation
|
|
6273
6541
|
* @since 4.0.0
|
|
6274
6542
|
*/
|
|
@@ -6290,6 +6558,7 @@ export declare function isBetweenCodePoints(minimum: number, maximum: number, an
|
|
|
6290
6558
|
*
|
|
6291
6559
|
* During arbitrary generation, this applies a node-local `minSize` constraint.
|
|
6292
6560
|
*
|
|
6561
|
+
* @stability stable
|
|
6293
6562
|
* @category validation
|
|
6294
6563
|
* @since 4.0.0
|
|
6295
6564
|
*/
|
|
@@ -6313,6 +6582,7 @@ export declare function isMinSize(minSize: number, annotations?: Annotations.Fil
|
|
|
6313
6582
|
*
|
|
6314
6583
|
* During arbitrary generation, this applies a node-local `maxSize` constraint.
|
|
6315
6584
|
*
|
|
6585
|
+
* @stability stable
|
|
6316
6586
|
* @category validation
|
|
6317
6587
|
* @since 4.0.0
|
|
6318
6588
|
*/
|
|
@@ -6336,6 +6606,7 @@ export declare function isMaxSize(maxSize: number, annotations?: Annotations.Fil
|
|
|
6336
6606
|
*
|
|
6337
6607
|
* During arbitrary generation, this applies node-local `minSize` and `maxSize` constraints.
|
|
6338
6608
|
*
|
|
6609
|
+
* @stability stable
|
|
6339
6610
|
* @category validation
|
|
6340
6611
|
* @since 4.0.0
|
|
6341
6612
|
*/
|
|
@@ -6362,6 +6633,7 @@ export declare function isBetweenSize(minimum: number, maximum: number, annotati
|
|
|
6362
6633
|
*
|
|
6363
6634
|
* During arbitrary generation, this applies a node-local `minProperties` constraint.
|
|
6364
6635
|
*
|
|
6636
|
+
* @stability stable
|
|
6365
6637
|
* @category validation
|
|
6366
6638
|
* @since 4.0.0
|
|
6367
6639
|
*/
|
|
@@ -6385,6 +6657,7 @@ export declare function isMinProperties(minProperties: number, annotations?: Ann
|
|
|
6385
6657
|
*
|
|
6386
6658
|
* During arbitrary generation, this applies a node-local `maxProperties` constraint.
|
|
6387
6659
|
*
|
|
6660
|
+
* @stability stable
|
|
6388
6661
|
* @category validation
|
|
6389
6662
|
* @since 4.0.0
|
|
6390
6663
|
*/
|
|
@@ -6408,6 +6681,7 @@ export declare function isMaxProperties(maxProperties: number, annotations?: Ann
|
|
|
6408
6681
|
*
|
|
6409
6682
|
* During arbitrary generation, this applies node-local `minProperties` and `maxProperties` constraints.
|
|
6410
6683
|
*
|
|
6684
|
+
* @stability stable
|
|
6411
6685
|
* @category validation
|
|
6412
6686
|
* @since 4.0.0
|
|
6413
6687
|
*/
|
|
@@ -6427,6 +6701,7 @@ export declare function isBetweenProperties(minimum: number, maximum: number, an
|
|
|
6427
6701
|
* names in the original input. Property transformations and excess-property
|
|
6428
6702
|
* handling can therefore produce different results.
|
|
6429
6703
|
*
|
|
6704
|
+
* @stability stable
|
|
6430
6705
|
* @category validation
|
|
6431
6706
|
* @since 4.0.0
|
|
6432
6707
|
*/
|
|
@@ -6443,6 +6718,7 @@ export declare function isPropertyNames(keySchema: Constraint, annotations?: Ann
|
|
|
6443
6718
|
* During arbitrary generation, this applies a node-local identity selector
|
|
6444
6719
|
* for constructive uniqueness using Effect equality.
|
|
6445
6720
|
*
|
|
6721
|
+
* @stability stable
|
|
6446
6722
|
* @category validation
|
|
6447
6723
|
* @since 4.0.0
|
|
6448
6724
|
*/
|
|
@@ -6459,6 +6735,7 @@ export declare function isUnique<T>(annotations?: Annotations.Filter): SchemaAST
|
|
|
6459
6735
|
* JSON Schema has no equivalent constraint, so this check is omitted from generated documents.
|
|
6460
6736
|
*
|
|
6461
6737
|
* @see {@link isUnique} for validating uniqueness of complete array elements
|
|
6738
|
+
* @stability stable
|
|
6462
6739
|
* @category validation
|
|
6463
6740
|
* @since 4.0.0
|
|
6464
6741
|
*/
|
|
@@ -6466,6 +6743,7 @@ export declare function isUniqueKey<Key, Value>(annotations?: Annotations.Filter
|
|
|
6466
6743
|
/**
|
|
6467
6744
|
* Type-level representation of {@link NonEmptyString}.
|
|
6468
6745
|
*
|
|
6746
|
+
* @stability stable
|
|
6469
6747
|
* @category models
|
|
6470
6748
|
* @since 3.10.0
|
|
6471
6749
|
*/
|
|
@@ -6476,6 +6754,7 @@ export interface NonEmptyString extends String {
|
|
|
6476
6754
|
* Schema for non-empty strings. Validates that a string has at least one
|
|
6477
6755
|
* character.
|
|
6478
6756
|
*
|
|
6757
|
+
* @stability stable
|
|
6479
6758
|
* @category schemas
|
|
6480
6759
|
* @since 3.10.0
|
|
6481
6760
|
*/
|
|
@@ -6483,6 +6762,7 @@ export declare const NonEmptyString: NonEmptyString;
|
|
|
6483
6762
|
/**
|
|
6484
6763
|
* Type-level representation of {@link Char}.
|
|
6485
6764
|
*
|
|
6765
|
+
* @stability stable
|
|
6486
6766
|
* @category models
|
|
6487
6767
|
* @since 3.10.0
|
|
6488
6768
|
*/
|
|
@@ -6505,6 +6785,7 @@ export interface Char extends String {
|
|
|
6505
6785
|
* @see {@link NonEmptyString} for strings with length greater than zero
|
|
6506
6786
|
* @see {@link isBetweenLength} for the underlying length check
|
|
6507
6787
|
*
|
|
6788
|
+
* @stability stable
|
|
6508
6789
|
* @category schemas
|
|
6509
6790
|
* @since 3.10.0
|
|
6510
6791
|
*/
|
|
@@ -6512,6 +6793,7 @@ export declare const Char: Char;
|
|
|
6512
6793
|
/**
|
|
6513
6794
|
* Type-level representation of {@link ErrorInstance}.
|
|
6514
6795
|
*
|
|
6796
|
+
* @stability stable
|
|
6515
6797
|
* @category models
|
|
6516
6798
|
* @since 4.0.0
|
|
6517
6799
|
*/
|
|
@@ -6521,6 +6803,7 @@ export interface ErrorInstance extends instanceOf<globalThis.Error> {
|
|
|
6521
6803
|
/**
|
|
6522
6804
|
* Options for {@link ErrorInstance} and {@link Defect}.
|
|
6523
6805
|
*
|
|
6806
|
+
* @stability stable
|
|
6524
6807
|
* @category options
|
|
6525
6808
|
* @since 4.0.0
|
|
6526
6809
|
*/
|
|
@@ -6551,6 +6834,7 @@ export interface ErrorOptions {
|
|
|
6551
6834
|
* traces are omitted by default for security. Pass `{ includeStack: true }` to
|
|
6552
6835
|
* include stack traces, or `{ excludeCause: true }` to omit causes.
|
|
6553
6836
|
*
|
|
6837
|
+
* @stability stable
|
|
6554
6838
|
* @category schemas
|
|
6555
6839
|
* @since 4.0.0
|
|
6556
6840
|
*/
|
|
@@ -6558,6 +6842,7 @@ export declare function ErrorInstance(options?: ErrorOptions): ErrorInstance;
|
|
|
6558
6842
|
/**
|
|
6559
6843
|
* Type-level representation of {@link Defect}.
|
|
6560
6844
|
*
|
|
6845
|
+
* @stability stable
|
|
6561
6846
|
* @category models
|
|
6562
6847
|
* @since 3.10.0
|
|
6563
6848
|
*/
|
|
@@ -6602,6 +6887,7 @@ export interface Defect extends decodeTo<Unknown, typeof Json> {
|
|
|
6602
6887
|
* string representation.
|
|
6603
6888
|
*
|
|
6604
6889
|
* @see {@link ErrorInstance} for a schema that only accepts JavaScript `Error` values.
|
|
6890
|
+
* @stability stable
|
|
6605
6891
|
* @category schemas
|
|
6606
6892
|
* @since 4.0.0
|
|
6607
6893
|
*/
|
|
@@ -6609,6 +6895,7 @@ export declare function Defect(options?: ErrorOptions): Defect;
|
|
|
6609
6895
|
/**
|
|
6610
6896
|
* Type-level representation returned by {@link ReadonlyMap}.
|
|
6611
6897
|
*
|
|
6898
|
+
* @stability stable
|
|
6612
6899
|
* @category models
|
|
6613
6900
|
* @since 4.0.0
|
|
6614
6901
|
*/
|
|
@@ -6621,6 +6908,7 @@ export interface $ReadonlyMap<Key extends Constraint, Value extends Constraint>
|
|
|
6621
6908
|
* Iso representation used for `ReadonlyMap` schemas: an array of readonly
|
|
6622
6909
|
* `[key, value]` tuples using each entry schema's `Iso` type.
|
|
6623
6910
|
*
|
|
6911
|
+
* @stability stable
|
|
6624
6912
|
* @category utility types
|
|
6625
6913
|
* @since 4.0.0
|
|
6626
6914
|
*/
|
|
@@ -6629,6 +6917,7 @@ export type ReadonlyMapIso<Key extends Constraint, Value extends Constraint> = R
|
|
|
6629
6917
|
* Schema for readonly maps whose keys and values conform to the provided
|
|
6630
6918
|
* schemas.
|
|
6631
6919
|
*
|
|
6920
|
+
* @stability stable
|
|
6632
6921
|
* @category schemas
|
|
6633
6922
|
* @since 3.10.0
|
|
6634
6923
|
*/
|
|
@@ -6636,6 +6925,7 @@ export declare function ReadonlyMap<Key extends Constraint, Value extends Constr
|
|
|
6636
6925
|
/**
|
|
6637
6926
|
* Type-level representation returned by {@link ReadonlySet}.
|
|
6638
6927
|
*
|
|
6928
|
+
* @stability stable
|
|
6639
6929
|
* @category models
|
|
6640
6930
|
* @since 4.0.0
|
|
6641
6931
|
*/
|
|
@@ -6647,6 +6937,7 @@ export interface $ReadonlySet<Value extends Constraint> extends declareConstruct
|
|
|
6647
6937
|
* Iso representation used for `ReadonlySet` schemas: an array of element values
|
|
6648
6938
|
* using the element schema's `Iso` type.
|
|
6649
6939
|
*
|
|
6940
|
+
* @stability stable
|
|
6650
6941
|
* @category utility types
|
|
6651
6942
|
* @since 4.0.0
|
|
6652
6943
|
*/
|
|
@@ -6654,6 +6945,7 @@ export type ReadonlySetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"
|
|
|
6654
6945
|
/**
|
|
6655
6946
|
* Schema for readonly sets whose values conform to the provided element schema.
|
|
6656
6947
|
*
|
|
6948
|
+
* @stability stable
|
|
6657
6949
|
* @category schemas
|
|
6658
6950
|
* @since 3.10.0
|
|
6659
6951
|
*/
|
|
@@ -6661,6 +6953,7 @@ export declare function ReadonlySet<Value extends Constraint>(value: Value): $Re
|
|
|
6661
6953
|
/**
|
|
6662
6954
|
* Type-level representation of {@link RegExp}.
|
|
6663
6955
|
*
|
|
6956
|
+
* @stability stable
|
|
6664
6957
|
* @category models
|
|
6665
6958
|
* @since 4.0.0
|
|
6666
6959
|
*/
|
|
@@ -6674,6 +6967,7 @@ export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
|
6674
6967
|
*
|
|
6675
6968
|
* The default JSON serializer encodes a `RegExp` as `{ source, flags }`.
|
|
6676
6969
|
*
|
|
6970
|
+
* @stability stable
|
|
6677
6971
|
* @category schemas
|
|
6678
6972
|
* @since 4.0.0
|
|
6679
6973
|
*/
|
|
@@ -6681,6 +6975,7 @@ export declare const RegExp: RegExp;
|
|
|
6681
6975
|
/**
|
|
6682
6976
|
* Type-level representation of {@link URL}.
|
|
6683
6977
|
*
|
|
6978
|
+
* @stability stable
|
|
6684
6979
|
* @category models
|
|
6685
6980
|
* @since 4.0.0
|
|
6686
6981
|
*/
|
|
@@ -6696,6 +6991,7 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
6696
6991
|
*
|
|
6697
6992
|
* - encodes `URL` as a `string`
|
|
6698
6993
|
*
|
|
6994
|
+
* @stability stable
|
|
6699
6995
|
* @category schemas
|
|
6700
6996
|
* @since 4.0.0
|
|
6701
6997
|
*/
|
|
@@ -6703,6 +6999,7 @@ export declare const URL: URL;
|
|
|
6703
6999
|
/**
|
|
6704
7000
|
* Type-level representation of {@link URLFromString}.
|
|
6705
7001
|
*
|
|
7002
|
+
* @stability stable
|
|
6706
7003
|
* @category models
|
|
6707
7004
|
* @since 4.0.0
|
|
6708
7005
|
*/
|
|
@@ -6720,6 +7017,7 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
6720
7017
|
* Encoding:
|
|
6721
7018
|
* - A `URL` is encoded as a `string`
|
|
6722
7019
|
*
|
|
7020
|
+
* @stability stable
|
|
6723
7021
|
* @category schemas
|
|
6724
7022
|
* @since 4.0.0
|
|
6725
7023
|
*/
|
|
@@ -6727,6 +7025,7 @@ export declare const URLFromString: URLFromString;
|
|
|
6727
7025
|
/**
|
|
6728
7026
|
* Type-level representation of {@link Date}.
|
|
6729
7027
|
*
|
|
7028
|
+
* @stability stable
|
|
6730
7029
|
* @category models
|
|
6731
7030
|
* @since 4.0.0
|
|
6732
7031
|
*/
|
|
@@ -6758,6 +7057,7 @@ export interface Date extends declare<globalThis.Date> {
|
|
|
6758
7057
|
* @see {@link DateFromString} for decoding strings into Date instances
|
|
6759
7058
|
* @see {@link DateFromMillis} for decoding epoch milliseconds into Date instances
|
|
6760
7059
|
*
|
|
7060
|
+
* @stability stable
|
|
6761
7061
|
* @category schemas
|
|
6762
7062
|
* @since 4.0.0
|
|
6763
7063
|
*/
|
|
@@ -6765,6 +7065,7 @@ export declare const Date: Date;
|
|
|
6765
7065
|
/**
|
|
6766
7066
|
* Type-level representation of {@link DateFromString}.
|
|
6767
7067
|
*
|
|
7068
|
+
* @stability stable
|
|
6768
7069
|
* @category models
|
|
6769
7070
|
* @since 3.10.0
|
|
6770
7071
|
*/
|
|
@@ -6793,6 +7094,7 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
6793
7094
|
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
6794
7095
|
* @see {@link Date} for accepting Date instances directly
|
|
6795
7096
|
*
|
|
7097
|
+
* @stability stable
|
|
6796
7098
|
* @category schemas
|
|
6797
7099
|
* @since 3.10.0
|
|
6798
7100
|
*/
|
|
@@ -6800,6 +7102,7 @@ export declare const DateFromString: DateFromString;
|
|
|
6800
7102
|
/**
|
|
6801
7103
|
* Type-level representation of {@link DateFromMillis}.
|
|
6802
7104
|
*
|
|
7105
|
+
* @stability stable
|
|
6803
7106
|
* @category models
|
|
6804
7107
|
* @since 4.0.0
|
|
6805
7108
|
*/
|
|
@@ -6831,6 +7134,7 @@ export interface DateFromMillis extends decodeTo<Date, Int> {
|
|
|
6831
7134
|
* @see {@link DateFromString} for decoding string-encoded dates
|
|
6832
7135
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
6833
7136
|
*
|
|
7137
|
+
* @stability stable
|
|
6834
7138
|
* @category schemas
|
|
6835
7139
|
* @since 4.0.0
|
|
6836
7140
|
*/
|
|
@@ -6838,6 +7142,7 @@ export declare const DateFromMillis: DateFromMillis;
|
|
|
6838
7142
|
/**
|
|
6839
7143
|
* Type-level representation returned by {@link fromJsonString}.
|
|
6840
7144
|
*
|
|
7145
|
+
* @stability stable
|
|
6841
7146
|
* @category models
|
|
6842
7147
|
* @since 4.0.0
|
|
6843
7148
|
*/
|
|
@@ -6870,6 +7175,7 @@ export interface fromJsonString<S extends Constraint> extends decodeTo<S, String
|
|
|
6870
7175
|
* Schema.encodeSync(schemaFromJsonString)({ a: 1 }) // => "{\n \"a\": 1\n}"
|
|
6871
7176
|
* ```
|
|
6872
7177
|
*
|
|
7178
|
+
* @stability stable
|
|
6873
7179
|
* @category schemas
|
|
6874
7180
|
* @since 4.0.0
|
|
6875
7181
|
*/
|
|
@@ -6881,6 +7187,7 @@ export declare function fromJsonString<S extends Constraint>(schema: S, options?
|
|
|
6881
7187
|
/**
|
|
6882
7188
|
* Type-level representation of {@link File}.
|
|
6883
7189
|
*
|
|
7190
|
+
* @stability stable
|
|
6884
7191
|
* @category models
|
|
6885
7192
|
* @since 4.0.0
|
|
6886
7193
|
*/
|
|
@@ -6895,6 +7202,7 @@ export interface File extends instanceOf<globalThis.File> {
|
|
|
6895
7202
|
* The default JSON serializer encodes a `File` as `{ data, type, name, lastModified }`
|
|
6896
7203
|
* where `data` is base64-encoded.
|
|
6897
7204
|
*
|
|
7205
|
+
* @stability stable
|
|
6898
7206
|
* @category schemas
|
|
6899
7207
|
* @since 4.0.0
|
|
6900
7208
|
*/
|
|
@@ -6902,6 +7210,7 @@ export declare const File: File;
|
|
|
6902
7210
|
/**
|
|
6903
7211
|
* Type-level representation of {@link FormData}.
|
|
6904
7212
|
*
|
|
7213
|
+
* @stability stable
|
|
6905
7214
|
* @category models
|
|
6906
7215
|
* @since 4.0.0
|
|
6907
7216
|
*/
|
|
@@ -6916,6 +7225,7 @@ export interface FormData extends instanceOf<globalThis.FormData> {
|
|
|
6916
7225
|
* The default JSON serializer encodes a `FormData` as an array of `[key, entry]`
|
|
6917
7226
|
* pairs where each entry is tagged as `"String"` or `"File"`.
|
|
6918
7227
|
*
|
|
7228
|
+
* @stability stable
|
|
6919
7229
|
* @category schemas
|
|
6920
7230
|
* @since 4.0.0
|
|
6921
7231
|
*/
|
|
@@ -6923,6 +7233,7 @@ export declare const FormData: FormData;
|
|
|
6923
7233
|
/**
|
|
6924
7234
|
* Type-level representation returned by {@link fromFormData}.
|
|
6925
7235
|
*
|
|
7236
|
+
* @stability stable
|
|
6926
7237
|
* @category models
|
|
6927
7238
|
* @since 4.0.0
|
|
6928
7239
|
*/
|
|
@@ -7008,6 +7319,7 @@ export interface fromFormData<S extends Constraint> extends decodeTo<S, FormData
|
|
|
7008
7319
|
* Schema.decodeUnknownSync(schema)(formData) // => { a: 1 }
|
|
7009
7320
|
* ```
|
|
7010
7321
|
*
|
|
7322
|
+
* @stability stable
|
|
7011
7323
|
* @category decoding
|
|
7012
7324
|
* @since 4.0.0
|
|
7013
7325
|
*/
|
|
@@ -7015,6 +7327,7 @@ export declare function fromFormData<S extends Constraint>(schema: S): fromFormD
|
|
|
7015
7327
|
/**
|
|
7016
7328
|
* Type-level representation of {@link URLSearchParams}.
|
|
7017
7329
|
*
|
|
7330
|
+
* @stability stable
|
|
7018
7331
|
* @category models
|
|
7019
7332
|
* @since 4.0.0
|
|
7020
7333
|
*/
|
|
@@ -7028,6 +7341,7 @@ export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams>
|
|
|
7028
7341
|
*
|
|
7029
7342
|
* The default JSON serializer encodes a `URLSearchParams` as a query string.
|
|
7030
7343
|
*
|
|
7344
|
+
* @stability stable
|
|
7031
7345
|
* @category schemas
|
|
7032
7346
|
* @since 4.0.0
|
|
7033
7347
|
*/
|
|
@@ -7035,6 +7349,7 @@ export declare const URLSearchParams: URLSearchParams;
|
|
|
7035
7349
|
/**
|
|
7036
7350
|
* Type-level representation returned by {@link fromURLSearchParams}.
|
|
7037
7351
|
*
|
|
7352
|
+
* @stability stable
|
|
7038
7353
|
* @category models
|
|
7039
7354
|
* @since 4.0.0
|
|
7040
7355
|
*/
|
|
@@ -7115,6 +7430,7 @@ export interface fromURLSearchParams<S extends Constraint> extends decodeTo<S, U
|
|
|
7115
7430
|
* Schema.decodeUnknownSync(schema)(urlSearchParams) // => { a: 1 }
|
|
7116
7431
|
* ```
|
|
7117
7432
|
*
|
|
7433
|
+
* @stability stable
|
|
7118
7434
|
* @category decoding
|
|
7119
7435
|
* @since 4.0.0
|
|
7120
7436
|
*/
|
|
@@ -7122,6 +7438,7 @@ export declare function fromURLSearchParams<S extends Constraint>(schema: S): fr
|
|
|
7122
7438
|
/**
|
|
7123
7439
|
* Type-level representation of {@link NumberFromString}.
|
|
7124
7440
|
*
|
|
7441
|
+
* @stability stable
|
|
7125
7442
|
* @category models
|
|
7126
7443
|
* @since 3.10.0
|
|
7127
7444
|
*/
|
|
@@ -7142,6 +7459,7 @@ export interface NumberFromString extends decodeTo<Number, String> {
|
|
|
7142
7459
|
* Encoding:
|
|
7143
7460
|
* A number is encoded as a `string`.
|
|
7144
7461
|
*
|
|
7462
|
+
* @stability stable
|
|
7145
7463
|
* @category schemas
|
|
7146
7464
|
* @since 3.10.0
|
|
7147
7465
|
*/
|
|
@@ -7149,6 +7467,7 @@ export declare const NumberFromString: NumberFromString;
|
|
|
7149
7467
|
/**
|
|
7150
7468
|
* Type-level representation of {@link FiniteFromString}.
|
|
7151
7469
|
*
|
|
7470
|
+
* @stability stable
|
|
7152
7471
|
* @category models
|
|
7153
7472
|
* @since 4.0.0
|
|
7154
7473
|
*/
|
|
@@ -7167,6 +7486,7 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
7167
7486
|
* Encoding:
|
|
7168
7487
|
* - A finite number is encoded as a `string`.
|
|
7169
7488
|
*
|
|
7489
|
+
* @stability stable
|
|
7170
7490
|
* @category schemas
|
|
7171
7491
|
* @since 4.0.0
|
|
7172
7492
|
*/
|
|
@@ -7174,6 +7494,7 @@ export declare const FiniteFromString: FiniteFromString;
|
|
|
7174
7494
|
/**
|
|
7175
7495
|
* Type-level representation of {@link BigIntFromString}.
|
|
7176
7496
|
*
|
|
7497
|
+
* @stability stable
|
|
7177
7498
|
* @category models
|
|
7178
7499
|
* @since 4.0.0
|
|
7179
7500
|
*/
|
|
@@ -7205,6 +7526,7 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
7205
7526
|
* @see {@link NumberFromString} for parsing JavaScript number strings, including non-finite values
|
|
7206
7527
|
* @see {@link BigDecimalFromString} for parsing decimal number strings
|
|
7207
7528
|
*
|
|
7529
|
+
* @stability stable
|
|
7208
7530
|
* @category schemas
|
|
7209
7531
|
* @since 4.0.0
|
|
7210
7532
|
*/
|
|
@@ -7212,6 +7534,7 @@ export declare const BigIntFromString: BigIntFromString;
|
|
|
7212
7534
|
/**
|
|
7213
7535
|
* Type-level representation of {@link Trimmed}.
|
|
7214
7536
|
*
|
|
7537
|
+
* @stability stable
|
|
7215
7538
|
* @category models
|
|
7216
7539
|
* @since 3.10.0
|
|
7217
7540
|
*/
|
|
@@ -7221,6 +7544,7 @@ export interface Trimmed extends String {
|
|
|
7221
7544
|
/**
|
|
7222
7545
|
* Schema for strings that contains no leading or trailing whitespaces.
|
|
7223
7546
|
*
|
|
7547
|
+
* @stability stable
|
|
7224
7548
|
* @category schemas
|
|
7225
7549
|
* @since 3.10.0
|
|
7226
7550
|
*/
|
|
@@ -7228,6 +7552,7 @@ export declare const Trimmed: Trimmed;
|
|
|
7228
7552
|
/**
|
|
7229
7553
|
* Type-level representation of {@link Trim}.
|
|
7230
7554
|
*
|
|
7555
|
+
* @stability stable
|
|
7231
7556
|
* @category models
|
|
7232
7557
|
* @since 3.10.0
|
|
7233
7558
|
*/
|
|
@@ -7245,6 +7570,7 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
7245
7570
|
* Encoding:
|
|
7246
7571
|
* - The trimmed string is encoded as is.
|
|
7247
7572
|
*
|
|
7573
|
+
* @stability stable
|
|
7248
7574
|
* @category schemas
|
|
7249
7575
|
* @since 3.10.0
|
|
7250
7576
|
*/
|
|
@@ -7252,6 +7578,7 @@ export declare const Trim: Trim;
|
|
|
7252
7578
|
/**
|
|
7253
7579
|
* Type-level representation of {@link StringFromBase64}.
|
|
7254
7580
|
*
|
|
7581
|
+
* @stability stable
|
|
7255
7582
|
* @category models
|
|
7256
7583
|
* @since 3.10.0
|
|
7257
7584
|
*/
|
|
@@ -7269,6 +7596,7 @@ export interface StringFromBase64 extends decodeTo<String, String> {
|
|
|
7269
7596
|
* Encoding:
|
|
7270
7597
|
* - A `string` is encoded as a base64-encoded string.
|
|
7271
7598
|
*
|
|
7599
|
+
* @stability stable
|
|
7272
7600
|
* @category schemas
|
|
7273
7601
|
* @since 3.10.0
|
|
7274
7602
|
*/
|
|
@@ -7276,6 +7604,7 @@ export declare const StringFromBase64: StringFromBase64;
|
|
|
7276
7604
|
/**
|
|
7277
7605
|
* Type-level representation of {@link StringFromBase64Url}.
|
|
7278
7606
|
*
|
|
7607
|
+
* @stability stable
|
|
7279
7608
|
* @category models
|
|
7280
7609
|
* @since 3.10.0
|
|
7281
7610
|
*/
|
|
@@ -7293,6 +7622,7 @@ export interface StringFromBase64Url extends decodeTo<String, String> {
|
|
|
7293
7622
|
* Encoding:
|
|
7294
7623
|
* - A `string` is encoded as a base64 (URL) encoded string.
|
|
7295
7624
|
*
|
|
7625
|
+
* @stability stable
|
|
7296
7626
|
* @category schemas
|
|
7297
7627
|
* @since 3.10.0
|
|
7298
7628
|
*/
|
|
@@ -7300,6 +7630,7 @@ export declare const StringFromBase64Url: StringFromBase64Url;
|
|
|
7300
7630
|
/**
|
|
7301
7631
|
* Type-level representation of {@link StringFromHex}.
|
|
7302
7632
|
*
|
|
7633
|
+
* @stability stable
|
|
7303
7634
|
* @category models
|
|
7304
7635
|
* @since 3.10.0
|
|
7305
7636
|
*/
|
|
@@ -7317,6 +7648,7 @@ export interface StringFromHex extends decodeTo<String, String> {
|
|
|
7317
7648
|
* Encoding:
|
|
7318
7649
|
* - A `string` is encoded as a hex string.
|
|
7319
7650
|
*
|
|
7651
|
+
* @stability stable
|
|
7320
7652
|
* @category schemas
|
|
7321
7653
|
* @since 3.10.0
|
|
7322
7654
|
*/
|
|
@@ -7324,6 +7656,7 @@ export declare const StringFromHex: StringFromHex;
|
|
|
7324
7656
|
/**
|
|
7325
7657
|
* Type-level representation of {@link StringFromUriComponent}.
|
|
7326
7658
|
*
|
|
7659
|
+
* @stability stable
|
|
7327
7660
|
* @category models
|
|
7328
7661
|
* @since 3.12.0
|
|
7329
7662
|
*/
|
|
@@ -7359,6 +7692,7 @@ export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
|
7359
7692
|
* Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 }) // => "%7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D"
|
|
7360
7693
|
* ```
|
|
7361
7694
|
*
|
|
7695
|
+
* @stability stable
|
|
7362
7696
|
* @category schemas
|
|
7363
7697
|
* @since 3.12.0
|
|
7364
7698
|
*/
|
|
@@ -7367,6 +7701,7 @@ export declare const StringFromUriComponent: StringFromUriComponent;
|
|
|
7367
7701
|
* Schema for property keys accepted by Effect schemas: finite `number`,
|
|
7368
7702
|
* `symbol`, or `string`.
|
|
7369
7703
|
*
|
|
7704
|
+
* @stability stable
|
|
7370
7705
|
* @category schemas
|
|
7371
7706
|
* @since 4.0.0
|
|
7372
7707
|
*/
|
|
@@ -7379,6 +7714,7 @@ export declare const PropertyKey: Union<readonly [Finite, Symbol, String]>;
|
|
|
7379
7714
|
* The result contains an `issues` array where each issue has a message and an
|
|
7380
7715
|
* optional path made of property keys or keyed path segments.
|
|
7381
7716
|
*
|
|
7717
|
+
* @stability stable
|
|
7382
7718
|
* @category schemas
|
|
7383
7719
|
* @since 4.0.0
|
|
7384
7720
|
*/
|
|
@@ -7396,6 +7732,7 @@ export declare const StandardSchemaV1FailureResult: Struct<{
|
|
|
7396
7732
|
/**
|
|
7397
7733
|
* Type-level representation of {@link BooleanFromBit}.
|
|
7398
7734
|
*
|
|
7735
|
+
* @stability stable
|
|
7399
7736
|
* @category models
|
|
7400
7737
|
* @since 4.0.0
|
|
7401
7738
|
*/
|
|
@@ -7418,6 +7755,7 @@ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0,
|
|
|
7418
7755
|
* @see {@link Boolean} for validating values that are already booleans
|
|
7419
7756
|
* @see {@link Literals} for keeping bit literals instead of decoding them
|
|
7420
7757
|
*
|
|
7758
|
+
* @stability stable
|
|
7421
7759
|
* @category schemas
|
|
7422
7760
|
* @since 4.0.0
|
|
7423
7761
|
*/
|
|
@@ -7425,6 +7763,7 @@ export declare const BooleanFromBit: BooleanFromBit;
|
|
|
7425
7763
|
/**
|
|
7426
7764
|
* Type-level representation of {@link Uint8Array}.
|
|
7427
7765
|
*
|
|
7766
|
+
* @stability stable
|
|
7428
7767
|
* @category models
|
|
7429
7768
|
* @since 4.0.0
|
|
7430
7769
|
*/
|
|
@@ -7440,6 +7779,7 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
7440
7779
|
*
|
|
7441
7780
|
* The default JSON serializer encodes Uint8Array as a Base64 encoded string.
|
|
7442
7781
|
*
|
|
7782
|
+
* @stability stable
|
|
7443
7783
|
* @category schemas
|
|
7444
7784
|
* @since 4.0.0
|
|
7445
7785
|
*/
|
|
@@ -7447,6 +7787,7 @@ export declare const Uint8Array: Uint8Array;
|
|
|
7447
7787
|
/**
|
|
7448
7788
|
* Type-level representation of {@link Uint8ArrayFromBase64}.
|
|
7449
7789
|
*
|
|
7790
|
+
* @stability stable
|
|
7450
7791
|
* @category models
|
|
7451
7792
|
* @since 3.10.0
|
|
7452
7793
|
*/
|
|
@@ -7465,6 +7806,7 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
7465
7806
|
* Encoding:
|
|
7466
7807
|
* - A `Uint8Array` is encoded as a base64-encoded string.
|
|
7467
7808
|
*
|
|
7809
|
+
* @stability stable
|
|
7468
7810
|
* @category schemas
|
|
7469
7811
|
* @since 3.10.0
|
|
7470
7812
|
*/
|
|
@@ -7472,6 +7814,7 @@ export declare const Uint8ArrayFromBase64: Uint8ArrayFromBase64;
|
|
|
7472
7814
|
/**
|
|
7473
7815
|
* Type-level representation of {@link Uint8ArrayFromBase64Url}.
|
|
7474
7816
|
*
|
|
7817
|
+
* @stability stable
|
|
7475
7818
|
* @category models
|
|
7476
7819
|
* @since 3.10.0
|
|
7477
7820
|
*/
|
|
@@ -7490,6 +7833,7 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
7490
7833
|
* Encoding:
|
|
7491
7834
|
* - A `Uint8Array` is encoded as a base64 (URL) encoded string.
|
|
7492
7835
|
*
|
|
7836
|
+
* @stability stable
|
|
7493
7837
|
* @category schemas
|
|
7494
7838
|
* @since 3.10.0
|
|
7495
7839
|
*/
|
|
@@ -7497,6 +7841,7 @@ export declare const Uint8ArrayFromBase64Url: Uint8ArrayFromBase64Url;
|
|
|
7497
7841
|
/**
|
|
7498
7842
|
* Type-level representation of {@link Uint8ArrayFromHex}.
|
|
7499
7843
|
*
|
|
7844
|
+
* @stability stable
|
|
7500
7845
|
* @category models
|
|
7501
7846
|
* @since 3.10.0
|
|
7502
7847
|
*/
|
|
@@ -7515,6 +7860,7 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
7515
7860
|
* Encoding:
|
|
7516
7861
|
* - A `Uint8Array` is encoded as a hex encoded string.
|
|
7517
7862
|
*
|
|
7863
|
+
* @stability stable
|
|
7518
7864
|
* @category schemas
|
|
7519
7865
|
* @since 3.10.0
|
|
7520
7866
|
*/
|
|
@@ -7522,6 +7868,7 @@ export declare const Uint8ArrayFromHex: Uint8ArrayFromHex;
|
|
|
7522
7868
|
/**
|
|
7523
7869
|
* Validates that a BigDecimal is greater than the specified value (exclusive).
|
|
7524
7870
|
*
|
|
7871
|
+
* @stability stable
|
|
7525
7872
|
* @category validation
|
|
7526
7873
|
* @since 4.0.0
|
|
7527
7874
|
*/
|
|
@@ -7530,6 +7877,7 @@ export declare const isGreaterThanBigDecimal: (exclusiveMinimum: BigDecimal_.Big
|
|
|
7530
7877
|
* Validates that a BigDecimal is greater than or equal to the specified value
|
|
7531
7878
|
* (inclusive).
|
|
7532
7879
|
*
|
|
7880
|
+
* @stability stable
|
|
7533
7881
|
* @category validation
|
|
7534
7882
|
* @since 4.0.0
|
|
7535
7883
|
*/
|
|
@@ -7537,6 +7885,7 @@ export declare const isGreaterThanOrEqualToBigDecimal: (minimum: BigDecimal_.Big
|
|
|
7537
7885
|
/**
|
|
7538
7886
|
* Validates that a BigDecimal is less than the specified value (exclusive).
|
|
7539
7887
|
*
|
|
7888
|
+
* @stability stable
|
|
7540
7889
|
* @category validation
|
|
7541
7890
|
* @since 4.0.0
|
|
7542
7891
|
*/
|
|
@@ -7545,6 +7894,7 @@ export declare const isLessThanBigDecimal: (exclusiveMaximum: BigDecimal_.BigDec
|
|
|
7545
7894
|
* Validates that a BigDecimal is less than or equal to the specified value
|
|
7546
7895
|
* (inclusive).
|
|
7547
7896
|
*
|
|
7897
|
+
* @stability stable
|
|
7548
7898
|
* @category validation
|
|
7549
7899
|
* @since 4.0.0
|
|
7550
7900
|
*/
|
|
@@ -7557,6 +7907,7 @@ export declare const isLessThanOrEqualToBigDecimal: (maximum: BigDecimal_.BigDec
|
|
|
7557
7907
|
* The minimum and maximum boundaries are inclusive by default. Pass
|
|
7558
7908
|
* `exclusiveMinimum` or `exclusiveMaximum` to exclude either boundary.
|
|
7559
7909
|
*
|
|
7910
|
+
* @stability stable
|
|
7560
7911
|
* @category validation
|
|
7561
7912
|
* @since 4.0.0
|
|
7562
7913
|
*/
|
|
@@ -7569,6 +7920,7 @@ export declare const isBetweenBigDecimal: (options: {
|
|
|
7569
7920
|
/**
|
|
7570
7921
|
* Type-level representation of {@link BigDecimal}.
|
|
7571
7922
|
*
|
|
7923
|
+
* @stability stable
|
|
7572
7924
|
* @category models
|
|
7573
7925
|
* @since 3.10.0
|
|
7574
7926
|
*/
|
|
@@ -7591,6 +7943,7 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
7591
7943
|
*
|
|
7592
7944
|
* @see {@link BigDecimalFromString} for parsing string input into a BigDecimal
|
|
7593
7945
|
*
|
|
7946
|
+
* @stability stable
|
|
7594
7947
|
* @category schemas
|
|
7595
7948
|
* @since 3.10.0
|
|
7596
7949
|
*/
|
|
@@ -7598,6 +7951,7 @@ export declare const BigDecimal: BigDecimal;
|
|
|
7598
7951
|
/**
|
|
7599
7952
|
* Type-level representation of {@link BigDecimalFromString}.
|
|
7600
7953
|
*
|
|
7954
|
+
* @stability stable
|
|
7601
7955
|
* @category models
|
|
7602
7956
|
* @since 4.0.0
|
|
7603
7957
|
*/
|
|
@@ -7628,6 +7982,7 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
7628
7982
|
* @see {@link BigIntFromString} for parsing base-10 integer strings into bigint values
|
|
7629
7983
|
* @see {@link NumberFromString} for parsing JavaScript number strings
|
|
7630
7984
|
*
|
|
7985
|
+
* @stability stable
|
|
7631
7986
|
* @category schemas
|
|
7632
7987
|
* @since 4.0.0
|
|
7633
7988
|
*/
|
|
@@ -7635,6 +7990,7 @@ export declare const BigDecimalFromString: BigDecimalFromString;
|
|
|
7635
7990
|
/**
|
|
7636
7991
|
* Type-level representation of {@link ByteSize}.
|
|
7637
7992
|
*
|
|
7993
|
+
* @stability unstable
|
|
7638
7994
|
* @category models
|
|
7639
7995
|
* @since 4.0.0
|
|
7640
7996
|
*/
|
|
@@ -7650,6 +8006,7 @@ export interface ByteSize extends declare<ByteSize_.ByteSize> {
|
|
|
7650
8006
|
* beyond JavaScript's safe-integer range. The StringTree codec uses the
|
|
7651
8007
|
* human-readable byte-size syntax exposed by {@link ByteSizeFromString}.
|
|
7652
8008
|
*
|
|
8009
|
+
* @stability unstable
|
|
7653
8010
|
* @category schemas
|
|
7654
8011
|
* @since 4.0.0
|
|
7655
8012
|
*/
|
|
@@ -7657,6 +8014,7 @@ export declare const ByteSize: ByteSize;
|
|
|
7657
8014
|
/**
|
|
7658
8015
|
* Type-level representation of {@link ByteSizeFromString}.
|
|
7659
8016
|
*
|
|
8017
|
+
* @stability unstable
|
|
7660
8018
|
* @category models
|
|
7661
8019
|
* @since 4.0.0
|
|
7662
8020
|
*/
|
|
@@ -7689,6 +8047,7 @@ export interface ByteSizeFromString extends decodeTo<ByteSize, String> {
|
|
|
7689
8047
|
* A unit is required. Signs, exponent notation, digit separators, and ambiguous
|
|
7690
8048
|
* unit spellings such as `KB`, `mb`, `Mb`, or `b` are rejected.
|
|
7691
8049
|
*
|
|
8050
|
+
* @stability unstable
|
|
7692
8051
|
* @category schemas
|
|
7693
8052
|
* @since 4.0.0
|
|
7694
8053
|
*/
|
|
@@ -7696,6 +8055,7 @@ export declare const ByteSizeFromString: ByteSizeFromString;
|
|
|
7696
8055
|
/**
|
|
7697
8056
|
* Type-level representation of {@link ByteSizeFromBigInt}.
|
|
7698
8057
|
*
|
|
8058
|
+
* @stability unstable
|
|
7699
8059
|
* @category models
|
|
7700
8060
|
* @since 4.0.0
|
|
7701
8061
|
*/
|
|
@@ -7705,6 +8065,7 @@ export interface ByteSizeFromBigInt extends decodeTo<ByteSize, BigInt> {
|
|
|
7705
8065
|
/**
|
|
7706
8066
|
* Schema that decodes non-negative bigint byte counts.
|
|
7707
8067
|
*
|
|
8068
|
+
* @stability unstable
|
|
7708
8069
|
* @category schemas
|
|
7709
8070
|
* @since 4.0.0
|
|
7710
8071
|
*/
|
|
@@ -7712,6 +8073,7 @@ export declare const ByteSizeFromBigInt: ByteSizeFromBigInt;
|
|
|
7712
8073
|
/**
|
|
7713
8074
|
* Type-level representation of {@link ByteSizeFromNumber}.
|
|
7714
8075
|
*
|
|
8076
|
+
* @stability unstable
|
|
7715
8077
|
* @category models
|
|
7716
8078
|
* @since 4.0.0
|
|
7717
8079
|
*/
|
|
@@ -7725,6 +8087,7 @@ export interface ByteSizeFromNumber extends decodeTo<ByteSize, Number> {
|
|
|
7725
8087
|
*
|
|
7726
8088
|
* Encoding fails when the byte count exceeds `Number.MAX_SAFE_INTEGER`.
|
|
7727
8089
|
*
|
|
8090
|
+
* @stability unstable
|
|
7728
8091
|
* @category schemas
|
|
7729
8092
|
* @since 4.0.0
|
|
7730
8093
|
*/
|
|
@@ -7732,6 +8095,7 @@ export declare const ByteSizeFromNumber: ByteSizeFromNumber;
|
|
|
7732
8095
|
/**
|
|
7733
8096
|
* Type-level representation returned by {@link CauseReason}.
|
|
7734
8097
|
*
|
|
8098
|
+
* @stability stable
|
|
7735
8099
|
* @category models
|
|
7736
8100
|
* @since 4.0.0
|
|
7737
8101
|
*/
|
|
@@ -7748,6 +8112,7 @@ export interface CauseReason<E extends Constraint, D extends Constraint> extends
|
|
|
7748
8112
|
* Failures are represented with a `Fail` tag and encoded error, defects with a
|
|
7749
8113
|
* `Die` tag and encoded defect, and interrupts with an optional `fiberId`.
|
|
7750
8114
|
*
|
|
8115
|
+
* @stability stable
|
|
7751
8116
|
* @category utility types
|
|
7752
8117
|
* @since 4.0.0
|
|
7753
8118
|
*/
|
|
@@ -7778,6 +8143,7 @@ export type CauseReasonIso<E extends Constraint, D extends Constraint> = {
|
|
|
7778
8143
|
* @see {@link Cause} for constructing schemas for full Cause values
|
|
7779
8144
|
* @see {@link CauseReasonIso} for the ISO shape of each cause reason
|
|
7780
8145
|
*
|
|
8146
|
+
* @stability stable
|
|
7781
8147
|
* @category schemas
|
|
7782
8148
|
* @since 4.0.0
|
|
7783
8149
|
*/
|
|
@@ -7785,6 +8151,7 @@ export declare function CauseReason<E extends Constraint, D extends Constraint>(
|
|
|
7785
8151
|
/**
|
|
7786
8152
|
* Type-level representation returned by {@link Cause}.
|
|
7787
8153
|
*
|
|
8154
|
+
* @stability stable
|
|
7788
8155
|
* @category models
|
|
7789
8156
|
* @since 3.10.0
|
|
7790
8157
|
*/
|
|
@@ -7805,6 +8172,7 @@ export interface Cause<E extends Constraint, D extends Constraint> extends decla
|
|
|
7805
8172
|
* @see {@link Cause} for constructing schemas for full Cause values
|
|
7806
8173
|
* @see {@link CauseReasonIso} for the ISO shape of each array element
|
|
7807
8174
|
*
|
|
8175
|
+
* @stability stable
|
|
7808
8176
|
* @category utility types
|
|
7809
8177
|
* @since 4.0.0
|
|
7810
8178
|
*/
|
|
@@ -7827,6 +8195,7 @@ export type CauseIso<E extends Constraint, D extends Constraint> = ReadonlyArray
|
|
|
7827
8195
|
* @see {@link CauseReason} for the schema used by each individual cause reason
|
|
7828
8196
|
* @see {@link CauseIso} for the ordered array representation used by the schema ISO
|
|
7829
8197
|
*
|
|
8198
|
+
* @stability stable
|
|
7830
8199
|
* @category schemas
|
|
7831
8200
|
* @since 3.10.0
|
|
7832
8201
|
*/
|
|
@@ -7834,6 +8203,7 @@ export declare function Cause<E extends Constraint, D extends Constraint>(error:
|
|
|
7834
8203
|
/**
|
|
7835
8204
|
* Type-level representation returned by {@link Chunk}.
|
|
7836
8205
|
*
|
|
8206
|
+
* @stability stable
|
|
7837
8207
|
* @category models
|
|
7838
8208
|
* @since 3.10.0
|
|
7839
8209
|
*/
|
|
@@ -7852,6 +8222,7 @@ export interface Chunk<Value extends Constraint> extends declareConstructor<Chun
|
|
|
7852
8222
|
*
|
|
7853
8223
|
* @see {@link Chunk} for the schema interface and constructor that use this ISO representation
|
|
7854
8224
|
*
|
|
8225
|
+
* @stability stable
|
|
7855
8226
|
* @category utility types
|
|
7856
8227
|
* @since 4.0.0
|
|
7857
8228
|
*/
|
|
@@ -7859,6 +8230,7 @@ export type ChunkIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
|
|
|
7859
8230
|
/**
|
|
7860
8231
|
* Schema for chunks whose values conform to the provided element schema.
|
|
7861
8232
|
*
|
|
8233
|
+
* @stability stable
|
|
7862
8234
|
* @category schemas
|
|
7863
8235
|
* @since 3.10.0
|
|
7864
8236
|
*/
|
|
@@ -7866,6 +8238,7 @@ export declare function Chunk<Value extends Constraint>(value: Value): Chunk<Val
|
|
|
7866
8238
|
/**
|
|
7867
8239
|
* Type-level representation of {@link DateTimeUtc}.
|
|
7868
8240
|
*
|
|
8241
|
+
* @stability stable
|
|
7869
8242
|
* @category models
|
|
7870
8243
|
* @since 3.10.0
|
|
7871
8244
|
*/
|
|
@@ -7890,6 +8263,7 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
7890
8263
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7891
8264
|
* @see {@link DateTimeZoned} for preserving zoned DateTime values
|
|
7892
8265
|
*
|
|
8266
|
+
* @stability stable
|
|
7893
8267
|
* @category schemas
|
|
7894
8268
|
* @since 3.10.0
|
|
7895
8269
|
*/
|
|
@@ -7897,6 +8271,7 @@ export declare const DateTimeUtc: DateTimeUtc;
|
|
|
7897
8271
|
/**
|
|
7898
8272
|
* Type-level representation of {@link DateTimeUtcFromDate}.
|
|
7899
8273
|
*
|
|
8274
|
+
* @stability stable
|
|
7900
8275
|
* @category models
|
|
7901
8276
|
* @since 3.12.0
|
|
7902
8277
|
*/
|
|
@@ -7924,6 +8299,7 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
7924
8299
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7925
8300
|
* @see {@link Date} for validating Date instances without converting them
|
|
7926
8301
|
*
|
|
8302
|
+
* @stability stable
|
|
7927
8303
|
* @category schemas
|
|
7928
8304
|
* @since 3.12.0
|
|
7929
8305
|
*/
|
|
@@ -7931,6 +8307,7 @@ export declare const DateTimeUtcFromDate: DateTimeUtcFromDate;
|
|
|
7931
8307
|
/**
|
|
7932
8308
|
* Type-level representation of {@link DateTimeUtcFromString}.
|
|
7933
8309
|
*
|
|
8310
|
+
* @stability stable
|
|
7934
8311
|
* @category models
|
|
7935
8312
|
* @since 4.0.0
|
|
7936
8313
|
*/
|
|
@@ -7955,6 +8332,7 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
7955
8332
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7956
8333
|
* @see {@link DateFromString} for decoding strings into JavaScript Date instances
|
|
7957
8334
|
*
|
|
8335
|
+
* @stability stable
|
|
7958
8336
|
* @category schemas
|
|
7959
8337
|
* @since 4.0.0
|
|
7960
8338
|
*/
|
|
@@ -7962,6 +8340,7 @@ export declare const DateTimeUtcFromString: DateTimeUtcFromString;
|
|
|
7962
8340
|
/**
|
|
7963
8341
|
* Type-level representation of {@link DateTimeUtcFromMillis}.
|
|
7964
8342
|
*
|
|
8343
|
+
* @stability stable
|
|
7965
8344
|
* @category models
|
|
7966
8345
|
* @since 4.0.0
|
|
7967
8346
|
*/
|
|
@@ -7983,6 +8362,7 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
7983
8362
|
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
7984
8363
|
* @see {@link DateFromMillis} for decoding epoch milliseconds into JavaScript Date instances
|
|
7985
8364
|
*
|
|
8365
|
+
* @stability stable
|
|
7986
8366
|
* @category schemas
|
|
7987
8367
|
* @since 4.0.0
|
|
7988
8368
|
*/
|
|
@@ -7990,6 +8370,7 @@ export declare const DateTimeUtcFromMillis: DateTimeUtcFromMillis;
|
|
|
7990
8370
|
/**
|
|
7991
8371
|
* Type-level representation of {@link TimeZoneOffset}.
|
|
7992
8372
|
*
|
|
8373
|
+
* @stability stable
|
|
7993
8374
|
* @category models
|
|
7994
8375
|
* @since 3.10.0
|
|
7995
8376
|
*/
|
|
@@ -8005,6 +8386,7 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
8005
8386
|
*
|
|
8006
8387
|
* - encodes `DateTime.TimeZone.Offset` as a number (offset in milliseconds)
|
|
8007
8388
|
*
|
|
8389
|
+
* @stability stable
|
|
8008
8390
|
* @category schemas
|
|
8009
8391
|
* @since 3.10.0
|
|
8010
8392
|
*/
|
|
@@ -8012,6 +8394,7 @@ export declare const TimeZoneOffset: TimeZoneOffset;
|
|
|
8012
8394
|
/**
|
|
8013
8395
|
* Type-level representation of {@link TimeZoneNamed}.
|
|
8014
8396
|
*
|
|
8397
|
+
* @stability stable
|
|
8015
8398
|
* @category models
|
|
8016
8399
|
* @since 3.10.0
|
|
8017
8400
|
*/
|
|
@@ -8027,6 +8410,7 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
8027
8410
|
*
|
|
8028
8411
|
* - encodes `DateTime.TimeZone.Named` as a string (IANA time zone identifier)
|
|
8029
8412
|
*
|
|
8413
|
+
* @stability stable
|
|
8030
8414
|
* @category schemas
|
|
8031
8415
|
* @since 3.10.0
|
|
8032
8416
|
*/
|
|
@@ -8034,6 +8418,7 @@ export declare const TimeZoneNamed: TimeZoneNamed;
|
|
|
8034
8418
|
/**
|
|
8035
8419
|
* Type-level representation of {@link TimeZoneNamedFromString}.
|
|
8036
8420
|
*
|
|
8421
|
+
* @stability stable
|
|
8037
8422
|
* @category models
|
|
8038
8423
|
* @since 4.0.0
|
|
8039
8424
|
*/
|
|
@@ -8051,6 +8436,7 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
8051
8436
|
* Encoding:
|
|
8052
8437
|
* - A `DateTime.TimeZone.Named` is encoded as a `string`.
|
|
8053
8438
|
*
|
|
8439
|
+
* @stability stable
|
|
8054
8440
|
* @category schemas
|
|
8055
8441
|
* @since 4.0.0
|
|
8056
8442
|
*/
|
|
@@ -8058,6 +8444,7 @@ export declare const TimeZoneNamedFromString: TimeZoneNamedFromString;
|
|
|
8058
8444
|
/**
|
|
8059
8445
|
* Type-level representation of {@link TimeZone}.
|
|
8060
8446
|
*
|
|
8447
|
+
* @stability stable
|
|
8061
8448
|
* @category models
|
|
8062
8449
|
* @since 3.10.0
|
|
8063
8450
|
*/
|
|
@@ -8074,6 +8461,7 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
8074
8461
|
* - encodes `DateTime.TimeZone` as a string (IANA identifier or offset like
|
|
8075
8462
|
* `+03:00`)
|
|
8076
8463
|
*
|
|
8464
|
+
* @stability stable
|
|
8077
8465
|
* @category schemas
|
|
8078
8466
|
* @since 3.10.0
|
|
8079
8467
|
*/
|
|
@@ -8081,6 +8469,7 @@ export declare const TimeZone: TimeZone;
|
|
|
8081
8469
|
/**
|
|
8082
8470
|
* Type-level representation of {@link TimeZoneFromString}.
|
|
8083
8471
|
*
|
|
8472
|
+
* @stability stable
|
|
8084
8473
|
* @category models
|
|
8085
8474
|
* @since 4.0.0
|
|
8086
8475
|
*/
|
|
@@ -8098,6 +8487,7 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
8098
8487
|
* Encoding:
|
|
8099
8488
|
* - A `DateTime.TimeZone` is encoded as a `string`.
|
|
8100
8489
|
*
|
|
8490
|
+
* @stability stable
|
|
8101
8491
|
* @category schemas
|
|
8102
8492
|
* @since 4.0.0
|
|
8103
8493
|
*/
|
|
@@ -8105,6 +8495,7 @@ export declare const TimeZoneFromString: TimeZoneFromString;
|
|
|
8105
8495
|
/**
|
|
8106
8496
|
* Type-level representation of {@link DateTimeZoned}.
|
|
8107
8497
|
*
|
|
8498
|
+
* @stability stable
|
|
8108
8499
|
* @category models
|
|
8109
8500
|
* @since 3.10.0
|
|
8110
8501
|
*/
|
|
@@ -8123,6 +8514,7 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
8123
8514
|
* - encodes named zones by appending the IANA identifier in brackets, such as
|
|
8124
8515
|
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`
|
|
8125
8516
|
*
|
|
8517
|
+
* @stability stable
|
|
8126
8518
|
* @category schemas
|
|
8127
8519
|
* @since 3.10.0
|
|
8128
8520
|
*/
|
|
@@ -8130,6 +8522,7 @@ export declare const DateTimeZoned: DateTimeZoned;
|
|
|
8130
8522
|
/**
|
|
8131
8523
|
* Type-level representation of {@link DateTimeZonedFromString}.
|
|
8132
8524
|
*
|
|
8525
|
+
* @stability stable
|
|
8133
8526
|
* @category models
|
|
8134
8527
|
* @since 4.0.0
|
|
8135
8528
|
*/
|
|
@@ -8147,6 +8540,7 @@ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String>
|
|
|
8147
8540
|
* Encoding:
|
|
8148
8541
|
* - A `DateTime.Zoned` is encoded as a `string`.
|
|
8149
8542
|
*
|
|
8543
|
+
* @stability stable
|
|
8150
8544
|
* @category schemas
|
|
8151
8545
|
* @since 4.0.0
|
|
8152
8546
|
*/
|
|
@@ -9119,6 +9513,7 @@ export declare const SocketAddress: SocketAddress;
|
|
|
9119
9513
|
/**
|
|
9120
9514
|
* Type-level representation of {@link Duration}.
|
|
9121
9515
|
*
|
|
9516
|
+
* @stability stable
|
|
9122
9517
|
* @category models
|
|
9123
9518
|
* @since 3.10.0
|
|
9124
9519
|
*/
|
|
@@ -9141,6 +9536,7 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
9141
9536
|
* Schema.decodeUnknownSync(Schema.Duration)(Duration.seconds(5)) // => Duration.seconds(5)
|
|
9142
9537
|
* ```
|
|
9143
9538
|
*
|
|
9539
|
+
* @stability stable
|
|
9144
9540
|
* @category schemas
|
|
9145
9541
|
*
|
|
9146
9542
|
* @since 3.10.0
|
|
@@ -9149,6 +9545,7 @@ export declare const Duration: Duration;
|
|
|
9149
9545
|
/**
|
|
9150
9546
|
* Type-level representation of {@link DurationFromString}.
|
|
9151
9547
|
*
|
|
9548
|
+
* @stability stable
|
|
9152
9549
|
* @category models
|
|
9153
9550
|
* @since 4.0.0
|
|
9154
9551
|
*/
|
|
@@ -9167,6 +9564,7 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
9167
9564
|
* Encoding:
|
|
9168
9565
|
* - A `Duration` is encoded as a parseable `string`.
|
|
9169
9566
|
*
|
|
9567
|
+
* @stability stable
|
|
9170
9568
|
* @category schemas
|
|
9171
9569
|
* @since 4.0.0
|
|
9172
9570
|
*/
|
|
@@ -9174,6 +9572,7 @@ export declare const DurationFromString: DurationFromString;
|
|
|
9174
9572
|
/**
|
|
9175
9573
|
* Type-level representation of {@link DurationFromNanos}.
|
|
9176
9574
|
*
|
|
9575
|
+
* @stability stable
|
|
9177
9576
|
* @category models
|
|
9178
9577
|
* @since 3.10.0
|
|
9179
9578
|
*/
|
|
@@ -9194,6 +9593,7 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
9194
9593
|
* fails when the duration cannot be represented as nanoseconds, such as
|
|
9195
9594
|
* `Duration.infinity` or `Duration.negativeInfinity`.
|
|
9196
9595
|
*
|
|
9596
|
+
* @stability stable
|
|
9197
9597
|
* @category schemas
|
|
9198
9598
|
* @since 3.10.0
|
|
9199
9599
|
*/
|
|
@@ -9201,6 +9601,7 @@ export declare const DurationFromNanos: DurationFromNanos;
|
|
|
9201
9601
|
/**
|
|
9202
9602
|
* Type-level representation of {@link DurationFromMillis}.
|
|
9203
9603
|
*
|
|
9604
|
+
* @stability stable
|
|
9204
9605
|
* @category models
|
|
9205
9606
|
* @since 3.10.0
|
|
9206
9607
|
*/
|
|
@@ -9223,6 +9624,7 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
9223
9624
|
*
|
|
9224
9625
|
* `NaN` is decoded as `Duration.zero`, matching `Duration.millis`.
|
|
9225
9626
|
*
|
|
9627
|
+
* @stability stable
|
|
9226
9628
|
* @category schemas
|
|
9227
9629
|
* @since 3.10.0
|
|
9228
9630
|
*/
|
|
@@ -9230,6 +9632,7 @@ export declare const DurationFromMillis: DurationFromMillis;
|
|
|
9230
9632
|
/**
|
|
9231
9633
|
* Type-level representation returned by {@link Exit}.
|
|
9232
9634
|
*
|
|
9635
|
+
* @stability stable
|
|
9233
9636
|
* @category models
|
|
9234
9637
|
* @since 3.10.0
|
|
9235
9638
|
*/
|
|
@@ -9247,6 +9650,7 @@ export interface Exit<A extends Constraint, E extends Constraint, D extends Cons
|
|
|
9247
9650
|
* Successful exits are represented as `{ _tag: "Success", value }`, while failed
|
|
9248
9651
|
* exits are represented as `{ _tag: "Failure", cause }`.
|
|
9249
9652
|
*
|
|
9653
|
+
* @stability stable
|
|
9250
9654
|
* @category utility types
|
|
9251
9655
|
* @since 4.0.0
|
|
9252
9656
|
*/
|
|
@@ -9266,6 +9670,7 @@ export type ExitIso<A extends Constraint, E extends Constraint, D extends Constr
|
|
|
9266
9670
|
* Use when serializing or validating an effect outcome where success, typed
|
|
9267
9671
|
* failure, and defects each need their own schema.
|
|
9268
9672
|
*
|
|
9673
|
+
* @stability stable
|
|
9269
9674
|
* @category schemas
|
|
9270
9675
|
* @since 3.10.0
|
|
9271
9676
|
*/
|
|
@@ -9273,6 +9678,7 @@ export declare function Exit<A extends Constraint, E extends Constraint, D exten
|
|
|
9273
9678
|
/**
|
|
9274
9679
|
* Encoded representation of an immutable Effect graph.
|
|
9275
9680
|
*
|
|
9681
|
+
* @stability unstable
|
|
9276
9682
|
* @category models
|
|
9277
9683
|
* @since 4.0.0
|
|
9278
9684
|
*/
|
|
@@ -9280,6 +9686,7 @@ export type EncodedGraph<N, E, T extends Graph_.Kind> = Graph_.Snapshot<N, E, T>
|
|
|
9280
9686
|
/**
|
|
9281
9687
|
* Iso representation used for {@link Graph} schemas.
|
|
9282
9688
|
*
|
|
9689
|
+
* @stability unstable
|
|
9283
9690
|
* @category utility types
|
|
9284
9691
|
* @since 4.0.0
|
|
9285
9692
|
*/
|
|
@@ -9287,6 +9694,7 @@ export type GraphIso<T extends Graph_.Kind, Node extends Constraint, Edge extend
|
|
|
9287
9694
|
/**
|
|
9288
9695
|
* Type-level representation returned by {@link Graph}.
|
|
9289
9696
|
*
|
|
9697
|
+
* @stability unstable
|
|
9290
9698
|
* @category models
|
|
9291
9699
|
* @since 4.0.0
|
|
9292
9700
|
*/
|
|
@@ -9326,6 +9734,7 @@ export interface Graph<T extends Graph_.Kind, Node extends Constraint, Edge exte
|
|
|
9326
9734
|
* encoded.edges // => [{ index: 0, source: 0, target: 1, data: 1 }]
|
|
9327
9735
|
* ```
|
|
9328
9736
|
*
|
|
9737
|
+
* @stability unstable
|
|
9329
9738
|
* @category schemas
|
|
9330
9739
|
* @since 4.0.0
|
|
9331
9740
|
*/
|
|
@@ -9335,6 +9744,7 @@ export declare function Graph<T extends Graph_.Kind, Node extends Constraint, Ed
|
|
|
9335
9744
|
/**
|
|
9336
9745
|
* Type-level representation returned by {@link HashMap}.
|
|
9337
9746
|
*
|
|
9747
|
+
* @stability stable
|
|
9338
9748
|
* @category models
|
|
9339
9749
|
* @since 3.10.0
|
|
9340
9750
|
*/
|
|
@@ -9347,6 +9757,7 @@ export interface HashMap<Key extends Constraint, Value extends Constraint> exten
|
|
|
9347
9757
|
* Iso representation used for `HashMap` schemas: an array of readonly
|
|
9348
9758
|
* `[key, value]` tuples using each entry schema's `Iso` type.
|
|
9349
9759
|
*
|
|
9760
|
+
* @stability stable
|
|
9350
9761
|
* @category utility types
|
|
9351
9762
|
* @since 4.0.0
|
|
9352
9763
|
*/
|
|
@@ -9354,6 +9765,7 @@ export type HashMapIso<Key extends Constraint, Value extends Constraint> = Reado
|
|
|
9354
9765
|
/**
|
|
9355
9766
|
* Schema for hash maps whose keys and values conform to the provided schemas.
|
|
9356
9767
|
*
|
|
9768
|
+
* @stability stable
|
|
9357
9769
|
* @category schemas
|
|
9358
9770
|
* @since 3.10.0
|
|
9359
9771
|
*/
|
|
@@ -9361,6 +9773,7 @@ export declare function HashMap<Key extends Constraint, Value extends Constraint
|
|
|
9361
9773
|
/**
|
|
9362
9774
|
* Type-level representation returned by {@link HashSet}.
|
|
9363
9775
|
*
|
|
9776
|
+
* @stability stable
|
|
9364
9777
|
* @category models
|
|
9365
9778
|
* @since 3.10.0
|
|
9366
9779
|
*/
|
|
@@ -9372,6 +9785,7 @@ export interface HashSet<Value extends Constraint> extends declareConstructor<Ha
|
|
|
9372
9785
|
* Iso representation used for `HashSet` schemas: an array of element values
|
|
9373
9786
|
* using the element schema's `Iso` type.
|
|
9374
9787
|
*
|
|
9788
|
+
* @stability stable
|
|
9375
9789
|
* @category utility types
|
|
9376
9790
|
* @since 4.0.0
|
|
9377
9791
|
*/
|
|
@@ -9379,6 +9793,7 @@ export type HashSetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
|
|
|
9379
9793
|
/**
|
|
9380
9794
|
* Schema for hash sets whose values conform to the provided element schema.
|
|
9381
9795
|
*
|
|
9796
|
+
* @stability stable
|
|
9382
9797
|
* @category schemas
|
|
9383
9798
|
* @since 3.10.0
|
|
9384
9799
|
*/
|
|
@@ -9386,6 +9801,7 @@ export declare function HashSet<Value extends Constraint>(value: Value): HashSet
|
|
|
9386
9801
|
/**
|
|
9387
9802
|
* Type-level representation returned by {@link Option}.
|
|
9388
9803
|
*
|
|
9804
|
+
* @stability stable
|
|
9389
9805
|
* @category models
|
|
9390
9806
|
* @since 3.10.0
|
|
9391
9807
|
*/
|
|
@@ -9401,6 +9817,7 @@ export interface Option<A extends Constraint> extends declareConstructor<Option_
|
|
|
9401
9817
|
* `None` is represented as `{ _tag: "None" }`, while `Some` is represented as
|
|
9402
9818
|
* `{ _tag: "Some", value }` using the wrapped schema's `Iso` type.
|
|
9403
9819
|
*
|
|
9820
|
+
* @stability stable
|
|
9404
9821
|
* @category utility types
|
|
9405
9822
|
* @since 4.0.0
|
|
9406
9823
|
*/
|
|
@@ -9413,6 +9830,7 @@ export type OptionIso<A extends Constraint> = {
|
|
|
9413
9830
|
/**
|
|
9414
9831
|
* Schema for `Option<A>` values.
|
|
9415
9832
|
*
|
|
9833
|
+
* @stability stable
|
|
9416
9834
|
* @category schemas
|
|
9417
9835
|
* @since 3.10.0
|
|
9418
9836
|
*/
|
|
@@ -9420,6 +9838,7 @@ export declare function Option<A extends Constraint>(value: A): Option<A>;
|
|
|
9420
9838
|
/**
|
|
9421
9839
|
* Type-level representation returned by {@link OptionFromNullOr}.
|
|
9422
9840
|
*
|
|
9841
|
+
* @stability stable
|
|
9423
9842
|
* @category models
|
|
9424
9843
|
* @since 3.10.0
|
|
9425
9844
|
*/
|
|
@@ -9434,6 +9853,7 @@ export interface OptionFromNullOr<S extends Constraint> extends decodeTo<Option<
|
|
|
9434
9853
|
* Decoding maps `null` to `None` and all other values to `Some`. Encoding maps
|
|
9435
9854
|
* `None` to `null` and maps `Some` to its value.
|
|
9436
9855
|
*
|
|
9856
|
+
* @stability stable
|
|
9437
9857
|
* @category schemas
|
|
9438
9858
|
* @since 3.10.0
|
|
9439
9859
|
*/
|
|
@@ -9441,6 +9861,7 @@ export declare function OptionFromNullOr<S extends Constraint>(schema: S): Optio
|
|
|
9441
9861
|
/**
|
|
9442
9862
|
* Type-level representation returned by {@link OptionFromUndefinedOr}.
|
|
9443
9863
|
*
|
|
9864
|
+
* @stability stable
|
|
9444
9865
|
* @category models
|
|
9445
9866
|
* @since 3.10.0
|
|
9446
9867
|
*/
|
|
@@ -9456,6 +9877,7 @@ export interface OptionFromUndefinedOr<S extends Constraint> extends decodeTo<Op
|
|
|
9456
9877
|
* Decoding maps `undefined` to `None` and all other values to `Some`. Encoding
|
|
9457
9878
|
* maps `None` to `undefined` and maps `Some` to its value.
|
|
9458
9879
|
*
|
|
9880
|
+
* @stability stable
|
|
9459
9881
|
* @category schemas
|
|
9460
9882
|
* @since 3.10.0
|
|
9461
9883
|
*/
|
|
@@ -9463,6 +9885,7 @@ export declare function OptionFromUndefinedOr<S extends Constraint>(schema: S):
|
|
|
9463
9885
|
/**
|
|
9464
9886
|
* Type-level representation returned by {@link OptionFromNullishOr}.
|
|
9465
9887
|
*
|
|
9888
|
+
* @stability stable
|
|
9466
9889
|
* @category models
|
|
9467
9890
|
* @since 3.10.0
|
|
9468
9891
|
*/
|
|
@@ -9479,6 +9902,7 @@ export interface OptionFromNullishOr<S extends Constraint> extends decodeTo<Opti
|
|
|
9479
9902
|
* `options.onNoneEncoding`, which defaults to `undefined`, and maps `Some` to
|
|
9480
9903
|
* its value.
|
|
9481
9904
|
*
|
|
9905
|
+
* @stability stable
|
|
9482
9906
|
* @category schemas
|
|
9483
9907
|
* @since 3.10.0
|
|
9484
9908
|
*/
|
|
@@ -9678,6 +10102,7 @@ export declare const RecordFromUrlParams: RecordFromUrlParams;
|
|
|
9678
10102
|
/**
|
|
9679
10103
|
* Type-level representation returned by {@link OptionFromOptionalKey}.
|
|
9680
10104
|
*
|
|
10105
|
+
* @stability stable
|
|
9681
10106
|
* @category models
|
|
9682
10107
|
* @since 4.0.0
|
|
9683
10108
|
*/
|
|
@@ -9692,6 +10117,7 @@ export interface OptionFromOptionalKey<S extends Constraint> extends decodeTo<Op
|
|
|
9692
10117
|
* Decoding maps a missing key to `None` and a present value to `Some`.
|
|
9693
10118
|
* Encoding maps `None` to a missing key and maps `Some` to its value.
|
|
9694
10119
|
*
|
|
10120
|
+
* @stability stable
|
|
9695
10121
|
* @category schemas
|
|
9696
10122
|
* @since 4.0.0
|
|
9697
10123
|
*/
|
|
@@ -9699,6 +10125,7 @@ export declare function OptionFromOptionalKey<S extends Constraint>(schema: S):
|
|
|
9699
10125
|
/**
|
|
9700
10126
|
* Type-level representation returned by {@link OptionFromOptional}.
|
|
9701
10127
|
*
|
|
10128
|
+
* @stability stable
|
|
9702
10129
|
* @category models
|
|
9703
10130
|
* @since 4.0.0
|
|
9704
10131
|
*/
|
|
@@ -9715,6 +10142,7 @@ export interface OptionFromOptional<S extends Constraint> extends decodeTo<Optio
|
|
|
9715
10142
|
* maps all other values to `Some`. Encoding maps `None` to a missing key and
|
|
9716
10143
|
* maps `Some` to its value.
|
|
9717
10144
|
*
|
|
10145
|
+
* @stability stable
|
|
9718
10146
|
* @category schemas
|
|
9719
10147
|
* @since 4.0.0
|
|
9720
10148
|
*/
|
|
@@ -9722,6 +10150,7 @@ export declare function OptionFromOptional<S extends Constraint>(schema: S): Opt
|
|
|
9722
10150
|
/**
|
|
9723
10151
|
* Type-level representation returned by {@link OptionFromOptionalNullOr}.
|
|
9724
10152
|
*
|
|
10153
|
+
* @stability stable
|
|
9725
10154
|
* @category models
|
|
9726
10155
|
* @since 4.0.0
|
|
9727
10156
|
*/
|
|
@@ -9739,6 +10168,7 @@ export interface OptionFromOptionalNullOr<S extends Constraint> extends decodeTo
|
|
|
9739
10168
|
* according to `options.onNoneEncoding`: `"omit"` encodes a missing key,
|
|
9740
10169
|
* `null` encodes `null`, and `undefined` encodes `undefined`.
|
|
9741
10170
|
*
|
|
10171
|
+
* @stability stable
|
|
9742
10172
|
* @category schemas
|
|
9743
10173
|
* @since 4.0.0
|
|
9744
10174
|
*/
|
|
@@ -9748,6 +10178,7 @@ export declare function OptionFromOptionalNullOr<S extends Constraint>(schema: S
|
|
|
9748
10178
|
/**
|
|
9749
10179
|
* Type-level representation returned by {@link Redacted}.
|
|
9750
10180
|
*
|
|
10181
|
+
* @stability stable
|
|
9751
10182
|
* @category models
|
|
9752
10183
|
* @since 3.10.0
|
|
9753
10184
|
*/
|
|
@@ -9772,6 +10203,7 @@ export interface Redacted<S extends Constraint> extends declareConstructor<Redac
|
|
|
9772
10203
|
* sensitive and should not be exposed in JSON.
|
|
9773
10204
|
*
|
|
9774
10205
|
* @see {@link RedactedFromValue} for decoding raw values and wrapping them in `Redacted`.
|
|
10206
|
+
* @stability stable
|
|
9775
10207
|
* @category schemas
|
|
9776
10208
|
* @since 3.10.0
|
|
9777
10209
|
*/
|
|
@@ -9782,6 +10214,7 @@ export declare function Redacted<S extends Constraint>(value: S, options?: {
|
|
|
9782
10214
|
/**
|
|
9783
10215
|
* Type-level representation returned by {@link RedactedFromValue}.
|
|
9784
10216
|
*
|
|
10217
|
+
* @stability stable
|
|
9785
10218
|
* @category models
|
|
9786
10219
|
* @since 4.0.0
|
|
9787
10220
|
*/
|
|
@@ -9794,6 +10227,7 @@ export interface RedactedFromValue<S extends Constraint> extends decodeTo<Redact
|
|
|
9794
10227
|
* the raw value and wraps it.
|
|
9795
10228
|
*
|
|
9796
10229
|
* @see {@link Redacted} for schemas whose input is already a `Redacted` value.
|
|
10230
|
+
* @stability stable
|
|
9797
10231
|
* @category schemas
|
|
9798
10232
|
* @since 4.0.0
|
|
9799
10233
|
*/
|
|
@@ -9804,6 +10238,7 @@ export declare function RedactedFromValue<S extends Constraint>(value: S, option
|
|
|
9804
10238
|
/**
|
|
9805
10239
|
* Type-level representation returned by {@link Result}.
|
|
9806
10240
|
*
|
|
10241
|
+
* @stability stable
|
|
9807
10242
|
* @category models
|
|
9808
10243
|
* @since 4.0.0
|
|
9809
10244
|
*/
|
|
@@ -9820,6 +10255,7 @@ export interface Result<A extends Constraint, E extends Constraint> extends decl
|
|
|
9820
10255
|
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
9821
10256
|
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
9822
10257
|
*
|
|
10258
|
+
* @stability stable
|
|
9823
10259
|
* @category utility types
|
|
9824
10260
|
* @since 4.0.0
|
|
9825
10261
|
*/
|
|
@@ -9833,6 +10269,7 @@ export type ResultIso<A extends Constraint, E extends Constraint> = {
|
|
|
9833
10269
|
/**
|
|
9834
10270
|
* Schema for `Result<A, E>` values.
|
|
9835
10271
|
*
|
|
10272
|
+
* @stability stable
|
|
9836
10273
|
* @category schemas
|
|
9837
10274
|
* @since 4.0.0
|
|
9838
10275
|
*/
|
|
@@ -9840,6 +10277,7 @@ export declare function Result<A extends Constraint, E extends Constraint>(succe
|
|
|
9840
10277
|
/**
|
|
9841
10278
|
* Type-level representation returned by {@link Class}.
|
|
9842
10279
|
*
|
|
10280
|
+
* @stability stable
|
|
9843
10281
|
* @category models
|
|
9844
10282
|
* @since 3.10.0
|
|
9845
10283
|
*/
|
|
@@ -9973,6 +10411,7 @@ type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use
|
|
|
9973
10411
|
* @see {@link Error} for defining schema-backed error classes
|
|
9974
10412
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
9975
10413
|
*
|
|
10414
|
+
* @stability stable
|
|
9976
10415
|
* @category constructors
|
|
9977
10416
|
* @since 3.10.0
|
|
9978
10417
|
*/
|
|
@@ -10043,6 +10482,7 @@ export declare const Class: {
|
|
|
10043
10482
|
* @see {@link Error} for defining schema-backed error classes
|
|
10044
10483
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
10045
10484
|
*
|
|
10485
|
+
* @stability stable
|
|
10046
10486
|
* @category constructors
|
|
10047
10487
|
* @since 3.10.0
|
|
10048
10488
|
*/
|
|
@@ -10113,6 +10553,7 @@ export declare const Class: {
|
|
|
10113
10553
|
* @see {@link Error} for defining schema-backed error classes
|
|
10114
10554
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
10115
10555
|
*
|
|
10556
|
+
* @stability stable
|
|
10116
10557
|
* @category constructors
|
|
10117
10558
|
* @since 3.10.0
|
|
10118
10559
|
*/
|
|
@@ -10183,6 +10624,7 @@ export declare const Class: {
|
|
|
10183
10624
|
* @see {@link Error} for defining schema-backed error classes
|
|
10184
10625
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
10185
10626
|
*
|
|
10627
|
+
* @stability stable
|
|
10186
10628
|
* @category constructors
|
|
10187
10629
|
* @since 3.10.0
|
|
10188
10630
|
*/
|
|
@@ -10216,6 +10658,7 @@ export declare const Class: {
|
|
|
10216
10658
|
* c.radius // => 5
|
|
10217
10659
|
* ```
|
|
10218
10660
|
*
|
|
10661
|
+
* @stability stable
|
|
10219
10662
|
* @category constructors
|
|
10220
10663
|
* @since 3.10.0
|
|
10221
10664
|
*/
|
|
@@ -10247,6 +10690,7 @@ export declare const TaggedClass: {
|
|
|
10247
10690
|
* c.radius // => 5
|
|
10248
10691
|
* ```
|
|
10249
10692
|
*
|
|
10693
|
+
* @stability stable
|
|
10250
10694
|
* @category constructors
|
|
10251
10695
|
* @since 3.10.0
|
|
10252
10696
|
*/
|
|
@@ -10278,6 +10722,7 @@ export declare const TaggedClass: {
|
|
|
10278
10722
|
* c.radius // => 5
|
|
10279
10723
|
* ```
|
|
10280
10724
|
*
|
|
10725
|
+
* @stability stable
|
|
10281
10726
|
* @category constructors
|
|
10282
10727
|
* @since 3.10.0
|
|
10283
10728
|
*/
|
|
@@ -10309,6 +10754,7 @@ export declare const TaggedClass: {
|
|
|
10309
10754
|
* c.radius // => 5
|
|
10310
10755
|
* ```
|
|
10311
10756
|
*
|
|
10757
|
+
* @stability stable
|
|
10312
10758
|
* @category constructors
|
|
10313
10759
|
* @since 3.10.0
|
|
10314
10760
|
*/
|
|
@@ -10341,6 +10787,7 @@ export declare const TaggedClass: {
|
|
|
10341
10787
|
* error.id // => 1
|
|
10342
10788
|
* ```
|
|
10343
10789
|
*
|
|
10790
|
+
* @stability stable
|
|
10344
10791
|
* @category constructors
|
|
10345
10792
|
* @since 4.0.0
|
|
10346
10793
|
*/
|
|
@@ -10367,6 +10814,7 @@ export declare const Error: {
|
|
|
10367
10814
|
* error.id // => 1
|
|
10368
10815
|
* ```
|
|
10369
10816
|
*
|
|
10817
|
+
* @stability stable
|
|
10370
10818
|
* @category constructors
|
|
10371
10819
|
* @since 4.0.0
|
|
10372
10820
|
*/
|
|
@@ -10393,6 +10841,7 @@ export declare const Error: {
|
|
|
10393
10841
|
* error.id // => 1
|
|
10394
10842
|
* ```
|
|
10395
10843
|
*
|
|
10844
|
+
* @stability stable
|
|
10396
10845
|
* @category constructors
|
|
10397
10846
|
* @since 4.0.0
|
|
10398
10847
|
*/
|
|
@@ -10419,6 +10868,7 @@ export declare const Error: {
|
|
|
10419
10868
|
* error.id // => 1
|
|
10420
10869
|
* ```
|
|
10421
10870
|
*
|
|
10871
|
+
* @stability stable
|
|
10422
10872
|
* @category constructors
|
|
10423
10873
|
* @since 4.0.0
|
|
10424
10874
|
*/
|
|
@@ -10451,6 +10901,7 @@ export declare const Error: {
|
|
|
10451
10901
|
* error.id // => 42
|
|
10452
10902
|
* ```
|
|
10453
10903
|
*
|
|
10904
|
+
* @stability stable
|
|
10454
10905
|
* @category constructors
|
|
10455
10906
|
* @since 3.10.0
|
|
10456
10907
|
*/
|
|
@@ -10481,6 +10932,7 @@ export declare const TaggedError: {
|
|
|
10481
10932
|
* error.id // => 42
|
|
10482
10933
|
* ```
|
|
10483
10934
|
*
|
|
10935
|
+
* @stability stable
|
|
10484
10936
|
* @category constructors
|
|
10485
10937
|
* @since 3.10.0
|
|
10486
10938
|
*/
|
|
@@ -10511,6 +10963,7 @@ export declare const TaggedError: {
|
|
|
10511
10963
|
* error.id // => 42
|
|
10512
10964
|
* ```
|
|
10513
10965
|
*
|
|
10966
|
+
* @stability stable
|
|
10514
10967
|
* @category constructors
|
|
10515
10968
|
* @since 3.10.0
|
|
10516
10969
|
*/
|
|
@@ -10541,6 +10994,7 @@ export declare const TaggedError: {
|
|
|
10541
10994
|
* error.id // => 42
|
|
10542
10995
|
* ```
|
|
10543
10996
|
*
|
|
10997
|
+
* @stability stable
|
|
10544
10998
|
* @category constructors
|
|
10545
10999
|
* @since 3.10.0
|
|
10546
11000
|
*/
|
|
@@ -10560,6 +11014,7 @@ export declare const TaggedError: {
|
|
|
10560
11014
|
* The annotation is applied through this helper because adding it directly to
|
|
10561
11015
|
* `Annotations.Bottom` would make schemas invariant.
|
|
10562
11016
|
*
|
|
11017
|
+
* @stability stable
|
|
10563
11018
|
* @category formatting
|
|
10564
11019
|
* @since 4.0.0
|
|
10565
11020
|
*/
|
|
@@ -10574,6 +11029,7 @@ export declare function overrideToFormatter<S extends Top>(toFormatter: () => Fo
|
|
|
10574
11029
|
* The optional `onBefore` hook lets you intercept specific AST nodes before
|
|
10575
11030
|
* the default formatting logic runs.
|
|
10576
11031
|
*
|
|
11032
|
+
* @stability stable
|
|
10577
11033
|
* @category formatting
|
|
10578
11034
|
* @since 4.0.0
|
|
10579
11035
|
*/
|
|
@@ -10589,6 +11045,7 @@ export declare function toFormatter<S extends Constraint>(schema: S, options?: {
|
|
|
10589
11045
|
* Use when you need a custom equivalence instead of the default structural
|
|
10590
11046
|
* equivalence derived by {@link toEquivalence}.
|
|
10591
11047
|
*
|
|
11048
|
+
* @stability stable
|
|
10592
11049
|
* @category instances
|
|
10593
11050
|
* @since 4.0.0
|
|
10594
11051
|
*/
|
|
@@ -10609,6 +11066,7 @@ export declare function overrideToEquivalence<S extends Top>(toEquivalence: () =
|
|
|
10609
11066
|
* eq({ id: 1, name: "Alice" }, { id: 2, name: "Alice" }) // => false
|
|
10610
11067
|
* ```
|
|
10611
11068
|
*
|
|
11069
|
+
* @stability stable
|
|
10612
11070
|
* @category instances
|
|
10613
11071
|
* @since 4.0.0
|
|
10614
11072
|
*/
|
|
@@ -10631,6 +11089,7 @@ export declare function toEquivalence<T>(schema: Schema<T>): Equivalence.Equival
|
|
|
10631
11089
|
*
|
|
10632
11090
|
* @see {@link SchemaRepresentation.toRepresentation} for converting a `SchemaAST.AST` directly
|
|
10633
11091
|
*
|
|
11092
|
+
* @stability stable
|
|
10634
11093
|
* @category converting
|
|
10635
11094
|
* @since 4.0.0
|
|
10636
11095
|
*/
|
|
@@ -10649,6 +11108,7 @@ export declare function toRepresentation(schema: Constraint, options?: SchemaRep
|
|
|
10649
11108
|
* `SchemaRepresentation.toJsonSchemaMultiDocument`, reference allocation has already happened and `referencePolicy`
|
|
10650
11109
|
* has no effect.
|
|
10651
11110
|
*
|
|
11111
|
+
* @stability stable
|
|
10652
11112
|
* @category options
|
|
10653
11113
|
* @since 4.0.0
|
|
10654
11114
|
*/
|
|
@@ -10788,6 +11248,7 @@ export interface ToJsonSchemaOptions extends SchemaRepresentation.ToRepresentati
|
|
|
10788
11248
|
* @see {@link toCodecJson} for decoding and encoding the canonical JSON representation
|
|
10789
11249
|
* @see {@link SchemaRepresentation.toJsonSchemaDocument} for compiling an existing live representation document
|
|
10790
11250
|
*
|
|
11251
|
+
* @stability stable
|
|
10791
11252
|
* @category converting
|
|
10792
11253
|
* @since 4.0.0
|
|
10793
11254
|
*/
|
|
@@ -10795,6 +11256,7 @@ export declare function toJsonSchemaDocument(schema: Constraint, options?: ToJso
|
|
|
10795
11256
|
/**
|
|
10796
11257
|
* Type-level representation returned by {@link toCodecJson}.
|
|
10797
11258
|
*
|
|
11259
|
+
* @stability stable
|
|
10798
11260
|
* @category converting
|
|
10799
11261
|
* @since 4.0.0
|
|
10800
11262
|
*/
|
|
@@ -10829,6 +11291,7 @@ export interface toCodecJson<S extends Constraint> extends BottomLazy<S["ast"],
|
|
|
10829
11291
|
* checks and annotations remain on its source node rather than being copied to
|
|
10830
11292
|
* the JSON target. Source checks still run after the transformation.
|
|
10831
11293
|
*
|
|
11294
|
+
* @stability stable
|
|
10832
11295
|
* @category converting
|
|
10833
11296
|
* @since 4.0.0
|
|
10834
11297
|
*/
|
|
@@ -10854,6 +11317,7 @@ export declare const toCodecJson: {
|
|
|
10854
11317
|
* checks and annotations remain on its source node rather than being copied to
|
|
10855
11318
|
* the JSON target. Source checks still run after the transformation.
|
|
10856
11319
|
*
|
|
11320
|
+
* @stability stable
|
|
10857
11321
|
* @category converting
|
|
10858
11322
|
* @since 4.0.0
|
|
10859
11323
|
*/
|
|
@@ -10873,6 +11337,7 @@ export declare const toCodecJson: {
|
|
|
10873
11337
|
* Links cannot require services because the returned `Codec` does not expose
|
|
10874
11338
|
* service requirements.
|
|
10875
11339
|
*
|
|
11340
|
+
* @stability stable
|
|
10876
11341
|
* @category converting
|
|
10877
11342
|
* @since 4.0.0
|
|
10878
11343
|
*/
|
|
@@ -10891,6 +11356,7 @@ export declare const toCodecIso: {
|
|
|
10891
11356
|
* Links cannot require services because the returned `Codec` does not expose
|
|
10892
11357
|
* service requirements.
|
|
10893
11358
|
*
|
|
11359
|
+
* @stability stable
|
|
10894
11360
|
* @category converting
|
|
10895
11361
|
* @since 4.0.0
|
|
10896
11362
|
*/
|
|
@@ -10900,6 +11366,7 @@ export declare const toCodecIso: {
|
|
|
10900
11366
|
* A {@link Tree} of `string | undefined` nodes. Leaf values are either a
|
|
10901
11367
|
* string representation or `undefined` for opaque/declaration types.
|
|
10902
11368
|
*
|
|
11369
|
+
* @stability stable
|
|
10903
11370
|
* @category models
|
|
10904
11371
|
* @since 4.0.0
|
|
10905
11372
|
*/
|
|
@@ -10907,6 +11374,7 @@ export type StringTree = Tree<string | undefined>;
|
|
|
10907
11374
|
/**
|
|
10908
11375
|
* Type-level representation returned by {@link toCodecStringTree}.
|
|
10909
11376
|
*
|
|
11377
|
+
* @stability stable
|
|
10910
11378
|
* @category converting
|
|
10911
11379
|
* @since 4.0.0
|
|
10912
11380
|
*/
|
|
@@ -10937,6 +11405,7 @@ export interface toCodecStringTree<S extends Constraint> extends BottomLazy<S["a
|
|
|
10937
11405
|
* `toCodec` encoding. A callback can return `undefined` when the declaration is
|
|
10938
11406
|
* already in canonical StringTree form.
|
|
10939
11407
|
*
|
|
11408
|
+
* @stability stable
|
|
10940
11409
|
* @category converting
|
|
10941
11410
|
* @since 4.0.0
|
|
10942
11411
|
*/
|
|
@@ -10958,6 +11427,7 @@ export declare const toCodecStringTree: {
|
|
|
10958
11427
|
* `toCodec` encoding. A callback can return `undefined` when the declaration is
|
|
10959
11428
|
* already in canonical StringTree form.
|
|
10960
11429
|
*
|
|
11430
|
+
* @stability stable
|
|
10961
11431
|
* @category converting
|
|
10962
11432
|
* @since 4.0.0
|
|
10963
11433
|
*/
|
|
@@ -10966,6 +11436,7 @@ export declare const toCodecStringTree: {
|
|
|
10966
11436
|
/**
|
|
10967
11437
|
* Type-level representation returned by {@link toCodecArrayFromSingle}.
|
|
10968
11438
|
*
|
|
11439
|
+
* @stability stable
|
|
10969
11440
|
* @category converting
|
|
10970
11441
|
* @since 4.0.0
|
|
10971
11442
|
*/
|
|
@@ -10993,6 +11464,7 @@ export interface toCodecArrayFromSingle<S extends Constraint> extends BottomLazy
|
|
|
10993
11464
|
* decoding convenience rather than a canonical StringTree representation. It
|
|
10994
11465
|
* does not parse comma-separated strings.
|
|
10995
11466
|
*
|
|
11467
|
+
* @stability stable
|
|
10996
11468
|
* @category converting
|
|
10997
11469
|
* @since 4.0.0
|
|
10998
11470
|
*/
|
|
@@ -11012,6 +11484,7 @@ export declare const toCodecArrayFromSingle: {
|
|
|
11012
11484
|
* decoding convenience rather than a canonical StringTree representation. It
|
|
11013
11485
|
* does not parse comma-separated strings.
|
|
11014
11486
|
*
|
|
11487
|
+
* @stability stable
|
|
11015
11488
|
* @category converting
|
|
11016
11489
|
* @since 4.0.0
|
|
11017
11490
|
*/
|
|
@@ -11038,6 +11511,7 @@ type XmlEncoderOptions = {
|
|
|
11038
11511
|
* an `Effect` that succeeds with the XML string or fails with a
|
|
11039
11512
|
* {@link SchemaIssue.Issue} if codec encoding fails.
|
|
11040
11513
|
*
|
|
11514
|
+
* @stability stable
|
|
11041
11515
|
* @category encoding
|
|
11042
11516
|
* @since 4.0.0
|
|
11043
11517
|
*/
|
|
@@ -11059,6 +11533,7 @@ export declare function toEncoderXml<T, RE>(codec: ConstraintCodec<T, unknown, u
|
|
|
11059
11533
|
* `SchemaIssue.makeFormatterDefault()`. Consume {@link toCodecIso} with an
|
|
11060
11534
|
* effectful parser for asynchronous execution or explicit failure handling.
|
|
11061
11535
|
*
|
|
11536
|
+
* @stability stable
|
|
11062
11537
|
* @category converting
|
|
11063
11538
|
* @since 4.0.0
|
|
11064
11539
|
*/
|
|
@@ -11066,6 +11541,7 @@ export declare function toIso<S extends Constraint>(schema: S): Optic_.Iso<S["Ty
|
|
|
11066
11541
|
/**
|
|
11067
11542
|
* Returns an identity `Iso` over the schema's source (`Type`) side.
|
|
11068
11543
|
*
|
|
11544
|
+
* @stability stable
|
|
11069
11545
|
* @category constructors
|
|
11070
11546
|
* @since 4.0.0
|
|
11071
11547
|
*/
|
|
@@ -11073,6 +11549,7 @@ export declare function toIsoSource<S extends Constraint>(schema: S): Optic_.Iso
|
|
|
11073
11549
|
/**
|
|
11074
11550
|
* Returns an identity `Iso` over the schema's focus (`Iso`) side.
|
|
11075
11551
|
*
|
|
11552
|
+
* @stability stable
|
|
11076
11553
|
* @category constructors
|
|
11077
11554
|
* @since 4.0.0
|
|
11078
11555
|
*/
|
|
@@ -11080,6 +11557,7 @@ export declare function toIsoFocus<S extends Constraint>(schema: S): Optic_.Iso<
|
|
|
11080
11557
|
/**
|
|
11081
11558
|
* Type-level representation returned by {@link overrideToCodecIso}.
|
|
11082
11559
|
*
|
|
11560
|
+
* @stability stable
|
|
11083
11561
|
* @category transforming
|
|
11084
11562
|
* @since 4.0.0
|
|
11085
11563
|
*/
|
|
@@ -11107,6 +11585,7 @@ export interface overrideToCodecIso<S extends Constraint, Iso> extends BottomLaz
|
|
|
11107
11585
|
* provided `decode` and `encode` getters to transform between the schema type
|
|
11108
11586
|
* and the target codec.
|
|
11109
11587
|
*
|
|
11588
|
+
* @stability stable
|
|
11110
11589
|
* @category transforming
|
|
11111
11590
|
* @since 4.0.0
|
|
11112
11591
|
*/
|
|
@@ -11132,6 +11611,7 @@ export declare function overrideToCodecIso<S extends Constraint, Iso>(to: Constr
|
|
|
11132
11611
|
* `SchemaIssue.makeFormatterDefault()`. Invalid patch operations instead produce
|
|
11133
11612
|
* {@link JsonPatch.apply} errors.
|
|
11134
11613
|
*
|
|
11614
|
+
* @stability stable
|
|
11135
11615
|
* @category converting
|
|
11136
11616
|
* @since 4.0.0
|
|
11137
11617
|
*/
|
|
@@ -11140,6 +11620,7 @@ export declare function toDifferJsonPatch<T>(schema: ConstraintCodec<T, unknown>
|
|
|
11140
11620
|
* Recursive tree type whose leaves are `Node` values and whose branches are
|
|
11141
11621
|
* readonly arrays or string-keyed records of child trees.
|
|
11142
11622
|
*
|
|
11623
|
+
* @stability stable
|
|
11143
11624
|
* @category models
|
|
11144
11625
|
* @since 4.0.0
|
|
11145
11626
|
*/
|
|
@@ -11148,6 +11629,7 @@ export type Tree<Node> = Node | TreeRecord<Node> | ReadonlyArray<Tree<Node>>;
|
|
|
11148
11629
|
* A record node in a {@link Tree}: an object mapping string keys to child
|
|
11149
11630
|
* `Tree` nodes.
|
|
11150
11631
|
*
|
|
11632
|
+
* @stability stable
|
|
11151
11633
|
* @category models
|
|
11152
11634
|
* @since 4.0.0
|
|
11153
11635
|
*/
|
|
@@ -11159,6 +11641,7 @@ export interface TreeRecord<A> {
|
|
|
11159
11641
|
* The resulting schema accepts a single node value, an array of trees, or an
|
|
11160
11642
|
* object whose values are trees.
|
|
11161
11643
|
*
|
|
11644
|
+
* @stability stable
|
|
11162
11645
|
* @category schemas
|
|
11163
11646
|
* @since 4.0.0
|
|
11164
11647
|
*/
|
|
@@ -11169,6 +11652,7 @@ export declare function Tree<S extends Constraint>(node: S): Union<readonly [S,
|
|
|
11169
11652
|
* readonly record of `string → Json`. For the corresponding schema, see the
|
|
11170
11653
|
* {@link Json} const.
|
|
11171
11654
|
*
|
|
11655
|
+
* @stability stable
|
|
11172
11656
|
* @category models
|
|
11173
11657
|
* @since 4.0.0
|
|
11174
11658
|
*/
|
|
@@ -11176,6 +11660,7 @@ export type Json = null | number | boolean | string | JsonArray | JsonObject;
|
|
|
11176
11660
|
/**
|
|
11177
11661
|
* A readonly array of {@link Json} values.
|
|
11178
11662
|
*
|
|
11663
|
+
* @stability stable
|
|
11179
11664
|
* @category models
|
|
11180
11665
|
* @since 4.0.0
|
|
11181
11666
|
*/
|
|
@@ -11184,6 +11669,7 @@ export interface JsonArray extends ReadonlyArray<Json> {
|
|
|
11184
11669
|
/**
|
|
11185
11670
|
* A readonly record whose values are {@link Json} values.
|
|
11186
11671
|
*
|
|
11672
|
+
* @stability stable
|
|
11187
11673
|
* @category models
|
|
11188
11674
|
* @since 4.0.0
|
|
11189
11675
|
*/
|
|
@@ -11201,6 +11687,7 @@ export interface JsonObject {
|
|
|
11201
11687
|
* Schema.decodeUnknownOption(Schema.Json)({ key: [1, true, null] }) // => Option.some({ key: [1, true, null] })
|
|
11202
11688
|
* ```
|
|
11203
11689
|
*
|
|
11690
|
+
* @stability stable
|
|
11204
11691
|
* @category schemas
|
|
11205
11692
|
* @since 4.0.0
|
|
11206
11693
|
*/
|
|
@@ -11222,6 +11709,7 @@ export declare const Json: Codec<Json>;
|
|
|
11222
11709
|
* ```
|
|
11223
11710
|
*
|
|
11224
11711
|
* @see {@link Json} for a schema that also accepts JSON arrays and primitive values
|
|
11712
|
+
* @stability stable
|
|
11225
11713
|
* @category schemas
|
|
11226
11714
|
* @since 4.0.0
|
|
11227
11715
|
*/
|
|
@@ -11230,6 +11718,7 @@ export declare const JsonObject: $Record<String, Codec<Json, Json, never, never>
|
|
|
11230
11718
|
* Recursive TypeScript type for mutable JSON values: `null`, `number`,
|
|
11231
11719
|
* `boolean`, `string`, mutable arrays, or mutable string-keyed records.
|
|
11232
11720
|
*
|
|
11721
|
+
* @stability stable
|
|
11233
11722
|
* @category models
|
|
11234
11723
|
* @since 4.0.0
|
|
11235
11724
|
*/
|
|
@@ -11237,6 +11726,7 @@ export type MutableJson = null | number | boolean | string | MutableJsonArray |
|
|
|
11237
11726
|
/**
|
|
11238
11727
|
* A mutable array of {@link MutableJson} values.
|
|
11239
11728
|
*
|
|
11729
|
+
* @stability stable
|
|
11240
11730
|
* @category models
|
|
11241
11731
|
* @since 4.0.0
|
|
11242
11732
|
*/
|
|
@@ -11245,6 +11735,7 @@ export interface MutableJsonArray extends Array<MutableJson> {
|
|
|
11245
11735
|
/**
|
|
11246
11736
|
* A mutable record whose values are {@link MutableJson} values.
|
|
11247
11737
|
*
|
|
11738
|
+
* @stability stable
|
|
11248
11739
|
* @category models
|
|
11249
11740
|
* @since 4.0.0
|
|
11250
11741
|
*/
|
|
@@ -11255,6 +11746,7 @@ export interface MutableJsonObject {
|
|
|
11255
11746
|
* Schema that accepts any mutable JSON-compatible value. See {@link Json} for
|
|
11256
11747
|
* the immutable variant.
|
|
11257
11748
|
*
|
|
11749
|
+
* @stability stable
|
|
11258
11750
|
* @category schemas
|
|
11259
11751
|
* @since 4.0.0
|
|
11260
11752
|
*/
|
|
@@ -11265,6 +11757,7 @@ export declare const MutableJson: Codec<MutableJson>;
|
|
|
11265
11757
|
* annotations are taken from the last check; otherwise they are taken from
|
|
11266
11758
|
* the base schema instance.
|
|
11267
11759
|
*
|
|
11760
|
+
* @stability stable
|
|
11268
11761
|
* @category getters
|
|
11269
11762
|
* @since 4.0.0
|
|
11270
11763
|
*/
|
|
@@ -11274,6 +11767,7 @@ export declare function resolveAnnotations<S extends Constraint>(schema: S): Ann
|
|
|
11274
11767
|
* annotations are those attached via `annotateKey` and live on the AST's
|
|
11275
11768
|
* `context` rather than on the schema node itself.
|
|
11276
11769
|
*
|
|
11770
|
+
* @stability stable
|
|
11277
11771
|
* @category getters
|
|
11278
11772
|
* @since 4.0.0
|
|
11279
11773
|
*/
|
|
@@ -11288,6 +11782,7 @@ export declare function resolveAnnotationsKey<S extends Constraint>(schema: S):
|
|
|
11288
11782
|
* Use {@link resolveAnnotations} to read the annotations attached to a schema at
|
|
11289
11783
|
* runtime.
|
|
11290
11784
|
*
|
|
11785
|
+
* @stability stable
|
|
11291
11786
|
* @category models
|
|
11292
11787
|
* @since 4.0.0
|
|
11293
11788
|
*/
|