effect 4.0.1 → 4.0.3
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 +27 -7
- 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 +60 -0
- 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 +24 -3
- 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 +38 -5
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +11 -2
- 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 +180 -6
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +98 -6
- 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 +96 -6
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +80 -8
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +527 -0
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +240 -5
- 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 +59 -2
- 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 +9 -0
- 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 +19 -0
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +8 -1
- 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 +8 -0
- 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 +969 -2
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +635 -5
- 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 +26 -3
- 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 +14 -1
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +6 -0
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +569 -11
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +266 -18
- 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.map +1 -1
- package/dist/ai/LanguageModel.js +14 -13
- package/dist/ai/LanguageModel.js.map +1 -1
- package/dist/ai/McpServer.d.ts +38 -11
- package/dist/ai/McpServer.d.ts.map +1 -1
- package/dist/ai/McpServer.js +276 -190
- package/dist/ai/McpServer.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/v2026_07_28.js +5 -0
- package/dist/ai/internal/mcpProtocol/v2026_07_28.js.map +1 -1
- package/dist/ai/internal/mcpProtocol.js.map +1 -1
- package/dist/ai/internal/mcpRuntime.js +80 -46
- package/dist/ai/internal/mcpRuntime.js.map +1 -1
- package/dist/ai/internal/mcpStatefulRuntime.js +1 -0
- package/dist/ai/internal/mcpStatefulRuntime.js.map +1 -1
- package/dist/cli/CliOutput.d.ts +27 -0
- package/dist/cli/CliOutput.d.ts.map +1 -1
- package/dist/cli/CliOutput.js +33 -10
- package/dist/cli/CliOutput.js.map +1 -1
- package/dist/cli/Command.d.ts.map +1 -1
- package/dist/cli/Command.js +6 -3
- package/dist/cli/Command.js.map +1 -1
- package/dist/cli/Completions.d.ts +3 -3
- package/dist/cli/Completions.d.ts.map +1 -1
- package/dist/cli/Completions.js +8 -5
- package/dist/cli/Completions.js.map +1 -1
- package/dist/cli/GlobalFlag.d.ts +5 -4
- package/dist/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/cli/GlobalFlag.js +3 -3
- package/dist/cli/GlobalFlag.js.map +1 -1
- package/dist/cli/Prompt.d.ts +17 -1
- package/dist/cli/Prompt.d.ts.map +1 -1
- package/dist/cli/Prompt.js +119 -114
- package/dist/cli/Prompt.js.map +1 -1
- package/dist/cli/internal/ansi.d.ts +0 -1
- package/dist/cli/internal/ansi.d.ts.map +1 -1
- package/dist/cli/internal/ansi.js +20 -3
- package/dist/cli/internal/ansi.js.map +1 -1
- package/dist/cli/internal/completions/powershell.d.ts +2 -0
- package/dist/cli/internal/completions/powershell.d.ts.map +1 -0
- package/dist/cli/internal/completions/powershell.js +273 -0
- package/dist/cli/internal/completions/powershell.js.map +1 -0
- package/dist/cli/internal/completions/zsh.js +3 -2
- package/dist/cli/internal/completions/zsh.js.map +1 -1
- package/dist/cli/internal/wizard.d.ts +3 -3
- package/dist/cli/internal/wizard.d.ts.map +1 -1
- package/dist/cli/internal/wizard.js +21 -18
- package/dist/cli/internal/wizard.js.map +1 -1
- package/dist/cluster/ClusterSchema.d.ts +28 -0
- package/dist/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/cluster/ClusterSchema.js +30 -0
- package/dist/cluster/ClusterSchema.js.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/cluster/ClusterWorkflowEngine.js +10 -18
- 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/MessageStorage.d.ts +18 -3
- package/dist/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/cluster/MessageStorage.js +31 -11
- package/dist/cluster/MessageStorage.js.map +1 -1
- package/dist/cluster/Runners.d.ts.map +1 -1
- package/dist/cluster/Runners.js +8 -2
- package/dist/cluster/Runners.js.map +1 -1
- package/dist/cluster/Sharding.d.ts.map +1 -1
- package/dist/cluster/Sharding.js +181 -62
- package/dist/cluster/Sharding.js.map +1 -1
- package/dist/cluster/SqlMessageStorage.d.ts +59 -19
- package/dist/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/cluster/SqlMessageStorage.js +84 -55
- package/dist/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/cluster/SqlRunnerStorage.d.ts +68 -19
- package/dist/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/cluster/SqlRunnerStorage.js +191 -113
- package/dist/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/cluster/internal/entityManager.js +104 -37
- package/dist/cluster/internal/entityManager.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/FindMyWay/internal/router.js +3 -6
- package/dist/http/FindMyWay/internal/router.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 +15 -0
- package/dist/http/HttpClient.d.ts.map +1 -1
- package/dist/http/HttpClient.js +79 -23
- 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 +56 -39
- 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/HttpTraceContext.d.ts.map +1 -1
- package/dist/http/HttpTraceContext.js +4 -2
- 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 -3
- package/dist/http-api/HttpApiError.d.ts.map +1 -1
- package/dist/http-api/HttpApiError.js +7 -4
- 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/effect.js +53 -46
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/schedule.js +7 -5
- package/dist/internal/schedule.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/net/AddressResolver.d.ts +145 -0
- package/dist/net/AddressResolver.d.ts.map +1 -0
- package/dist/net/AddressResolver.js +114 -0
- package/dist/net/AddressResolver.js.map +1 -0
- package/dist/net/Dns.d.ts +596 -0
- package/dist/net/Dns.d.ts.map +1 -0
- package/dist/net/Dns.js +549 -0
- package/dist/net/Dns.js.map +1 -0
- package/dist/net/Host.d.ts +320 -0
- package/dist/net/Host.d.ts.map +1 -0
- package/dist/net/Host.js +342 -0
- package/dist/net/Host.js.map +1 -0
- package/dist/net/IpInterface.d.ts +76 -3
- package/dist/net/IpInterface.d.ts.map +1 -1
- package/dist/net/IpInterface.js +53 -4
- package/dist/net/IpInterface.js.map +1 -1
- package/dist/net/IpNetwork.d.ts +82 -8
- package/dist/net/IpNetwork.d.ts.map +1 -1
- package/dist/net/IpNetwork.js +60 -4
- package/dist/net/IpNetwork.js.map +1 -1
- package/dist/net/NetAddress.d.ts +388 -35
- package/dist/net/NetAddress.d.ts.map +1 -1
- package/dist/net/NetAddress.js +350 -34
- package/dist/net/NetAddress.js.map +1 -1
- package/dist/net/index.d.ts +15 -0
- package/dist/net/index.d.ts.map +1 -1
- package/dist/net/index.js +15 -0
- package/dist/net/index.js.map +1 -1
- 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 +36 -115
- 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/PrometheusMetrics.js +1 -0
- package/dist/observability/PrometheusMetrics.js.map +1 -1
- package/dist/observability/internal/otlpProtobuf.js +32 -1
- package/dist/observability/internal/otlpProtobuf.js.map +1 -1
- package/dist/persistence/PersistedQueue.d.ts +32 -3
- package/dist/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/persistence/PersistedQueue.js +75 -16
- package/dist/persistence/PersistedQueue.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 +41 -7
- package/dist/rpc/RpcClient.d.ts.map +1 -1
- package/dist/rpc/RpcClient.js +50 -25
- package/dist/rpc/RpcClient.js.map +1 -1
- package/dist/rpc/RpcServer.d.ts +6 -0
- package/dist/rpc/RpcServer.d.ts.map +1 -1
- package/dist/rpc/RpcServer.js +59 -40
- package/dist/rpc/RpcServer.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/socket/DatagramSocket.d.ts +456 -0
- package/dist/socket/DatagramSocket.d.ts.map +1 -0
- package/dist/socket/DatagramSocket.js +535 -0
- package/dist/socket/DatagramSocket.js.map +1 -0
- package/dist/socket/Socket.d.ts +14 -1
- package/dist/socket/Socket.d.ts.map +1 -1
- package/dist/socket/Socket.js +9 -1
- package/dist/socket/Socket.js.map +1 -1
- package/dist/socket/index.d.ts +5 -0
- package/dist/socket/index.d.ts.map +1 -1
- package/dist/socket/index.js +5 -0
- package/dist/socket/index.js.map +1 -1
- package/dist/sql/Migrator.d.ts.map +1 -1
- package/dist/sql/Migrator.js +7 -2
- package/dist/sql/Migrator.js.map +1 -1
- package/dist/sql/SqlClient.d.ts +7 -1
- package/dist/sql/SqlClient.d.ts.map +1 -1
- package/dist/sql/SqlClient.js +35 -10
- 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/TestCrypto.d.ts +73 -0
- package/dist/testing/TestCrypto.d.ts.map +1 -0
- package/dist/testing/TestCrypto.js +87 -0
- package/dist/testing/TestCrypto.js.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +8 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/workflow/DurableDeferred.d.ts +54 -0
- package/dist/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/workflow/DurableDeferred.js +78 -49
- package/dist/workflow/DurableDeferred.js.map +1 -1
- package/dist/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/workflow/WorkflowEngine.js +2 -1
- 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 +50 -8
- package/src/Cause.ts +82 -0
- 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 +53 -3
- package/src/Cron.ts +32 -1
- package/src/Crypto.ts +48 -9
- package/src/Data.ts +13 -0
- package/src/DateTime.ts +180 -6
- package/src/Deferred.ts +51 -0
- package/src/Differ.ts +2 -0
- package/src/Duration.ts +126 -16
- package/src/Effect.ts +539 -5
- 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 +64 -2
- 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 +18 -0
- 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 +20 -1
- 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 +23 -0
- 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 +1168 -9
- 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 +55 -3
- 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 +16 -2
- package/src/Stream.ts +633 -26
- 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 +16 -19
- package/src/ai/McpServer.ts +169 -58
- package/src/ai/Telemetry.ts +62 -58
- package/src/ai/internal/mcpProtocol/v2026_07_28.ts +5 -0
- package/src/ai/internal/mcpProtocol.ts +3 -0
- package/src/ai/internal/mcpRuntime.ts +86 -43
- package/src/ai/internal/mcpStatefulRuntime.ts +2 -0
- package/src/cli/CliOutput.ts +33 -16
- package/src/cli/Command.ts +4 -3
- package/src/cli/Completions.ts +9 -6
- package/src/cli/GlobalFlag.ts +19 -11
- package/src/cli/Prompt.ts +159 -149
- package/src/cli/internal/ansi.ts +26 -3
- package/src/cli/internal/completions/powershell.ts +322 -0
- package/src/cli/internal/completions/zsh.ts +4 -2
- package/src/cli/internal/wizard.ts +34 -26
- package/src/cluster/ClusterSchema.ts +32 -0
- package/src/cluster/ClusterWorkflowEngine.ts +13 -24
- package/src/cluster/K8sHttpClient.ts +12 -2
- package/src/cluster/MessageStorage.ts +45 -14
- package/src/cluster/Runners.ts +8 -2
- package/src/cluster/Sharding.ts +207 -49
- package/src/cluster/SqlMessageStorage.ts +118 -84
- package/src/cluster/SqlRunnerStorage.ts +224 -128
- package/src/cluster/internal/entityManager.ts +151 -55
- 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/FindMyWay/internal/router.ts +4 -7
- package/src/http/Headers.ts +8 -2
- package/src/http/HttpClient.ts +100 -29
- package/src/http/HttpClientResponse.ts +3 -1
- package/src/http/HttpEffect.ts +11 -2
- package/src/http/HttpMiddleware.ts +60 -45
- package/src/http/HttpServer.ts +1 -1
- package/src/http/HttpTraceContext.ts +8 -2
- 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 -4
- 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/effect.ts +62 -58
- package/src/internal/schedule.ts +23 -17
- package/src/internal/schema/standardSchema.ts +2 -2
- package/src/internal/version.ts +2 -0
- package/src/net/AddressResolver.ts +222 -0
- package/src/net/Dns.ts +1035 -0
- package/src/net/Host.ts +472 -0
- package/src/net/IpInterface.ts +117 -7
- package/src/net/IpNetwork.ts +116 -17
- package/src/net/NetAddress.ts +611 -76
- package/src/net/index.ts +18 -0
- package/src/observability/OtlpExporter.ts +9 -6
- package/src/observability/OtlpLogger.ts +20 -21
- package/src/observability/OtlpMetrics.ts +46 -116
- package/src/observability/OtlpResource.ts +18 -27
- package/src/observability/OtlpTracer.ts +34 -40
- package/src/observability/PrometheusMetrics.ts +1 -0
- package/src/observability/internal/otlpProtobuf.ts +60 -0
- package/src/persistence/PersistedQueue.ts +146 -53
- 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 +87 -41
- package/src/rpc/RpcServer.ts +85 -48
- package/src/rpc/internal/tracing.ts +22 -0
- package/src/schema/SchemaCompiler/runtime.ts +4 -1
- package/src/socket/DatagramSocket.ts +919 -0
- package/src/socket/Socket.ts +22 -2
- package/src/socket/index.ts +6 -0
- package/src/sql/Migrator.ts +21 -5
- package/src/sql/SqlClient.ts +43 -19
- package/src/sql/Statement.ts +59 -7
- package/src/testing/TestClock.ts +9 -0
- package/src/testing/TestConsole.ts +8 -0
- package/src/testing/TestCrypto.ts +94 -0
- package/src/testing/index.ts +9 -0
- package/src/workflow/DurableDeferred.ts +123 -48
- package/src/workflow/WorkflowEngine.ts +2 -1
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";
|
|
@@ -29,9 +30,12 @@ import * as HashSet_ from "./HashSet.ts";
|
|
|
29
30
|
import * as Cookies_ from "./http/Cookies.ts";
|
|
30
31
|
import * as Headers_ from "./http/Headers.ts";
|
|
31
32
|
import * as UrlParams_ from "./http/UrlParams.ts";
|
|
33
|
+
import { NodeInspectSymbol } from "./Inspectable.ts";
|
|
32
34
|
import { SchemaErrorTypeId } from "./internal/schemaError.ts";
|
|
33
35
|
import type * as JsonPatch from "./JsonPatch.ts";
|
|
34
36
|
import type * as JsonSchema from "./JsonSchema.ts";
|
|
37
|
+
import * as Dns_ from "./net/Dns.ts";
|
|
38
|
+
import * as Host_ from "./net/Host.ts";
|
|
35
39
|
import * as IpInterface_ from "./net/IpInterface.ts";
|
|
36
40
|
import * as IpNetwork_ from "./net/IpNetwork.ts";
|
|
37
41
|
import * as NetAddress_ from "./net/NetAddress.ts";
|
|
@@ -59,6 +63,7 @@ declare const TypeId = "~effect/Schema/Schema";
|
|
|
59
63
|
* @see {@link optionalKey} — mark a struct field as optional
|
|
60
64
|
* @see {@link optional} — mark a struct field as optional with `| undefined`
|
|
61
65
|
*
|
|
66
|
+
* @stability stable
|
|
62
67
|
* @category models
|
|
63
68
|
* @since 4.0.0
|
|
64
69
|
*/
|
|
@@ -68,6 +73,7 @@ export type Optionality = "required" | "optional";
|
|
|
68
73
|
*
|
|
69
74
|
* @see {@link mutableKey} — mark a struct field as mutable
|
|
70
75
|
*
|
|
76
|
+
* @stability stable
|
|
71
77
|
* @category models
|
|
72
78
|
* @since 4.0.0
|
|
73
79
|
*/
|
|
@@ -78,6 +84,7 @@ export type Mutability = "readonly" | "mutable";
|
|
|
78
84
|
* @see {@link withConstructorDefault} — add a default to a schema field
|
|
79
85
|
* @see {@link tag} — creates a literal field with a constructor default
|
|
80
86
|
*
|
|
87
|
+
* @stability stable
|
|
81
88
|
* @category models
|
|
82
89
|
* @since 4.0.0
|
|
83
90
|
*/
|
|
@@ -93,6 +100,7 @@ export type ConstructorDefault = "no-default" | "with-default";
|
|
|
93
100
|
* @see {@link BottomWithoutNew.makeEffect}
|
|
94
101
|
* @see {@link BottomWithoutNew.make}
|
|
95
102
|
*
|
|
103
|
+
* @stability stable
|
|
96
104
|
* @category options
|
|
97
105
|
* @since 3.13.4
|
|
98
106
|
*/
|
|
@@ -116,6 +124,7 @@ export interface MakeOptions {
|
|
|
116
124
|
* Use as the base for schema interfaces that provide a specialized construct
|
|
117
125
|
* signature.
|
|
118
126
|
*
|
|
127
|
+
* @stability stable
|
|
119
128
|
* @category models
|
|
120
129
|
* @since 4.0.0
|
|
121
130
|
*/
|
|
@@ -236,6 +245,7 @@ export interface BottomWithoutNew<out T, out E, out RD, out RE, out Ast extends
|
|
|
236
245
|
*
|
|
237
246
|
* @see {@link BottomWithoutNew} for the schema protocol without a construct signature
|
|
238
247
|
*
|
|
248
|
+
* @stability stable
|
|
239
249
|
* @category utility types
|
|
240
250
|
* @since 4.0.0
|
|
241
251
|
*/
|
|
@@ -263,6 +273,7 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.
|
|
|
263
273
|
* @see {@link BottomWithoutNew} for the fully parameterized schema interface when every
|
|
264
274
|
* view must be supplied directly.
|
|
265
275
|
*
|
|
276
|
+
* @stability stable
|
|
266
277
|
* @category utility types
|
|
267
278
|
* @since 4.0.0
|
|
268
279
|
*/
|
|
@@ -285,6 +296,7 @@ export interface BottomLazyWithoutNew<out Ast extends SchemaAST.AST, out Rebuild
|
|
|
285
296
|
*
|
|
286
297
|
* @see {@link BottomLazyWithoutNew} for the lazy schema protocol without a construct signature
|
|
287
298
|
*
|
|
299
|
+
* @stability stable
|
|
288
300
|
* @category utility types
|
|
289
301
|
* @since 4.0.0
|
|
290
302
|
*/
|
|
@@ -294,6 +306,7 @@ export interface BottomLazy<out Ast extends SchemaAST.AST, out Rebuild extends T
|
|
|
294
306
|
/**
|
|
295
307
|
* Type-level representation returned by {@link declareConstructor}.
|
|
296
308
|
*
|
|
309
|
+
* @stability stable
|
|
297
310
|
* @category constructors
|
|
298
311
|
* @since 4.0.0
|
|
299
312
|
*/
|
|
@@ -351,6 +364,7 @@ export interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<C
|
|
|
351
364
|
* Effect.runSync(Schema.decodeUnknownEffect(schema)({ value: 1 })) // => { value: 1 }
|
|
352
365
|
* ```
|
|
353
366
|
*
|
|
367
|
+
* @stability stable
|
|
354
368
|
* @category constructors
|
|
355
369
|
* @since 4.0.0
|
|
356
370
|
*/
|
|
@@ -358,6 +372,7 @@ export declare function declareConstructor<T, E = T, Iso = T>(): <const TypePara
|
|
|
358
372
|
/**
|
|
359
373
|
* Type-level representation returned by {@link declare}.
|
|
360
374
|
*
|
|
375
|
+
* @stability stable
|
|
361
376
|
* @category constructors
|
|
362
377
|
* @since 3.13.3
|
|
363
378
|
*/
|
|
@@ -393,6 +408,7 @@ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [
|
|
|
393
408
|
*
|
|
394
409
|
* @see {@link declareConstructor} for creating schemas for parametric types.
|
|
395
410
|
*
|
|
411
|
+
* @stability stable
|
|
396
412
|
* @category constructors
|
|
397
413
|
* @since 3.10.0
|
|
398
414
|
*/
|
|
@@ -423,6 +439,7 @@ export declare function declare<T, Iso = T>(is: (u: unknown) => u is T, annotati
|
|
|
423
439
|
* type E = typeof bottom["Encoded"] // string
|
|
424
440
|
* ```
|
|
425
441
|
*
|
|
442
|
+
* @stability stable
|
|
426
443
|
* @category utility types
|
|
427
444
|
* @since 4.0.0
|
|
428
445
|
*/
|
|
@@ -453,6 +470,7 @@ export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"]
|
|
|
453
470
|
*
|
|
454
471
|
* @see {@link annotateEncoded} to annotate the encoded side instead.
|
|
455
472
|
*
|
|
473
|
+
* @stability stable
|
|
456
474
|
* @category annotations
|
|
457
475
|
* @since 4.0.0
|
|
458
476
|
*/
|
|
@@ -483,6 +501,7 @@ export declare function annotate<S extends Top>(annotations: Annotations.Bottom<
|
|
|
483
501
|
*
|
|
484
502
|
* @see {@link annotate} to annotate the type side instead.
|
|
485
503
|
*
|
|
504
|
+
* @stability stable
|
|
486
505
|
* @category annotations
|
|
487
506
|
* @since 4.0.0
|
|
488
507
|
*/
|
|
@@ -515,6 +534,7 @@ export declare function annotateEncoded<S extends Top>(annotations: Annotations.
|
|
|
515
534
|
* schema.fields.username.ast.context?.annotations?.messageMissingKey // => "Username is required"
|
|
516
535
|
* ```
|
|
517
536
|
*
|
|
537
|
+
* @stability stable
|
|
518
538
|
* @category annotations
|
|
519
539
|
* @since 4.0.0
|
|
520
540
|
*/
|
|
@@ -534,6 +554,7 @@ export declare function annotateKey<S extends Top>(annotations: Annotations.Key<
|
|
|
534
554
|
* - {@link ConstraintDecoder}`<T, RD>` — for decode-only APIs
|
|
535
555
|
* - {@link ConstraintEncoder}`<E, RE>` — for encode-only APIs
|
|
536
556
|
*
|
|
557
|
+
* @stability stable
|
|
537
558
|
* @category models
|
|
538
559
|
* @since 4.0.0
|
|
539
560
|
*/
|
|
@@ -559,6 +580,7 @@ unknown, Mutability, Optionality, ConstructorDefault, Mutability, Optionality> {
|
|
|
559
580
|
*
|
|
560
581
|
* @see {@link Top} for the complete schema protocol.
|
|
561
582
|
*
|
|
583
|
+
* @stability stable
|
|
562
584
|
* @category models
|
|
563
585
|
* @since 4.0.0
|
|
564
586
|
*/
|
|
@@ -592,6 +614,7 @@ export interface Constraint {
|
|
|
592
614
|
* @see {@link Constraint} for the generic lightweight schema constraint.
|
|
593
615
|
* @see {@link Codec} for the full schema protocol with codec type views.
|
|
594
616
|
*
|
|
617
|
+
* @stability stable
|
|
595
618
|
* @category models
|
|
596
619
|
* @since 4.0.0
|
|
597
620
|
*/
|
|
@@ -615,6 +638,7 @@ export interface ConstraintCodec<out T, out E = T, out RD = never, out RE = neve
|
|
|
615
638
|
* @see {@link ConstraintCodec} for APIs that need both decoded and encoded codec views.
|
|
616
639
|
* @see {@link Codec} for the full schema protocol with codec type views.
|
|
617
640
|
*
|
|
641
|
+
* @stability stable
|
|
618
642
|
* @category models
|
|
619
643
|
* @since 4.0.0
|
|
620
644
|
*/
|
|
@@ -634,6 +658,7 @@ export interface ConstraintDecoder<out T, out RD = never> extends ConstraintCode
|
|
|
634
658
|
* @see {@link ConstraintCodec} for APIs that need both decoded and encoded codec views.
|
|
635
659
|
* @see {@link Codec} for the full schema protocol with codec type views.
|
|
636
660
|
*
|
|
661
|
+
* @stability stable
|
|
637
662
|
* @category models
|
|
638
663
|
* @since 4.0.0
|
|
639
664
|
*/
|
|
@@ -649,6 +674,7 @@ export interface ConstraintEncoder<out E, out RE = never> extends ConstraintCode
|
|
|
649
674
|
* exposed by {@link Constraint}, but does not call methods such as `annotate`,
|
|
650
675
|
* `check`, `rebuild`, `make`, or `makeEffect`.
|
|
651
676
|
*
|
|
677
|
+
* @stability stable
|
|
652
678
|
* @category models
|
|
653
679
|
* @since 4.0.0
|
|
654
680
|
*/
|
|
@@ -658,6 +684,7 @@ export interface ConstraintRebuildable extends Constraint {
|
|
|
658
684
|
/**
|
|
659
685
|
* Namespace of type-level helpers for {@link Schema}.
|
|
660
686
|
*
|
|
687
|
+
* @stability stable
|
|
661
688
|
* @since 3.10.0
|
|
662
689
|
*/
|
|
663
690
|
export declare namespace Schema {
|
|
@@ -708,6 +735,7 @@ export declare namespace Schema {
|
|
|
708
735
|
* @see {@link Codec} — also tracks Encoded, DecodingServices, EncodingServices
|
|
709
736
|
* @see {@link Schema.Type} — extract the decoded type at the type level
|
|
710
737
|
*
|
|
738
|
+
* @stability stable
|
|
711
739
|
* @category models
|
|
712
740
|
* @since 3.10.0
|
|
713
741
|
*/
|
|
@@ -718,6 +746,7 @@ export interface Schema<out T> extends Top {
|
|
|
718
746
|
/**
|
|
719
747
|
* Namespace of type-level helpers for {@link Codec}.
|
|
720
748
|
*
|
|
749
|
+
* @stability stable
|
|
721
750
|
* @since 4.0.0
|
|
722
751
|
*/
|
|
723
752
|
export declare namespace Codec {
|
|
@@ -810,6 +839,7 @@ export declare namespace Codec {
|
|
|
810
839
|
* @see {@link Codec.EncodingServices} — extract required encoding services
|
|
811
840
|
* @see {@link revealCodec} — helper to make TypeScript infer the full Codec type
|
|
812
841
|
*
|
|
842
|
+
* @stability stable
|
|
813
843
|
* @category models
|
|
814
844
|
* @since 4.0.0
|
|
815
845
|
*/
|
|
@@ -832,6 +862,7 @@ export interface Codec<out T, out E = T, out RD = never, out RE = never> extends
|
|
|
832
862
|
* @see {@link Codec} for preserving both decoded and encoded type information.
|
|
833
863
|
* @see {@link Encoder} for the encode-only view.
|
|
834
864
|
*
|
|
865
|
+
* @stability stable
|
|
835
866
|
* @category models
|
|
836
867
|
* @since 4.0.0
|
|
837
868
|
*/
|
|
@@ -854,6 +885,7 @@ export interface Decoder<out T, out RD = never> extends Schema<T> {
|
|
|
854
885
|
* @see {@link Codec} for preserving both decoded and encoded type information.
|
|
855
886
|
* @see {@link Decoder} for the decode-only view.
|
|
856
887
|
*
|
|
888
|
+
* @stability stable
|
|
857
889
|
* @category models
|
|
858
890
|
* @since 4.0.0
|
|
859
891
|
*/
|
|
@@ -885,6 +917,7 @@ export interface Encoder<out E, out RE = never> extends Schema<unknown> {
|
|
|
885
917
|
* type Enc = typeof codec["Encoded"] // string
|
|
886
918
|
* ```
|
|
887
919
|
*
|
|
920
|
+
* @stability stable
|
|
888
921
|
* @category utility types
|
|
889
922
|
* @since 4.0.0
|
|
890
923
|
*/
|
|
@@ -904,6 +937,7 @@ export declare function revealCodec<T, E, RD, RE>(codec: Codec<T, E, RD, RE>): C
|
|
|
904
937
|
* `Optic` automatically. You normally interact with this interface through
|
|
905
938
|
* {@link Optic_} utilities rather than constructing it directly.
|
|
906
939
|
*
|
|
940
|
+
* @stability stable
|
|
907
941
|
* @category models
|
|
908
942
|
* @since 4.0.0
|
|
909
943
|
*/
|
|
@@ -943,6 +977,7 @@ declare const SchemaError_base: new <A extends Record<string, any> = {}>(args: i
|
|
|
943
977
|
* ```
|
|
944
978
|
*
|
|
945
979
|
* @see {@link isSchemaError} for narrowing unknown values
|
|
980
|
+
* @stability stable
|
|
946
981
|
* @category errors
|
|
947
982
|
* @since 4.0.0
|
|
948
983
|
*/
|
|
@@ -952,6 +987,14 @@ export declare class SchemaError extends SchemaError_base<{
|
|
|
952
987
|
readonly [SchemaErrorTypeId]: typeof SchemaErrorTypeId;
|
|
953
988
|
constructor(issue: SchemaIssue.Issue);
|
|
954
989
|
get message(): string;
|
|
990
|
+
toJSON(): {
|
|
991
|
+
_tag: "SchemaError";
|
|
992
|
+
message: string;
|
|
993
|
+
};
|
|
994
|
+
[NodeInspectSymbol](): {
|
|
995
|
+
_tag: "SchemaError";
|
|
996
|
+
message: string;
|
|
997
|
+
};
|
|
955
998
|
toString(): string;
|
|
956
999
|
}
|
|
957
1000
|
/**
|
|
@@ -971,6 +1014,7 @@ export declare class SchemaError extends SchemaError_base<{
|
|
|
971
1014
|
* Schema.isSchemaError(error) // => true
|
|
972
1015
|
* ```
|
|
973
1016
|
*
|
|
1017
|
+
* @stability stable
|
|
974
1018
|
* @category guards
|
|
975
1019
|
* @since 4.0.0
|
|
976
1020
|
*/
|
|
@@ -1040,6 +1084,7 @@ export declare function isSchemaError(u: unknown): u is SchemaError;
|
|
|
1040
1084
|
* invalidResult.issues?.map((issue) => issue.path) // => [["name"], ["age"]]
|
|
1041
1085
|
* ```
|
|
1042
1086
|
*
|
|
1087
|
+
* @stability stable
|
|
1043
1088
|
* @category converting
|
|
1044
1089
|
* @since 4.0.0
|
|
1045
1090
|
*/
|
|
@@ -1055,6 +1100,7 @@ export declare function toStandardSchemaV1<S extends ConstraintDecoder<unknown>>
|
|
|
1055
1100
|
*
|
|
1056
1101
|
* https://github.com/standard-schema/standard-schema/pull/134
|
|
1057
1102
|
*
|
|
1103
|
+
* @stability stable
|
|
1058
1104
|
* @category converting
|
|
1059
1105
|
* @since 4.0.0
|
|
1060
1106
|
*/
|
|
@@ -1093,6 +1139,7 @@ export declare function toStandardJSONSchemaV1<S extends Constraint>(self: S): S
|
|
|
1093
1139
|
* }
|
|
1094
1140
|
* ```
|
|
1095
1141
|
*
|
|
1142
|
+
* @stability stable
|
|
1096
1143
|
* @category guards
|
|
1097
1144
|
* @since 3.10.0
|
|
1098
1145
|
*/
|
|
@@ -1142,6 +1189,7 @@ export declare const is: typeof SchemaParser.is;
|
|
|
1142
1189
|
* }
|
|
1143
1190
|
* ```
|
|
1144
1191
|
*
|
|
1192
|
+
* @stability stable
|
|
1145
1193
|
* @category guards
|
|
1146
1194
|
* @since 4.0.0
|
|
1147
1195
|
*/
|
|
@@ -1164,6 +1212,7 @@ export declare const asserts: <S extends Constraint, I>(schema: S, input: I) =>
|
|
|
1164
1212
|
*
|
|
1165
1213
|
* @see {@link SchemaParser.decodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1166
1214
|
*
|
|
1215
|
+
* @stability stable
|
|
1167
1216
|
* @category decoding
|
|
1168
1217
|
* @since 4.0.0
|
|
1169
1218
|
*/
|
|
@@ -1186,6 +1235,7 @@ export declare function decodeUnknownEffect<S extends Constraint>(schema: S, opt
|
|
|
1186
1235
|
*
|
|
1187
1236
|
* @see {@link SchemaParser.decodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1188
1237
|
*
|
|
1238
|
+
* @stability stable
|
|
1189
1239
|
* @category decoding
|
|
1190
1240
|
* @since 4.0.0
|
|
1191
1241
|
*/
|
|
@@ -1217,6 +1267,7 @@ export declare const decodeEffect: <S extends Constraint>(schema: S, options?: S
|
|
|
1217
1267
|
*
|
|
1218
1268
|
* @see {@link SchemaParser.decodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1219
1269
|
*
|
|
1270
|
+
* @stability stable
|
|
1220
1271
|
* @category decoding
|
|
1221
1272
|
* @since 4.0.0
|
|
1222
1273
|
*/
|
|
@@ -1248,6 +1299,7 @@ export declare function decodeUnknownExit<S extends ConstraintDecoder<unknown>>(
|
|
|
1248
1299
|
*
|
|
1249
1300
|
* @see {@link SchemaParser.decodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1250
1301
|
*
|
|
1302
|
+
* @stability stable
|
|
1251
1303
|
* @category decoding
|
|
1252
1304
|
* @since 4.0.0
|
|
1253
1305
|
*/
|
|
@@ -1275,6 +1327,7 @@ export declare const decodeExit: <S extends ConstraintDecoder<unknown>>(schema:
|
|
|
1275
1327
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1276
1328
|
* instead.
|
|
1277
1329
|
*
|
|
1330
|
+
* @stability stable
|
|
1278
1331
|
* @category decoding
|
|
1279
1332
|
* @since 3.10.0
|
|
1280
1333
|
*/
|
|
@@ -1301,6 +1354,7 @@ export declare const decodeUnknownOption: <S extends ConstraintDecoder<unknown>>
|
|
|
1301
1354
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1302
1355
|
* instead.
|
|
1303
1356
|
*
|
|
1357
|
+
* @stability stable
|
|
1304
1358
|
* @category decoding
|
|
1305
1359
|
* @since 3.10.0
|
|
1306
1360
|
*/
|
|
@@ -1331,6 +1385,7 @@ export declare const decodeOption: <S extends ConstraintDecoder<unknown>>(schema
|
|
|
1331
1385
|
*
|
|
1332
1386
|
* @see {@link SchemaParser.decodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1333
1387
|
*
|
|
1388
|
+
* @stability stable
|
|
1334
1389
|
* @category decoding
|
|
1335
1390
|
* @since 4.0.0
|
|
1336
1391
|
*/
|
|
@@ -1360,6 +1415,7 @@ export declare function decodeUnknownResult<S extends ConstraintDecoder<unknown>
|
|
|
1360
1415
|
*
|
|
1361
1416
|
* @see {@link SchemaParser.decodeResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1362
1417
|
*
|
|
1418
|
+
* @stability stable
|
|
1363
1419
|
* @category decoding
|
|
1364
1420
|
* @since 4.0.0
|
|
1365
1421
|
*/
|
|
@@ -1388,6 +1444,7 @@ export declare const decodeResult: <S extends ConstraintDecoder<unknown>>(schema
|
|
|
1388
1444
|
*
|
|
1389
1445
|
* @see {@link SchemaParser.decodeUnknownPromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1390
1446
|
*
|
|
1447
|
+
* @stability stable
|
|
1391
1448
|
* @category decoding
|
|
1392
1449
|
* @since 3.10.0
|
|
1393
1450
|
*/
|
|
@@ -1416,6 +1473,7 @@ export declare function decodeUnknownPromise<S extends ConstraintDecoder<unknown
|
|
|
1416
1473
|
*
|
|
1417
1474
|
* @see {@link SchemaParser.decodePromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1418
1475
|
*
|
|
1476
|
+
* @stability stable
|
|
1419
1477
|
* @category decoding
|
|
1420
1478
|
* @since 3.10.0
|
|
1421
1479
|
*/
|
|
@@ -1454,6 +1512,7 @@ export declare const decodePromise: <S extends ConstraintDecoder<unknown>>(schem
|
|
|
1454
1512
|
*
|
|
1455
1513
|
* @see {@link SchemaParser.decodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1456
1514
|
*
|
|
1515
|
+
* @stability stable
|
|
1457
1516
|
* @category decoding
|
|
1458
1517
|
* @since 4.0.0
|
|
1459
1518
|
*/
|
|
@@ -1481,6 +1540,7 @@ export declare function decodeUnknownSync<S extends ConstraintDecoder<unknown>>(
|
|
|
1481
1540
|
*
|
|
1482
1541
|
* @see {@link SchemaParser.decodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1483
1542
|
*
|
|
1543
|
+
* @stability stable
|
|
1484
1544
|
* @category decoding
|
|
1485
1545
|
* @since 4.0.0
|
|
1486
1546
|
*/
|
|
@@ -1513,6 +1573,7 @@ export declare const decodeSync: <S extends ConstraintDecoder<unknown>>(schema:
|
|
|
1513
1573
|
*
|
|
1514
1574
|
* @see {@link SchemaParser.encodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1515
1575
|
*
|
|
1576
|
+
* @stability stable
|
|
1516
1577
|
* @category encoding
|
|
1517
1578
|
* @since 4.0.0
|
|
1518
1579
|
*/
|
|
@@ -1535,6 +1596,7 @@ export declare function encodeUnknownEffect<S extends Constraint>(schema: S, opt
|
|
|
1535
1596
|
*
|
|
1536
1597
|
* @see {@link SchemaParser.encodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1537
1598
|
*
|
|
1599
|
+
* @stability stable
|
|
1538
1600
|
* @category encoding
|
|
1539
1601
|
* @since 4.0.0
|
|
1540
1602
|
*/
|
|
@@ -1565,6 +1627,7 @@ export declare const encodeEffect: <S extends Constraint>(schema: S, options?: S
|
|
|
1565
1627
|
*
|
|
1566
1628
|
* @see {@link SchemaParser.encodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1567
1629
|
*
|
|
1630
|
+
* @stability stable
|
|
1568
1631
|
* @category encoding
|
|
1569
1632
|
* @since 4.0.0
|
|
1570
1633
|
*/
|
|
@@ -1596,6 +1659,7 @@ export declare function encodeUnknownExit<S extends ConstraintEncoder<unknown>>(
|
|
|
1596
1659
|
*
|
|
1597
1660
|
* @see {@link SchemaParser.encodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly
|
|
1598
1661
|
*
|
|
1662
|
+
* @stability stable
|
|
1599
1663
|
* @category encoding
|
|
1600
1664
|
* @since 4.0.0
|
|
1601
1665
|
*/
|
|
@@ -1623,6 +1687,7 @@ export declare const encodeExit: <S extends ConstraintEncoder<unknown>>(schema:
|
|
|
1623
1687
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1624
1688
|
* instead.
|
|
1625
1689
|
*
|
|
1690
|
+
* @stability stable
|
|
1626
1691
|
* @category encoding
|
|
1627
1692
|
* @since 3.10.0
|
|
1628
1693
|
*/
|
|
@@ -1649,6 +1714,7 @@ export declare const encodeUnknownOption: <S extends ConstraintEncoder<unknown>>
|
|
|
1649
1714
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
1650
1715
|
* instead.
|
|
1651
1716
|
*
|
|
1717
|
+
* @stability stable
|
|
1652
1718
|
* @category encoding
|
|
1653
1719
|
* @since 3.10.0
|
|
1654
1720
|
*/
|
|
@@ -1678,6 +1744,7 @@ export declare const encodeOption: <S extends ConstraintEncoder<unknown>>(schema
|
|
|
1678
1744
|
*
|
|
1679
1745
|
* @see {@link SchemaParser.encodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1680
1746
|
*
|
|
1747
|
+
* @stability stable
|
|
1681
1748
|
* @category encoding
|
|
1682
1749
|
* @since 4.0.0
|
|
1683
1750
|
*/
|
|
@@ -1707,6 +1774,7 @@ export declare function encodeUnknownResult<S extends ConstraintEncoder<unknown>
|
|
|
1707
1774
|
*
|
|
1708
1775
|
* @see {@link SchemaParser.encodeResult} for the adapter that fails with `SchemaIssue.Issue` directly
|
|
1709
1776
|
*
|
|
1777
|
+
* @stability stable
|
|
1710
1778
|
* @category encoding
|
|
1711
1779
|
* @since 4.0.0
|
|
1712
1780
|
*/
|
|
@@ -1734,6 +1802,7 @@ export declare const encodeResult: <S extends ConstraintEncoder<unknown>>(schema
|
|
|
1734
1802
|
*
|
|
1735
1803
|
* @see {@link SchemaParser.encodeUnknownPromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1736
1804
|
*
|
|
1805
|
+
* @stability stable
|
|
1737
1806
|
* @category encoding
|
|
1738
1807
|
* @since 3.10.0
|
|
1739
1808
|
*/
|
|
@@ -1762,6 +1831,7 @@ export declare function encodeUnknownPromise<S extends ConstraintEncoder<unknown
|
|
|
1762
1831
|
*
|
|
1763
1832
|
* @see {@link SchemaParser.encodePromise} for the adapter that rejects with an `Error` whose cause is `SchemaIssue.Issue`
|
|
1764
1833
|
*
|
|
1834
|
+
* @stability stable
|
|
1765
1835
|
* @category encoding
|
|
1766
1836
|
* @since 3.10.0
|
|
1767
1837
|
*/
|
|
@@ -1789,6 +1859,7 @@ export declare const encodePromise: <S extends ConstraintEncoder<unknown>>(schem
|
|
|
1789
1859
|
*
|
|
1790
1860
|
* @see {@link SchemaParser.encodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1791
1861
|
*
|
|
1862
|
+
* @stability stable
|
|
1792
1863
|
* @category encoding
|
|
1793
1864
|
* @since 4.0.0
|
|
1794
1865
|
*/
|
|
@@ -1814,6 +1885,7 @@ export declare function encodeUnknownSync<S extends ConstraintEncoder<unknown>>(
|
|
|
1814
1885
|
*
|
|
1815
1886
|
* @see {@link SchemaParser.encodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue`
|
|
1816
1887
|
*
|
|
1888
|
+
* @stability stable
|
|
1817
1889
|
* @category encoding
|
|
1818
1890
|
* @since 4.0.0
|
|
1819
1891
|
*/
|
|
@@ -1832,6 +1904,7 @@ export declare const encodeSync: <S extends ConstraintEncoder<unknown>>(schema:
|
|
|
1832
1904
|
* the bridge between the untyped AST representation and the strongly-typed
|
|
1833
1905
|
* schema.
|
|
1834
1906
|
*
|
|
1907
|
+
* @stability stable
|
|
1835
1908
|
* @category constructors
|
|
1836
1909
|
* @since 3.10.0
|
|
1837
1910
|
*/
|
|
@@ -1839,6 +1912,7 @@ export declare const make: <S extends Constraint>(ast: S["ast"], options?: objec
|
|
|
1839
1912
|
/**
|
|
1840
1913
|
* Checks whether a value is a `Schema`.
|
|
1841
1914
|
*
|
|
1915
|
+
* @stability stable
|
|
1842
1916
|
* @category guards
|
|
1843
1917
|
* @since 3.10.0
|
|
1844
1918
|
*/
|
|
@@ -1846,6 +1920,7 @@ export declare function isSchema(u: unknown): u is Top;
|
|
|
1846
1920
|
/**
|
|
1847
1921
|
* Type-level representation returned by {@link optionalKey}.
|
|
1848
1922
|
*
|
|
1923
|
+
* @stability stable
|
|
1849
1924
|
* @category models
|
|
1850
1925
|
* @since 4.0.0
|
|
1851
1926
|
*/
|
|
@@ -1882,6 +1957,7 @@ interface optionalKeyLambda extends Lambda {
|
|
|
1882
1957
|
* type Person = typeof schema["Type"]
|
|
1883
1958
|
* ```
|
|
1884
1959
|
*
|
|
1960
|
+
* @stability stable
|
|
1885
1961
|
* @category combinators
|
|
1886
1962
|
* @since 4.0.0
|
|
1887
1963
|
*/
|
|
@@ -1898,6 +1974,7 @@ interface requiredKeyLambda extends Lambda {
|
|
|
1898
1974
|
* Use to remove optional-key wrapping from a schema field that was previously
|
|
1899
1975
|
* wrapped with {@link optionalKey}.
|
|
1900
1976
|
*
|
|
1977
|
+
* @stability stable
|
|
1901
1978
|
* @category combinators
|
|
1902
1979
|
* @since 4.0.0
|
|
1903
1980
|
*/
|
|
@@ -1905,6 +1982,7 @@ export declare const requiredKey: requiredKeyLambda;
|
|
|
1905
1982
|
/**
|
|
1906
1983
|
* Type-level representation returned by {@link optional}.
|
|
1907
1984
|
*
|
|
1985
|
+
* @stability stable
|
|
1908
1986
|
* @category models
|
|
1909
1987
|
* @since 3.10.0
|
|
1910
1988
|
*/
|
|
@@ -1941,6 +2019,7 @@ interface optionalLambda extends Lambda {
|
|
|
1941
2019
|
* type Person = typeof schema.Type
|
|
1942
2020
|
* ```
|
|
1943
2021
|
*
|
|
2022
|
+
* @stability stable
|
|
1944
2023
|
* @category combinators
|
|
1945
2024
|
* @since 3.10.0
|
|
1946
2025
|
*/
|
|
@@ -1961,6 +2040,7 @@ interface requiredLambda extends Lambda {
|
|
|
1961
2040
|
*
|
|
1962
2041
|
* This also unwraps the `UndefinedOr` member added by `optional`.
|
|
1963
2042
|
*
|
|
2043
|
+
* @stability stable
|
|
1964
2044
|
* @category combinators
|
|
1965
2045
|
* @since 3.10.0
|
|
1966
2046
|
*/
|
|
@@ -1968,6 +2048,7 @@ export declare const required: requiredLambda;
|
|
|
1968
2048
|
/**
|
|
1969
2049
|
* Type-level representation returned by {@link mutableKey}.
|
|
1970
2050
|
*
|
|
2051
|
+
* @stability stable
|
|
1971
2052
|
* @category models
|
|
1972
2053
|
* @since 4.0.0
|
|
1973
2054
|
*/
|
|
@@ -1989,6 +2070,7 @@ interface mutableKeyLambda extends Lambda {
|
|
|
1989
2070
|
* Makes a struct field mutable (removes the `readonly` modifier on the property).
|
|
1990
2071
|
* Use {@link readonlyKey} to reverse.
|
|
1991
2072
|
*
|
|
2073
|
+
* @stability stable
|
|
1992
2074
|
* @category combinators
|
|
1993
2075
|
* @since 4.0.0
|
|
1994
2076
|
*/
|
|
@@ -2005,6 +2087,7 @@ interface readonlyKeyLambda extends Lambda {
|
|
|
2005
2087
|
* Use to remove mutable-key wrapping from a schema field that was previously
|
|
2006
2088
|
* wrapped with {@link mutableKey}.
|
|
2007
2089
|
*
|
|
2090
|
+
* @stability stable
|
|
2008
2091
|
* @category combinators
|
|
2009
2092
|
* @since 4.0.0
|
|
2010
2093
|
*/
|
|
@@ -2012,6 +2095,7 @@ export declare const readonlyKey: readonlyKeyLambda;
|
|
|
2012
2095
|
/**
|
|
2013
2096
|
* Type-level representation returned by {@link toType}.
|
|
2014
2097
|
*
|
|
2098
|
+
* @stability stable
|
|
2015
2099
|
* @category transforming
|
|
2016
2100
|
* @since 4.0.0
|
|
2017
2101
|
*/
|
|
@@ -2033,6 +2117,7 @@ interface toTypeLambda extends Lambda {
|
|
|
2033
2117
|
* Extracts the type-side schema: sets `Encoded` to equal the decoded `Type`,
|
|
2034
2118
|
* discarding the encoding transformation path.
|
|
2035
2119
|
*
|
|
2120
|
+
* @stability stable
|
|
2036
2121
|
* @category transforming
|
|
2037
2122
|
* @since 4.0.0
|
|
2038
2123
|
*/
|
|
@@ -2040,6 +2125,7 @@ export declare const toType: toTypeLambda;
|
|
|
2040
2125
|
/**
|
|
2041
2126
|
* Type-level representation returned by {@link toEncoded}.
|
|
2042
2127
|
*
|
|
2128
|
+
* @stability stable
|
|
2043
2129
|
* @category transforming
|
|
2044
2130
|
* @since 4.0.0
|
|
2045
2131
|
*/
|
|
@@ -2061,6 +2147,7 @@ interface toEncodedLambda extends Lambda {
|
|
|
2061
2147
|
* Extracts the encoded-side schema: sets `Type` to equal the `Encoded`,
|
|
2062
2148
|
* discarding the decoding transformation path.
|
|
2063
2149
|
*
|
|
2150
|
+
* @stability stable
|
|
2064
2151
|
* @category transforming
|
|
2065
2152
|
* @since 4.0.0
|
|
2066
2153
|
*/
|
|
@@ -2069,6 +2156,7 @@ declare const FlipTypeId = "~effect/Schema/flip";
|
|
|
2069
2156
|
/**
|
|
2070
2157
|
* Type-level representation returned by {@link flip}.
|
|
2071
2158
|
*
|
|
2159
|
+
* @stability stable
|
|
2072
2160
|
* @category transforming
|
|
2073
2161
|
* @since 4.0.0
|
|
2074
2162
|
*/
|
|
@@ -2104,6 +2192,7 @@ export interface flip<S extends Top> extends BottomLazy<SchemaAST.AST, flip<S>,
|
|
|
2104
2192
|
* Schema.decodeSync(flipped)(42) // => "42"
|
|
2105
2193
|
* ```
|
|
2106
2194
|
*
|
|
2195
|
+
* @stability stable
|
|
2107
2196
|
* @category transforming
|
|
2108
2197
|
* @since 4.0.0
|
|
2109
2198
|
*/
|
|
@@ -2111,6 +2200,7 @@ export declare function flip<S extends Top>(schema: S): S extends flip<infer F>
|
|
|
2111
2200
|
/**
|
|
2112
2201
|
* Type-level representation returned by {@link Literal}.
|
|
2113
2202
|
*
|
|
2203
|
+
* @stability stable
|
|
2114
2204
|
* @category models
|
|
2115
2205
|
* @since 3.10.0
|
|
2116
2206
|
*/
|
|
@@ -2134,6 +2224,7 @@ export interface Literal<L extends SchemaAST.LiteralValue> extends Bottom<L, L,
|
|
|
2134
2224
|
* @see {@link Literals} for a schema that represents a union of literals.
|
|
2135
2225
|
* @see {@link tag} for a schema that represents a literal value that can be
|
|
2136
2226
|
* used as a discriminator field in tagged unions and has a constructor default.
|
|
2227
|
+
* @stability stable
|
|
2137
2228
|
* @category constructors
|
|
2138
2229
|
* @since 3.10.0
|
|
2139
2230
|
*/
|
|
@@ -2141,6 +2232,7 @@ export declare function Literal<L extends SchemaAST.LiteralValue>(literal: L): L
|
|
|
2141
2232
|
/**
|
|
2142
2233
|
* Namespace for {@link TemplateLiteral} helper types.
|
|
2143
2234
|
*
|
|
2235
|
+
* @stability stable
|
|
2144
2236
|
* @since 3.10.0
|
|
2145
2237
|
*/
|
|
2146
2238
|
export declare namespace TemplateLiteral {
|
|
@@ -2197,6 +2289,7 @@ export declare namespace TemplateLiteral {
|
|
|
2197
2289
|
/**
|
|
2198
2290
|
* Type-level representation returned by {@link TemplateLiteral}.
|
|
2199
2291
|
*
|
|
2292
|
+
* @stability stable
|
|
2200
2293
|
* @category models
|
|
2201
2294
|
* @since 3.10.0
|
|
2202
2295
|
*/
|
|
@@ -2235,6 +2328,7 @@ export interface TemplateLiteral<Parts extends TemplateLiteral.Parts> extends Bo
|
|
|
2235
2328
|
* ```
|
|
2236
2329
|
*
|
|
2237
2330
|
* @see {@link TemplateLiteralParser} for a schema that also parses matched parts into a tuple.
|
|
2331
|
+
* @stability stable
|
|
2238
2332
|
* @category constructors
|
|
2239
2333
|
* @since 3.10.0
|
|
2240
2334
|
*/
|
|
@@ -2242,6 +2336,7 @@ export declare function TemplateLiteral<const Parts extends TemplateLiteral.Part
|
|
|
2242
2336
|
/**
|
|
2243
2337
|
* Namespace for {@link TemplateLiteralParser} helper types.
|
|
2244
2338
|
*
|
|
2339
|
+
* @stability stable
|
|
2245
2340
|
* @since 3.10.0
|
|
2246
2341
|
*/
|
|
2247
2342
|
export declare namespace TemplateLiteralParser {
|
|
@@ -2265,6 +2360,7 @@ export declare namespace TemplateLiteralParser {
|
|
|
2265
2360
|
/**
|
|
2266
2361
|
* Type-level representation returned by {@link TemplateLiteralParser}.
|
|
2267
2362
|
*
|
|
2363
|
+
* @stability stable
|
|
2268
2364
|
* @category models
|
|
2269
2365
|
* @since 3.10.0
|
|
2270
2366
|
*/
|
|
@@ -2310,6 +2406,7 @@ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> exte
|
|
|
2310
2406
|
* ```
|
|
2311
2407
|
*
|
|
2312
2408
|
* @see {@link TemplateLiteral} for a validation-only version that keeps the string encoded.
|
|
2409
|
+
* @stability stable
|
|
2313
2410
|
* @category constructors
|
|
2314
2411
|
* @since 3.10.0
|
|
2315
2412
|
*/
|
|
@@ -2317,6 +2414,7 @@ export declare function TemplateLiteralParser<const Parts extends TemplateLitera
|
|
|
2317
2414
|
/**
|
|
2318
2415
|
* Type-level representation returned by {@link Enum}.
|
|
2319
2416
|
*
|
|
2417
|
+
* @stability stable
|
|
2320
2418
|
* @category models
|
|
2321
2419
|
* @since 4.0.0
|
|
2322
2420
|
*/
|
|
@@ -2347,6 +2445,7 @@ export interface Enum<A extends {
|
|
|
2347
2445
|
* Schema.decodeSync(schema)(Direction.Up) // => "Up"
|
|
2348
2446
|
* ```
|
|
2349
2447
|
*
|
|
2448
|
+
* @stability stable
|
|
2350
2449
|
* @category constructors
|
|
2351
2450
|
* @since 4.0.0
|
|
2352
2451
|
*/
|
|
@@ -2356,6 +2455,7 @@ export declare function Enum<A extends {
|
|
|
2356
2455
|
/**
|
|
2357
2456
|
* Type-level representation of {@link Never}.
|
|
2358
2457
|
*
|
|
2458
|
+
* @stability stable
|
|
2359
2459
|
* @category models
|
|
2360
2460
|
* @since 3.10.0
|
|
2361
2461
|
*/
|
|
@@ -2364,6 +2464,7 @@ export interface Never extends Bottom<never, never, never, never, SchemaAST.Neve
|
|
|
2364
2464
|
/**
|
|
2365
2465
|
* Schema for the `never` type. Always fails validation — no value satisfies it.
|
|
2366
2466
|
*
|
|
2467
|
+
* @stability stable
|
|
2367
2468
|
* @category schemas
|
|
2368
2469
|
* @since 3.10.0
|
|
2369
2470
|
*/
|
|
@@ -2371,6 +2472,7 @@ export declare const Never: Never;
|
|
|
2371
2472
|
/**
|
|
2372
2473
|
* Type-level representation of {@link Any}.
|
|
2373
2474
|
*
|
|
2475
|
+
* @stability stable
|
|
2374
2476
|
* @category models
|
|
2375
2477
|
* @since 3.10.0
|
|
2376
2478
|
*/
|
|
@@ -2380,6 +2482,7 @@ export interface Any extends Bottom<any, any, never, never, SchemaAST.Any, Any>
|
|
|
2380
2482
|
* Schema for the `any` type. Accepts any value without validation.
|
|
2381
2483
|
*
|
|
2382
2484
|
* @see {@link Unknown} for a safer alternative that uses `unknown`.
|
|
2485
|
+
* @stability stable
|
|
2383
2486
|
* @category schemas
|
|
2384
2487
|
* @since 3.10.0
|
|
2385
2488
|
*/
|
|
@@ -2387,6 +2490,7 @@ export declare const Any: Any;
|
|
|
2387
2490
|
/**
|
|
2388
2491
|
* Type-level representation of {@link Unknown}.
|
|
2389
2492
|
*
|
|
2493
|
+
* @stability stable
|
|
2390
2494
|
* @category models
|
|
2391
2495
|
* @since 3.10.0
|
|
2392
2496
|
*/
|
|
@@ -2401,6 +2505,7 @@ export interface Unknown extends Bottom<unknown, unknown, never, never, SchemaAS
|
|
|
2401
2505
|
* TypeScript's `unknown` safety at use sites.
|
|
2402
2506
|
*
|
|
2403
2507
|
* @see {@link Any} for the `any` variant.
|
|
2508
|
+
* @stability stable
|
|
2404
2509
|
* @category schemas
|
|
2405
2510
|
* @since 3.10.0
|
|
2406
2511
|
*/
|
|
@@ -2408,6 +2513,7 @@ export declare const Unknown: Unknown;
|
|
|
2408
2513
|
/**
|
|
2409
2514
|
* Type-level representation of {@link Null}.
|
|
2410
2515
|
*
|
|
2516
|
+
* @stability stable
|
|
2411
2517
|
* @category models
|
|
2412
2518
|
* @since 3.10.0
|
|
2413
2519
|
*/
|
|
@@ -2417,6 +2523,7 @@ export interface Null extends Bottom<null, null, never, never, SchemaAST.Null, N
|
|
|
2417
2523
|
* Schema for the `null` literal. Validates that the input is strictly `null`.
|
|
2418
2524
|
*
|
|
2419
2525
|
* @see {@link NullOr} for a union with another schema.
|
|
2526
|
+
* @stability stable
|
|
2420
2527
|
* @category schemas
|
|
2421
2528
|
* @since 3.10.0
|
|
2422
2529
|
*/
|
|
@@ -2424,6 +2531,7 @@ export declare const Null: Null;
|
|
|
2424
2531
|
/**
|
|
2425
2532
|
* Type-level representation of {@link Undefined}.
|
|
2426
2533
|
*
|
|
2534
|
+
* @stability stable
|
|
2427
2535
|
* @category models
|
|
2428
2536
|
* @since 3.10.0
|
|
2429
2537
|
*/
|
|
@@ -2433,6 +2541,7 @@ export interface Undefined extends Bottom<undefined, undefined, never, never, Sc
|
|
|
2433
2541
|
* Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
|
|
2434
2542
|
*
|
|
2435
2543
|
* @see {@link UndefinedOr} for a union with another schema.
|
|
2544
|
+
* @stability stable
|
|
2436
2545
|
* @category schemas
|
|
2437
2546
|
* @since 3.10.0
|
|
2438
2547
|
*/
|
|
@@ -2440,6 +2549,7 @@ export declare const Undefined: Undefined;
|
|
|
2440
2549
|
/**
|
|
2441
2550
|
* Type-level representation of {@link String}.
|
|
2442
2551
|
*
|
|
2552
|
+
* @stability stable
|
|
2443
2553
|
* @category models
|
|
2444
2554
|
* @since 4.0.0
|
|
2445
2555
|
*/
|
|
@@ -2448,6 +2558,7 @@ export interface String extends Bottom<string, string, never, never, SchemaAST.S
|
|
|
2448
2558
|
/**
|
|
2449
2559
|
* Schema for `string` values. Validates that the input is `typeof` `"string"`.
|
|
2450
2560
|
*
|
|
2561
|
+
* @stability stable
|
|
2451
2562
|
* @category schemas
|
|
2452
2563
|
* @since 4.0.0
|
|
2453
2564
|
*/
|
|
@@ -2455,6 +2566,7 @@ export declare const String: String;
|
|
|
2455
2566
|
/**
|
|
2456
2567
|
* Type-level representation of {@link StringForLiteralAutocomplete}.
|
|
2457
2568
|
*
|
|
2569
|
+
* @stability stable
|
|
2458
2570
|
* @category models
|
|
2459
2571
|
* @since 4.0.0
|
|
2460
2572
|
*/
|
|
@@ -2491,6 +2603,7 @@ export interface StringForLiteralAutocomplete extends Bottom<string & {}, string
|
|
|
2491
2603
|
*
|
|
2492
2604
|
* @see {@link String} for a schema whose type is plain `string`.
|
|
2493
2605
|
* @see {@link Literals} for the known literals to include in the union.
|
|
2606
|
+
* @stability stable
|
|
2494
2607
|
* @category schemas
|
|
2495
2608
|
* @since 4.0.0
|
|
2496
2609
|
*/
|
|
@@ -2498,6 +2611,7 @@ export declare const StringForLiteralAutocomplete: StringForLiteralAutocomplete;
|
|
|
2498
2611
|
/**
|
|
2499
2612
|
* Type-level representation of {@link Number}.
|
|
2500
2613
|
*
|
|
2614
|
+
* @stability stable
|
|
2501
2615
|
* @category models
|
|
2502
2616
|
* @since 4.0.0
|
|
2503
2617
|
*/
|
|
@@ -2514,6 +2628,7 @@ export interface Number extends Bottom<number, number, never, never, SchemaAST.N
|
|
|
2514
2628
|
* - Non-finite values are serialized as strings (`"NaN"`, `"Infinity"`, `"-Infinity"`).
|
|
2515
2629
|
*
|
|
2516
2630
|
* @see {@link Finite} for a schema that excludes non-finite values.
|
|
2631
|
+
* @stability stable
|
|
2517
2632
|
* @category schemas
|
|
2518
2633
|
* @since 4.0.0
|
|
2519
2634
|
*/
|
|
@@ -2521,6 +2636,7 @@ export declare const Number: Number;
|
|
|
2521
2636
|
/**
|
|
2522
2637
|
* Type-level representation of {@link Boolean}.
|
|
2523
2638
|
*
|
|
2639
|
+
* @stability stable
|
|
2524
2640
|
* @category models
|
|
2525
2641
|
* @since 4.0.0
|
|
2526
2642
|
*/
|
|
@@ -2535,6 +2651,7 @@ export interface Boolean extends Bottom<boolean, boolean, never, never, SchemaAS
|
|
|
2535
2651
|
*
|
|
2536
2652
|
* @see {@link BooleanFromBit} for a schema that decodes bit literals `0` or `1` into a boolean
|
|
2537
2653
|
*
|
|
2654
|
+
* @stability stable
|
|
2538
2655
|
* @category schemas
|
|
2539
2656
|
* @since 4.0.0
|
|
2540
2657
|
*/
|
|
@@ -2542,6 +2659,7 @@ export declare const Boolean: Boolean;
|
|
|
2542
2659
|
/**
|
|
2543
2660
|
* Type-level representation of {@link Symbol}.
|
|
2544
2661
|
*
|
|
2662
|
+
* @stability stable
|
|
2545
2663
|
* @category models
|
|
2546
2664
|
* @since 4.0.0
|
|
2547
2665
|
*/
|
|
@@ -2551,6 +2669,7 @@ export interface Symbol extends Bottom<symbol, symbol, never, never, SchemaAST.S
|
|
|
2551
2669
|
* Schema for `symbol` values. Validates that the input is `typeof` `"symbol"`.
|
|
2552
2670
|
*
|
|
2553
2671
|
* @see {@link UniqueSymbol} for a schema that matches a specific symbol.
|
|
2672
|
+
* @stability stable
|
|
2554
2673
|
* @category schemas
|
|
2555
2674
|
* @since 4.0.0
|
|
2556
2675
|
*/
|
|
@@ -2558,6 +2677,7 @@ export declare const Symbol: Symbol;
|
|
|
2558
2677
|
/**
|
|
2559
2678
|
* Type-level representation of {@link BigInt}.
|
|
2560
2679
|
*
|
|
2680
|
+
* @stability stable
|
|
2561
2681
|
* @category models
|
|
2562
2682
|
* @since 4.0.0
|
|
2563
2683
|
*/
|
|
@@ -2573,6 +2693,7 @@ export interface BigInt extends Bottom<bigint, bigint, never, never, SchemaAST.B
|
|
|
2573
2693
|
*
|
|
2574
2694
|
* @see {@link BigIntFromString} for parsing string input into a bigint
|
|
2575
2695
|
*
|
|
2696
|
+
* @stability stable
|
|
2576
2697
|
* @category schemas
|
|
2577
2698
|
* @since 4.0.0
|
|
2578
2699
|
*/
|
|
@@ -2580,6 +2701,7 @@ export declare const BigInt: BigInt;
|
|
|
2580
2701
|
/**
|
|
2581
2702
|
* Type-level representation of {@link Void}.
|
|
2582
2703
|
*
|
|
2704
|
+
* @stability stable
|
|
2583
2705
|
* @category models
|
|
2584
2706
|
* @since 3.10.0
|
|
2585
2707
|
*/
|
|
@@ -2601,6 +2723,7 @@ export interface Void extends Bottom<void, void, never, never, SchemaAST.Void, V
|
|
|
2601
2723
|
* as `void`.
|
|
2602
2724
|
*
|
|
2603
2725
|
* @see {@link Undefined} for a schema that matches only the exact `undefined` value.
|
|
2726
|
+
* @stability stable
|
|
2604
2727
|
* @category schemas
|
|
2605
2728
|
* @since 3.10.0
|
|
2606
2729
|
*/
|
|
@@ -2608,6 +2731,7 @@ export declare const Void: Void;
|
|
|
2608
2731
|
/**
|
|
2609
2732
|
* Type-level representation of {@link ObjectKeyword}.
|
|
2610
2733
|
*
|
|
2734
|
+
* @stability stable
|
|
2611
2735
|
* @category models
|
|
2612
2736
|
* @since 4.0.0
|
|
2613
2737
|
*/
|
|
@@ -2617,6 +2741,7 @@ export interface ObjectKeyword extends Bottom<object, object, never, never, Sche
|
|
|
2617
2741
|
* Schema for the `object` type. Validates that the input is a non-null object or function
|
|
2618
2742
|
* (i.e. `typeof value === "object" && value !== null || typeof value === "function"`).
|
|
2619
2743
|
*
|
|
2744
|
+
* @stability stable
|
|
2620
2745
|
* @category schemas
|
|
2621
2746
|
* @since 4.0.0
|
|
2622
2747
|
*/
|
|
@@ -2624,6 +2749,7 @@ export declare const ObjectKeyword: ObjectKeyword;
|
|
|
2624
2749
|
/**
|
|
2625
2750
|
* Type-level representation returned by {@link UniqueSymbol}.
|
|
2626
2751
|
*
|
|
2752
|
+
* @stability stable
|
|
2627
2753
|
* @category models
|
|
2628
2754
|
* @since 4.0.0
|
|
2629
2755
|
*/
|
|
@@ -2649,6 +2775,7 @@ export interface UniqueSymbol<sym extends symbol> extends Bottom<sym, sym, never
|
|
|
2649
2775
|
* ```
|
|
2650
2776
|
*
|
|
2651
2777
|
* @see {@link Symbol} for a schema that accepts any symbol.
|
|
2778
|
+
* @stability stable
|
|
2652
2779
|
* @category constructors
|
|
2653
2780
|
* @since 4.0.0
|
|
2654
2781
|
*/
|
|
@@ -2668,6 +2795,7 @@ export declare function UniqueSymbol<const sym extends symbol>(symbol: sym): Uni
|
|
|
2668
2795
|
* - `Struct.MakeIn<F>` — constructor input (optional/defaulted fields may be omitted)
|
|
2669
2796
|
* - `Struct.DecodingServices<F>` / `Struct.EncodingServices<F>` — required services
|
|
2670
2797
|
*
|
|
2798
|
+
* @stability stable
|
|
2671
2799
|
* @since 3.10.0
|
|
2672
2800
|
*/
|
|
2673
2801
|
export declare namespace Struct {
|
|
@@ -2795,6 +2923,7 @@ export declare namespace Struct {
|
|
|
2795
2923
|
/**
|
|
2796
2924
|
* Type-level representation returned by {@link Struct}.
|
|
2797
2925
|
*
|
|
2926
|
+
* @stability stable
|
|
2798
2927
|
* @category models
|
|
2799
2928
|
* @since 3.10.0
|
|
2800
2929
|
*/
|
|
@@ -2880,6 +3009,7 @@ export interface Struct<Fields extends Struct.Fields> extends BottomLazy<SchemaA
|
|
|
2880
3009
|
* Schema.decodeUnknownSync(Person)({ name: "Alice", age: 30 }) // => { name: "Alice", age: 30 }
|
|
2881
3010
|
* ```
|
|
2882
3011
|
*
|
|
3012
|
+
* @stability stable
|
|
2883
3013
|
* @category constructors
|
|
2884
3014
|
* @since 3.10.0
|
|
2885
3015
|
*/
|
|
@@ -2913,6 +3043,7 @@ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
|
|
|
2913
3043
|
* Schema.decodeSync(schema)({ a: "a", c: 1 }) // => { a: "a", c: 1 }
|
|
2914
3044
|
* ```
|
|
2915
3045
|
*
|
|
3046
|
+
* @stability stable
|
|
2916
3047
|
* @category combinators
|
|
2917
3048
|
* @since 4.0.0
|
|
2918
3049
|
*/
|
|
@@ -2920,6 +3051,7 @@ export declare function fieldsAssign<const NewFields extends Struct.Fields>(fiel
|
|
|
2920
3051
|
/**
|
|
2921
3052
|
* Type-level representation returned by {@link encodeKeys}.
|
|
2922
3053
|
*
|
|
3054
|
+
* @stability stable
|
|
2923
3055
|
* @category transforming
|
|
2924
3056
|
* @since 4.0.0
|
|
2925
3057
|
*/
|
|
@@ -2954,6 +3086,7 @@ export interface encodeKeys<S extends Constraint & {
|
|
|
2954
3086
|
* Schema.decodeUnknownSync(Encoded)({ full_name: "Alice", age: 30 }) // => { name: "Alice", age: 30 }
|
|
2955
3087
|
* ```
|
|
2956
3088
|
*
|
|
3089
|
+
* @stability stable
|
|
2957
3090
|
* @category transforming
|
|
2958
3091
|
* @since 4.0.0
|
|
2959
3092
|
*/
|
|
@@ -2989,6 +3122,7 @@ export declare function encodeKeys<S extends Constraint & {
|
|
|
2989
3122
|
* alice.fullName // => "Alice Smith"
|
|
2990
3123
|
* ```
|
|
2991
3124
|
*
|
|
3125
|
+
* @stability stable
|
|
2992
3126
|
* @category transforming
|
|
2993
3127
|
* @since 4.0.0
|
|
2994
3128
|
*/
|
|
@@ -3004,6 +3138,7 @@ export declare function extendTo<S extends Struct<Struct.Fields>, const Fields e
|
|
|
3004
3138
|
* - `Record.Type<K, V>` — decoded type of the record
|
|
3005
3139
|
* - `Record.Encoded<K, V>` — encoded type of the record
|
|
3006
3140
|
*
|
|
3141
|
+
* @stability stable
|
|
3007
3142
|
* @since 3.10.0
|
|
3008
3143
|
*/
|
|
3009
3144
|
export declare namespace Record {
|
|
@@ -3146,6 +3281,7 @@ export declare namespace Record {
|
|
|
3146
3281
|
/**
|
|
3147
3282
|
* Type-level representation returned by {@link Record}.
|
|
3148
3283
|
*
|
|
3284
|
+
* @stability stable
|
|
3149
3285
|
* @category models
|
|
3150
3286
|
* @since 4.0.0
|
|
3151
3287
|
*/
|
|
@@ -3195,6 +3331,7 @@ export interface $Record<Key extends Record.Key, Value extends Constraint> exten
|
|
|
3195
3331
|
* Schema.decodeUnknownSync(schema)({ a: 1, b: 2 }) // => { a: 1, b: 2 }
|
|
3196
3332
|
* ```
|
|
3197
3333
|
*
|
|
3334
|
+
* @stability stable
|
|
3198
3335
|
* @category constructors
|
|
3199
3336
|
* @since 3.10.0
|
|
3200
3337
|
*/
|
|
@@ -3207,6 +3344,7 @@ export declare function Record<Key extends Record.Key, Value extends Constraint>
|
|
|
3207
3344
|
* - `StructWithRest.Type<S, R>` — decoded type (struct type intersected with record types)
|
|
3208
3345
|
* - `StructWithRest.Encoded<S, R>` — encoded type
|
|
3209
3346
|
*
|
|
3347
|
+
* @stability stable
|
|
3210
3348
|
* @since 4.0.0
|
|
3211
3349
|
*/
|
|
3212
3350
|
export declare namespace StructWithRest {
|
|
@@ -3334,6 +3472,7 @@ export declare namespace StructWithRest {
|
|
|
3334
3472
|
/**
|
|
3335
3473
|
* Type-level representation returned by {@link StructWithRest}.
|
|
3336
3474
|
*
|
|
3475
|
+
* @stability stable
|
|
3337
3476
|
* @category models
|
|
3338
3477
|
* @since 4.0.0
|
|
3339
3478
|
*/
|
|
@@ -3373,6 +3512,7 @@ export interface StructWithRest<S extends StructWithRest.Objects, Records extend
|
|
|
3373
3512
|
* type T = typeof schema.Type
|
|
3374
3513
|
* ```
|
|
3375
3514
|
*
|
|
3515
|
+
* @stability stable
|
|
3376
3516
|
* @category constructors
|
|
3377
3517
|
* @since 4.0.0
|
|
3378
3518
|
*/
|
|
@@ -3387,6 +3527,7 @@ export declare function StructWithRest<const S extends StructWithRest.Objects, c
|
|
|
3387
3527
|
* - `Tuple.Encoded<E>` — encoded tuple type
|
|
3388
3528
|
* - `Tuple.MakeIn<E>` — constructor input tuple
|
|
3389
3529
|
*
|
|
3530
|
+
* @stability stable
|
|
3390
3531
|
* @since 3.10.0
|
|
3391
3532
|
*/
|
|
3392
3533
|
export declare namespace Tuple {
|
|
@@ -3484,6 +3625,7 @@ export declare namespace Tuple {
|
|
|
3484
3625
|
/**
|
|
3485
3626
|
* Type-level representation returned by {@link Tuple}.
|
|
3486
3627
|
*
|
|
3628
|
+
* @stability stable
|
|
3487
3629
|
* @category models
|
|
3488
3630
|
* @since 3.10.0
|
|
3489
3631
|
*/
|
|
@@ -3529,6 +3671,7 @@ export interface Tuple<Elements extends Tuple.Elements> extends BottomLazy<Schem
|
|
|
3529
3671
|
* Schema.decodeUnknownSync(schema)(["hello", 42]) // => ["hello", 42]
|
|
3530
3672
|
* ```
|
|
3531
3673
|
*
|
|
3674
|
+
* @stability stable
|
|
3532
3675
|
* @category constructors
|
|
3533
3676
|
* @since 3.10.0
|
|
3534
3677
|
*/
|
|
@@ -3543,6 +3686,7 @@ export declare function Tuple<const Elements extends ReadonlyArray<Constraint>>(
|
|
|
3543
3686
|
* - `TupleWithRest.Type<T, R>` — decoded type (fixed elements + rest)
|
|
3544
3687
|
* - `TupleWithRest.Encoded<T, R>` — encoded type
|
|
3545
3688
|
*
|
|
3689
|
+
* @stability stable
|
|
3546
3690
|
* @since 4.0.0
|
|
3547
3691
|
*/
|
|
3548
3692
|
export declare namespace TupleWithRest {
|
|
@@ -3652,6 +3796,7 @@ export declare namespace TupleWithRest {
|
|
|
3652
3796
|
/**
|
|
3653
3797
|
* Type-level representation returned by {@link TupleWithRest}.
|
|
3654
3798
|
*
|
|
3799
|
+
* @stability stable
|
|
3655
3800
|
* @category models
|
|
3656
3801
|
* @since 4.0.0
|
|
3657
3802
|
*/
|
|
@@ -3691,6 +3836,7 @@ export interface TupleWithRest<S extends TupleWithRest.TupleType, Rest extends T
|
|
|
3691
3836
|
* Schema.decodeUnknownSync(schema)(["hello", 1, true, false]) // => ["hello", 1, true, false]
|
|
3692
3837
|
* ```
|
|
3693
3838
|
*
|
|
3839
|
+
* @stability stable
|
|
3694
3840
|
* @category constructors
|
|
3695
3841
|
* @since 4.0.0
|
|
3696
3842
|
*/
|
|
@@ -3698,6 +3844,7 @@ export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Res
|
|
|
3698
3844
|
/**
|
|
3699
3845
|
* Type-level representation returned by {@link Array}.
|
|
3700
3846
|
*
|
|
3847
|
+
* @stability stable
|
|
3701
3848
|
* @category models
|
|
3702
3849
|
* @since 4.0.0
|
|
3703
3850
|
*/
|
|
@@ -3734,6 +3881,7 @@ export {
|
|
|
3734
3881
|
* Schema.decodeUnknownSync(schema)(["a", "b", "c"]) // => ["a", "b", "c"]
|
|
3735
3882
|
* ```
|
|
3736
3883
|
*
|
|
3884
|
+
* @stability stable
|
|
3737
3885
|
* @category constructors
|
|
3738
3886
|
* @since 4.0.0
|
|
3739
3887
|
*/
|
|
@@ -3741,6 +3889,7 @@ ArraySchema as Array };
|
|
|
3741
3889
|
/**
|
|
3742
3890
|
* Type-level representation returned by {@link NonEmptyArray}.
|
|
3743
3891
|
*
|
|
3892
|
+
* @stability stable
|
|
3744
3893
|
* @category models
|
|
3745
3894
|
* @since 3.10.0
|
|
3746
3895
|
*/
|
|
@@ -3772,6 +3921,7 @@ interface NonEmptyArrayLambda extends Lambda {
|
|
|
3772
3921
|
* Schema.decodeUnknownSync(schema)([1, 2, 3]) // => [1, 2, 3]
|
|
3773
3922
|
* ```
|
|
3774
3923
|
*
|
|
3924
|
+
* @stability stable
|
|
3775
3925
|
* @category constructors
|
|
3776
3926
|
* @since 3.10.0
|
|
3777
3927
|
*/
|
|
@@ -3779,6 +3929,7 @@ export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
|
3779
3929
|
/**
|
|
3780
3930
|
* Type-level representation returned by {@link ArrayEnsure}.
|
|
3781
3931
|
*
|
|
3932
|
+
* @stability stable
|
|
3782
3933
|
* @category constructors
|
|
3783
3934
|
* @since 3.10.0
|
|
3784
3935
|
*/
|
|
@@ -3808,6 +3959,7 @@ export interface ArrayEnsure<S extends Constraint> extends decodeTo<$Array<toTyp
|
|
|
3808
3959
|
* @see {@link Array} for accepting only array input
|
|
3809
3960
|
* @see {@link NonEmptyArray} for requiring at least one decoded element
|
|
3810
3961
|
*
|
|
3962
|
+
* @stability stable
|
|
3811
3963
|
* @category constructors
|
|
3812
3964
|
* @since 3.10.0
|
|
3813
3965
|
*/
|
|
@@ -3815,6 +3967,7 @@ export declare function ArrayEnsure<S extends Constraint>(schema: S): ArrayEnsur
|
|
|
3815
3967
|
/**
|
|
3816
3968
|
* Type-level representation returned by {@link UniqueArray}.
|
|
3817
3969
|
*
|
|
3970
|
+
* @stability stable
|
|
3818
3971
|
* @category models
|
|
3819
3972
|
* @since 4.0.0
|
|
3820
3973
|
*/
|
|
@@ -3829,6 +3982,7 @@ export interface UniqueArray<S extends Constraint> extends $Array<S> {
|
|
|
3829
3982
|
* The equivalence used to determine uniqueness is the one provided by
|
|
3830
3983
|
* `Schema.toEquivalence(item)`.
|
|
3831
3984
|
*
|
|
3985
|
+
* @stability stable
|
|
3832
3986
|
* @category constructors
|
|
3833
3987
|
* @since 4.0.0
|
|
3834
3988
|
*/
|
|
@@ -3836,6 +3990,7 @@ export declare function UniqueArray<S extends Constraint>(item: S): UniqueArray<
|
|
|
3836
3990
|
/**
|
|
3837
3991
|
* Type-level representation returned by {@link mutable}.
|
|
3838
3992
|
*
|
|
3993
|
+
* @stability stable
|
|
3839
3994
|
* @category transforming
|
|
3840
3995
|
* @since 3.10.0
|
|
3841
3996
|
*/
|
|
@@ -3882,6 +4037,7 @@ interface mutableLambda extends Lambda {
|
|
|
3882
4037
|
* value // => [1, 2, 3]
|
|
3883
4038
|
* ```
|
|
3884
4039
|
*
|
|
4040
|
+
* @stability stable
|
|
3885
4041
|
* @category transforming
|
|
3886
4042
|
* @since 3.10.0
|
|
3887
4043
|
*/
|
|
@@ -3889,6 +4045,7 @@ export declare const mutable: mutableLambda;
|
|
|
3889
4045
|
/**
|
|
3890
4046
|
* Type-level representation returned by {@link Union}.
|
|
3891
4047
|
*
|
|
4048
|
+
* @stability stable
|
|
3892
4049
|
* @category models
|
|
3893
4050
|
* @since 3.10.0
|
|
3894
4051
|
*/
|
|
@@ -3958,6 +4115,7 @@ export interface Union<Members extends ReadonlyArray<Constraint>> extends Bottom
|
|
|
3958
4115
|
* Schema.decodeUnknownSync(schema)(42) // => 42
|
|
3959
4116
|
* ```
|
|
3960
4117
|
*
|
|
4118
|
+
* @stability stable
|
|
3961
4119
|
* @category constructors
|
|
3962
4120
|
* @since 3.10.0
|
|
3963
4121
|
*/
|
|
@@ -3965,6 +4123,7 @@ export declare function Union<const Members extends ReadonlyArray<Constraint>>(m
|
|
|
3965
4123
|
/**
|
|
3966
4124
|
* Type-level representation returned by {@link Literals}.
|
|
3967
4125
|
*
|
|
4126
|
+
* @stability stable
|
|
3968
4127
|
* @category models
|
|
3969
4128
|
* @since 4.0.0
|
|
3970
4129
|
*/
|
|
@@ -3997,6 +4156,7 @@ export interface Literals<L extends ReadonlyArray<SchemaAST.LiteralValue>> exten
|
|
|
3997
4156
|
* ```
|
|
3998
4157
|
*
|
|
3999
4158
|
* @see {@link Literal} for a schema that represents a single literal.
|
|
4159
|
+
* @stability stable
|
|
4000
4160
|
* @category constructors
|
|
4001
4161
|
* @since 4.0.0
|
|
4002
4162
|
*/
|
|
@@ -4004,6 +4164,7 @@ export declare function Literals<const L extends ReadonlyArray<SchemaAST.Literal
|
|
|
4004
4164
|
/**
|
|
4005
4165
|
* Type-level representation returned by {@link NullOr}.
|
|
4006
4166
|
*
|
|
4167
|
+
* @stability stable
|
|
4007
4168
|
* @category models
|
|
4008
4169
|
* @since 3.10.0
|
|
4009
4170
|
*/
|
|
@@ -4017,6 +4178,7 @@ interface NullOrLambda extends Lambda {
|
|
|
4017
4178
|
/**
|
|
4018
4179
|
* Creates a union schema of `S | null`.
|
|
4019
4180
|
*
|
|
4181
|
+
* @stability stable
|
|
4020
4182
|
* @category constructors
|
|
4021
4183
|
* @since 3.10.0
|
|
4022
4184
|
*/
|
|
@@ -4024,6 +4186,7 @@ export declare const NullOr: NullOrLambda;
|
|
|
4024
4186
|
/**
|
|
4025
4187
|
* Type-level representation returned by {@link UndefinedOr}.
|
|
4026
4188
|
*
|
|
4189
|
+
* @stability stable
|
|
4027
4190
|
* @category models
|
|
4028
4191
|
* @since 3.10.0
|
|
4029
4192
|
*/
|
|
@@ -4037,6 +4200,7 @@ interface UndefinedOrLambda extends Lambda {
|
|
|
4037
4200
|
/**
|
|
4038
4201
|
* Creates a union schema of `S | undefined`.
|
|
4039
4202
|
*
|
|
4203
|
+
* @stability stable
|
|
4040
4204
|
* @category constructors
|
|
4041
4205
|
* @since 3.10.0
|
|
4042
4206
|
*/
|
|
@@ -4044,6 +4208,7 @@ export declare const UndefinedOr: UndefinedOrLambda;
|
|
|
4044
4208
|
/**
|
|
4045
4209
|
* Type-level representation returned by {@link NullishOr}.
|
|
4046
4210
|
*
|
|
4211
|
+
* @stability stable
|
|
4047
4212
|
* @category models
|
|
4048
4213
|
* @since 3.10.0
|
|
4049
4214
|
*/
|
|
@@ -4057,6 +4222,7 @@ interface NullishOrLambda extends Lambda {
|
|
|
4057
4222
|
/**
|
|
4058
4223
|
* Creates a union schema of `S | null | undefined`.
|
|
4059
4224
|
*
|
|
4225
|
+
* @stability stable
|
|
4060
4226
|
* @category constructors
|
|
4061
4227
|
* @since 3.10.0
|
|
4062
4228
|
*/
|
|
@@ -4064,6 +4230,7 @@ export declare const NullishOr: NullishOrLambda;
|
|
|
4064
4230
|
/**
|
|
4065
4231
|
* Type-level representation returned by {@link suspend}.
|
|
4066
4232
|
*
|
|
4233
|
+
* @stability stable
|
|
4067
4234
|
* @category models
|
|
4068
4235
|
* @since 3.10.0
|
|
4069
4236
|
*/
|
|
@@ -4098,6 +4265,7 @@ export interface suspend<S extends Constraint> extends BottomLazy<SchemaAST.Susp
|
|
|
4098
4265
|
* Schema.decodeSync(Tree)({ value: 1, children: [] }) // => { value: 1, children: [] }
|
|
4099
4266
|
* ```
|
|
4100
4267
|
*
|
|
4268
|
+
* @stability stable
|
|
4101
4269
|
* @category constructors
|
|
4102
4270
|
* @since 3.10.0
|
|
4103
4271
|
*/
|
|
@@ -4118,6 +4286,7 @@ export declare function suspend<S extends Constraint>(f: () => S): suspend<S>;
|
|
|
4118
4286
|
* Schema.is(AgeSchema)(121) // => false
|
|
4119
4287
|
* ```
|
|
4120
4288
|
*
|
|
4289
|
+
* @stability stable
|
|
4121
4290
|
* @category filtering
|
|
4122
4291
|
* @since 4.0.0
|
|
4123
4292
|
*/
|
|
@@ -4125,6 +4294,7 @@ export declare function check<S extends Top>(...checks: readonly [SchemaAST.Chec
|
|
|
4125
4294
|
/**
|
|
4126
4295
|
* Type-level representation returned by {@link refine}.
|
|
4127
4296
|
*
|
|
4297
|
+
* @stability stable
|
|
4128
4298
|
* @category filtering
|
|
4129
4299
|
* @since 3.10.0
|
|
4130
4300
|
*/
|
|
@@ -4150,6 +4320,7 @@ export interface refine<T extends S["Type"], S extends Constraint> extends Botto
|
|
|
4150
4320
|
* names type-level failures before the refinement runs; it does not name the
|
|
4151
4321
|
* failed refinement itself.
|
|
4152
4322
|
*
|
|
4323
|
+
* @stability stable
|
|
4153
4324
|
* @category filtering
|
|
4154
4325
|
* @since 3.10.0
|
|
4155
4326
|
*/
|
|
@@ -4159,6 +4330,7 @@ type FromBrandKeys<A extends Brand.Brand<any>> = A extends unknown ? Brand.Brand
|
|
|
4159
4330
|
/**
|
|
4160
4331
|
* Type-level representation returned by {@link brand}.
|
|
4161
4332
|
*
|
|
4333
|
+
* @stability stable
|
|
4162
4334
|
* @category branding
|
|
4163
4335
|
* @since 3.10.0
|
|
4164
4336
|
*/
|
|
@@ -4194,6 +4366,7 @@ export interface brand<S extends Constraint, B extends string> extends BottomLaz
|
|
|
4194
4366
|
*
|
|
4195
4367
|
* @see {@link fromBrand} for applying a Brand constructor's checks along with its branded type
|
|
4196
4368
|
*
|
|
4369
|
+
* @stability stable
|
|
4197
4370
|
* @category branding
|
|
4198
4371
|
* @since 3.10.0
|
|
4199
4372
|
*/
|
|
@@ -4214,6 +4387,7 @@ export declare function brand<B extends string>(identifier: B & EnsureSingleBran
|
|
|
4214
4387
|
*
|
|
4215
4388
|
* @see {@link brand} for adding a brand without constructor checks
|
|
4216
4389
|
*
|
|
4390
|
+
* @stability stable
|
|
4217
4391
|
* @category branding
|
|
4218
4392
|
* @since 3.10.0
|
|
4219
4393
|
*/
|
|
@@ -4223,6 +4397,7 @@ export declare function fromBrand<A extends Brand.Brand<any>>(identifier: Brand.
|
|
|
4223
4397
|
/**
|
|
4224
4398
|
* Type-level representation returned by {@link middlewareDecoding}.
|
|
4225
4399
|
*
|
|
4400
|
+
* @stability stable
|
|
4226
4401
|
* @category decoding
|
|
4227
4402
|
* @since 4.0.0
|
|
4228
4403
|
*/
|
|
@@ -4261,6 +4436,7 @@ export interface middlewareDecoding<S extends Constraint, RD> extends BottomLazy
|
|
|
4261
4436
|
* ```
|
|
4262
4437
|
*
|
|
4263
4438
|
* @see {@link catchDecoding} for a simpler error-recovery variant
|
|
4439
|
+
* @stability stable
|
|
4264
4440
|
* @category decoding
|
|
4265
4441
|
* @since 4.0.0
|
|
4266
4442
|
*/
|
|
@@ -4268,6 +4444,7 @@ export declare function middlewareDecoding<S extends Constraint, RD>(decode: (ef
|
|
|
4268
4444
|
/**
|
|
4269
4445
|
* Type-level representation returned by {@link middlewareEncoding}.
|
|
4270
4446
|
*
|
|
4447
|
+
* @stability stable
|
|
4271
4448
|
* @category encoding
|
|
4272
4449
|
* @since 4.0.0
|
|
4273
4450
|
*/
|
|
@@ -4306,6 +4483,7 @@ export interface middlewareEncoding<S extends Constraint, RE> extends BottomLazy
|
|
|
4306
4483
|
* ```
|
|
4307
4484
|
*
|
|
4308
4485
|
* @see {@link catchEncoding} for a simpler error-recovery variant
|
|
4486
|
+
* @stability stable
|
|
4309
4487
|
* @category encoding
|
|
4310
4488
|
* @since 4.0.0
|
|
4311
4489
|
*/
|
|
@@ -4330,6 +4508,7 @@ export declare function middlewareEncoding<S extends Constraint, RE>(encode: (ef
|
|
|
4330
4508
|
* ```
|
|
4331
4509
|
*
|
|
4332
4510
|
* @see {@link catchDecodingWithContext} to add service requirements to the handler
|
|
4511
|
+
* @stability stable
|
|
4333
4512
|
* @category error handling
|
|
4334
4513
|
* @since 4.0.0
|
|
4335
4514
|
*/
|
|
@@ -4351,6 +4530,7 @@ export declare function catchDecoding<S extends Constraint>(f: (issue: SchemaIss
|
|
|
4351
4530
|
* @see {@link catchDecoding} for recovery handlers that do not require services
|
|
4352
4531
|
* @see {@link middlewareDecoding} for intercepting or replacing the full decoding pipeline
|
|
4353
4532
|
*
|
|
4533
|
+
* @stability stable
|
|
4354
4534
|
* @category error handling
|
|
4355
4535
|
* @since 4.0.0
|
|
4356
4536
|
*/
|
|
@@ -4364,6 +4544,7 @@ export declare function catchDecodingWithContext<S extends Constraint, R = never
|
|
|
4364
4544
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
4365
4545
|
*
|
|
4366
4546
|
* @see {@link catchEncodingWithContext} to add service requirements to the handler
|
|
4547
|
+
* @stability stable
|
|
4367
4548
|
* @category error handling
|
|
4368
4549
|
* @since 4.0.0
|
|
4369
4550
|
*/
|
|
@@ -4385,6 +4566,7 @@ export declare function catchEncoding<S extends Constraint>(f: (issue: SchemaIss
|
|
|
4385
4566
|
* @see {@link catchEncoding} for recovery handlers that do not require services
|
|
4386
4567
|
* @see {@link middlewareEncoding} for intercepting or replacing the full encoding pipeline
|
|
4387
4568
|
*
|
|
4569
|
+
* @stability stable
|
|
4388
4570
|
* @category error handling
|
|
4389
4571
|
* @since 4.0.0
|
|
4390
4572
|
*/
|
|
@@ -4392,6 +4574,7 @@ export declare function catchEncodingWithContext<S extends Constraint, R = never
|
|
|
4392
4574
|
/**
|
|
4393
4575
|
* Type-level representation returned by {@link decodeTo}.
|
|
4394
4576
|
*
|
|
4577
|
+
* @stability stable
|
|
4395
4578
|
* @category transforming
|
|
4396
4579
|
* @since 4.0.0
|
|
4397
4580
|
*/
|
|
@@ -4409,6 +4592,7 @@ export interface decodeTo<To extends Constraint, From extends Constraint, RD = n
|
|
|
4409
4592
|
/**
|
|
4410
4593
|
* Type-level representation returned by {@link decodeTo} without a custom transformation.
|
|
4411
4594
|
*
|
|
4595
|
+
* @stability stable
|
|
4412
4596
|
* @category transforming
|
|
4413
4597
|
* @since 3.10.0
|
|
4414
4598
|
*/
|
|
@@ -4458,6 +4642,7 @@ export interface compose<To extends Constraint, From extends Constraint> extends
|
|
|
4458
4642
|
* Schema.decodeUnknownSync(NumberFromString)("123") // => 123
|
|
4459
4643
|
* ```
|
|
4460
4644
|
*
|
|
4645
|
+
* @stability stable
|
|
4461
4646
|
* @category transforming
|
|
4462
4647
|
* @since 4.0.0
|
|
4463
4648
|
*/
|
|
@@ -4505,6 +4690,7 @@ export declare function decodeTo<To extends Constraint, From extends Constraint,
|
|
|
4505
4690
|
* Schema.decodeUnknownSync(Trimmed)(" hello ") // => "hello"
|
|
4506
4691
|
* ```
|
|
4507
4692
|
*
|
|
4693
|
+
* @stability stable
|
|
4508
4694
|
* @category transforming
|
|
4509
4695
|
* @since 4.0.0
|
|
4510
4696
|
*/
|
|
@@ -4539,6 +4725,7 @@ export declare function decode<S extends Constraint, RD = never, RE = never>(tra
|
|
|
4539
4725
|
* Schema.decodeSync(NumberFromString)("42") // => 42
|
|
4540
4726
|
* ```
|
|
4541
4727
|
*
|
|
4728
|
+
* @stability stable
|
|
4542
4729
|
* @category transforming
|
|
4543
4730
|
* @since 4.0.0
|
|
4544
4731
|
*/
|
|
@@ -4570,6 +4757,7 @@ export declare function encodeTo<To extends Constraint, From extends Constraint,
|
|
|
4570
4757
|
* Schema.encodeSync(UpperFromLower)("hello") // => "HELLO"
|
|
4571
4758
|
* ```
|
|
4572
4759
|
*
|
|
4760
|
+
* @stability stable
|
|
4573
4761
|
* @category transforming
|
|
4574
4762
|
* @since 4.0.0
|
|
4575
4763
|
*/
|
|
@@ -4584,6 +4772,7 @@ export declare function encode<S extends Constraint, RD = never, RE = never>(tra
|
|
|
4584
4772
|
*
|
|
4585
4773
|
* Only schemas that satisfy this constraint can be passed to {@link withConstructorDefault}.
|
|
4586
4774
|
*
|
|
4775
|
+
* @stability stable
|
|
4587
4776
|
* @category models
|
|
4588
4777
|
* @since 4.0.0
|
|
4589
4778
|
*/
|
|
@@ -4593,6 +4782,7 @@ export interface WithoutConstructorDefault {
|
|
|
4593
4782
|
/**
|
|
4594
4783
|
* Type-level representation returned by {@link withConstructorDefault}.
|
|
4595
4784
|
*
|
|
4785
|
+
* @stability stable
|
|
4596
4786
|
* @category constructors
|
|
4597
4787
|
* @since 3.10.0
|
|
4598
4788
|
*/
|
|
@@ -4629,6 +4819,7 @@ export interface withConstructorDefault<S extends Constraint & WithoutConstructo
|
|
|
4629
4819
|
* MySchema.make({}).name // => "anonymous"
|
|
4630
4820
|
* ```
|
|
4631
4821
|
*
|
|
4822
|
+
* @stability stable
|
|
4632
4823
|
* @category constructors
|
|
4633
4824
|
* @since 3.10.0
|
|
4634
4825
|
*/
|
|
@@ -4636,6 +4827,7 @@ export declare function withConstructorDefault<S extends Constraint & WithoutCon
|
|
|
4636
4827
|
/**
|
|
4637
4828
|
* Type-level representation returned by {@link withDecodingDefaultKey}.
|
|
4638
4829
|
*
|
|
4830
|
+
* @stability stable
|
|
4639
4831
|
* @category decoding
|
|
4640
4832
|
* @since 4.0.0
|
|
4641
4833
|
*/
|
|
@@ -4651,6 +4843,7 @@ export interface withDecodingDefaultKey<S extends Constraint, R = never> extends
|
|
|
4651
4843
|
* - `"passthrough"` (default): pass the value through during encoding
|
|
4652
4844
|
* - `"omit"`: omit the key from the encoded output
|
|
4653
4845
|
*
|
|
4846
|
+
* @stability stable
|
|
4654
4847
|
* @category options
|
|
4655
4848
|
* @since 4.0.0
|
|
4656
4849
|
*/
|
|
@@ -4687,6 +4880,7 @@ export type DecodingDefaultOptions = {
|
|
|
4687
4880
|
*
|
|
4688
4881
|
* @see {@link withDecodingDefault} for the value-level variant (key absent **or** `undefined`)
|
|
4689
4882
|
* @see {@link withDecodingDefaultTypeKey} for the variant where the default is a `Type` value
|
|
4883
|
+
* @stability stable
|
|
4690
4884
|
* @category decoding
|
|
4691
4885
|
* @since 4.0.0
|
|
4692
4886
|
*/
|
|
@@ -4694,6 +4888,7 @@ export declare function withDecodingDefaultKey<S extends Constraint, R = never>(
|
|
|
4694
4888
|
/**
|
|
4695
4889
|
* Type-level representation returned by {@link withDecodingDefaultTypeKey}.
|
|
4696
4890
|
*
|
|
4891
|
+
* @stability stable
|
|
4697
4892
|
* @category decoding
|
|
4698
4893
|
* @since 4.0.0
|
|
4699
4894
|
*/
|
|
@@ -4719,6 +4914,7 @@ export interface withDecodingDefaultTypeKey<S extends Constraint, R = never> ext
|
|
|
4719
4914
|
*
|
|
4720
4915
|
* @see {@link withDecodingDefaultKey} for the variant where the default is an `Encoded` value
|
|
4721
4916
|
* @see {@link withDecodingDefaultType} for the value-level variant
|
|
4917
|
+
* @stability stable
|
|
4722
4918
|
* @category decoding
|
|
4723
4919
|
* @since 4.0.0
|
|
4724
4920
|
*/
|
|
@@ -4726,6 +4922,7 @@ export declare function withDecodingDefaultTypeKey<S extends Constraint, R = nev
|
|
|
4726
4922
|
/**
|
|
4727
4923
|
* Type-level representation returned by {@link withDecodingDefault}.
|
|
4728
4924
|
*
|
|
4925
|
+
* @stability stable
|
|
4729
4926
|
* @category decoding
|
|
4730
4927
|
* @since 3.10.0
|
|
4731
4928
|
*/
|
|
@@ -4767,6 +4964,7 @@ export interface withDecodingDefault<S extends Constraint, R = never> extends de
|
|
|
4767
4964
|
*
|
|
4768
4965
|
* @see {@link withDecodingDefaultKey} for the key-level variant (key absent only, not `undefined`)
|
|
4769
4966
|
* @see {@link withDecodingDefaultType} for the variant where the default is a `Type` value
|
|
4967
|
+
* @stability stable
|
|
4770
4968
|
* @category decoding
|
|
4771
4969
|
* @since 3.10.0
|
|
4772
4970
|
*/
|
|
@@ -4774,6 +4972,7 @@ export declare function withDecodingDefault<S extends Constraint, R = never>(def
|
|
|
4774
4972
|
/**
|
|
4775
4973
|
* Type-level representation returned by {@link withDecodingDefaultType}.
|
|
4776
4974
|
*
|
|
4975
|
+
* @stability stable
|
|
4777
4976
|
* @category decoding
|
|
4778
4977
|
* @since 4.0.0
|
|
4779
4978
|
*/
|
|
@@ -4804,6 +5003,7 @@ export interface withDecodingDefaultType<S extends Constraint, R = never> extend
|
|
|
4804
5003
|
*
|
|
4805
5004
|
* @see {@link withDecodingDefault} for the variant where the default is an `Encoded` value
|
|
4806
5005
|
* @see {@link withDecodingDefaultTypeKey} for the key-level variant
|
|
5006
|
+
* @stability stable
|
|
4807
5007
|
* @category decoding
|
|
4808
5008
|
* @since 4.0.0
|
|
4809
5009
|
*/
|
|
@@ -4811,6 +5011,7 @@ export declare function withDecodingDefaultType<S extends Constraint, R = never>
|
|
|
4811
5011
|
/**
|
|
4812
5012
|
* Type-level representation returned by {@link tag}.
|
|
4813
5013
|
*
|
|
5014
|
+
* @stability stable
|
|
4814
5015
|
* @category constructors
|
|
4815
5016
|
* @since 3.10.0
|
|
4816
5017
|
*/
|
|
@@ -4835,6 +5036,7 @@ export interface tag<Tag extends SchemaAST.LiteralValue> extends withConstructor
|
|
|
4835
5036
|
*
|
|
4836
5037
|
* @see {@link tagDefaultOmit} to also omit the tag during encoding
|
|
4837
5038
|
* @see {@link TaggedStruct} for a shorthand that adds `_tag` automatically
|
|
5039
|
+
* @stability stable
|
|
4838
5040
|
* @category constructors
|
|
4839
5041
|
* @since 3.10.0
|
|
4840
5042
|
*/
|
|
@@ -4867,6 +5069,7 @@ export declare function tag<Tag extends SchemaAST.LiteralValue>(literal: Tag): t
|
|
|
4867
5069
|
* ```
|
|
4868
5070
|
*
|
|
4869
5071
|
* @see {@link tag} for the variant that keeps the tag during encoding
|
|
5072
|
+
* @stability stable
|
|
4870
5073
|
* @category constructors
|
|
4871
5074
|
* @since 4.0.0
|
|
4872
5075
|
*/
|
|
@@ -4874,6 +5077,7 @@ export declare function tagDefaultOmit<Tag extends SchemaAST.LiteralValue>(liter
|
|
|
4874
5077
|
/**
|
|
4875
5078
|
* Type-level representation returned by {@link TaggedStruct}.
|
|
4876
5079
|
*
|
|
5080
|
+
* @stability stable
|
|
4877
5081
|
* @category models
|
|
4878
5082
|
* @since 3.10.0
|
|
4879
5083
|
*/
|
|
@@ -4924,6 +5128,7 @@ export type TaggedStruct<Tag extends SchemaAST.LiteralValue, Fields extends Stru
|
|
|
4924
5128
|
* tagged.fields._tag.schema.literal // => "A"
|
|
4925
5129
|
* ```
|
|
4926
5130
|
*
|
|
5131
|
+
* @stability stable
|
|
4927
5132
|
* @category constructors
|
|
4928
5133
|
* @since 3.10.0
|
|
4929
5134
|
*/
|
|
@@ -4945,6 +5150,10 @@ type TaggedUnionUtils<Tag extends PropertyKey, Members extends ReadonlyArray<Con
|
|
|
4945
5150
|
readonly [K in Tag]: PropertyKey;
|
|
4946
5151
|
};
|
|
4947
5152
|
}> = Flatten<Members>> = {
|
|
5153
|
+
/**
|
|
5154
|
+
* Property key used to discriminate union members.
|
|
5155
|
+
*/
|
|
5156
|
+
readonly tag: Tag;
|
|
4948
5157
|
/**
|
|
4949
5158
|
* Discriminant values in flattened member order.
|
|
4950
5159
|
*/
|
|
@@ -4988,6 +5197,7 @@ type TaggedUnionUtils<Tag extends PropertyKey, Members extends ReadonlyArray<Con
|
|
|
4988
5197
|
/**
|
|
4989
5198
|
* Type-level representation returned by {@link toTaggedUnion}.
|
|
4990
5199
|
*
|
|
5200
|
+
* @stability stable
|
|
4991
5201
|
* @category combinators
|
|
4992
5202
|
* @since 4.0.0
|
|
4993
5203
|
*/
|
|
@@ -5023,6 +5233,7 @@ export type toTaggedUnion<Tag extends PropertyKey, Members extends ReadonlyArray
|
|
|
5023
5233
|
* ```
|
|
5024
5234
|
*
|
|
5025
5235
|
* @see {@link TaggedUnion} for a shorthand that builds the union from scratch
|
|
5236
|
+
* @stability stable
|
|
5026
5237
|
* @category combinators
|
|
5027
5238
|
* @since 4.0.0
|
|
5028
5239
|
*/
|
|
@@ -5032,6 +5243,7 @@ export declare function toTaggedUnion<const Tag extends PropertyKey>(tag: Tag):
|
|
|
5032
5243
|
/**
|
|
5033
5244
|
* Type-level representation returned by {@link TaggedUnion}.
|
|
5034
5245
|
*
|
|
5246
|
+
* @stability stable
|
|
5035
5247
|
* @category models
|
|
5036
5248
|
* @since 4.0.0
|
|
5037
5249
|
*/
|
|
@@ -5057,6 +5269,7 @@ export interface TaggedUnion<Cases extends Record<string, Constraint>> extends B
|
|
|
5057
5269
|
readonly "Iso": {
|
|
5058
5270
|
[K in keyof Cases]: Cases[K]["Type"];
|
|
5059
5271
|
}[keyof Cases];
|
|
5272
|
+
readonly tag: "_tag";
|
|
5060
5273
|
readonly cases: Cases;
|
|
5061
5274
|
readonly isAnyOf: <const Keys>(keys: ReadonlyArray<Keys>) => (value: Cases[keyof Cases]["Type"]) => value is Extract<Cases[keyof Cases]["Type"], {
|
|
5062
5275
|
_tag: Keys;
|
|
@@ -5084,7 +5297,7 @@ export interface TaggedUnion<Cases extends Record<string, Constraint>> extends B
|
|
|
5084
5297
|
/**
|
|
5085
5298
|
* Builds a discriminated union from a record of field sets, one per variant.
|
|
5086
5299
|
* 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.
|
|
5300
|
+
* The result includes `tag`, `cases`, `guards`, `isAnyOf`, `match`, and `matchOrElse` utilities.
|
|
5088
5301
|
*
|
|
5089
5302
|
* **Example** (Pattern matching a discriminated union)
|
|
5090
5303
|
*
|
|
@@ -5105,6 +5318,7 @@ export interface TaggedUnion<Cases extends Record<string, Constraint>> extends B
|
|
|
5105
5318
|
* ```
|
|
5106
5319
|
*
|
|
5107
5320
|
* @see {@link toTaggedUnion} to augment an existing union instead
|
|
5321
|
+
* @stability stable
|
|
5108
5322
|
* @category constructors
|
|
5109
5323
|
* @since 4.0.0
|
|
5110
5324
|
*/
|
|
@@ -5114,6 +5328,7 @@ export declare function TaggedUnion<const CasesByTag extends Record<string, Stru
|
|
|
5114
5328
|
/**
|
|
5115
5329
|
* Type-level representation returned by {@link Opaque}.
|
|
5116
5330
|
*
|
|
5331
|
+
* @stability stable
|
|
5117
5332
|
* @category models
|
|
5118
5333
|
* @since 4.0.0
|
|
5119
5334
|
*/
|
|
@@ -5148,6 +5363,7 @@ export interface Opaque<Self, S extends Top, Brand> extends BottomLazyWithoutNew
|
|
|
5148
5363
|
* person.name // => "Alice"
|
|
5149
5364
|
* ```
|
|
5150
5365
|
*
|
|
5366
|
+
* @stability stable
|
|
5151
5367
|
* @category constructors
|
|
5152
5368
|
* @since 4.0.0
|
|
5153
5369
|
*/
|
|
@@ -5155,6 +5371,7 @@ export declare function Opaque<Self, Brand = {}>(): <S extends Top>(schema: S) =
|
|
|
5155
5371
|
/**
|
|
5156
5372
|
* Type-level representation returned by {@link instanceOf}.
|
|
5157
5373
|
*
|
|
5374
|
+
* @stability stable
|
|
5158
5375
|
* @category models
|
|
5159
5376
|
* @since 3.10.0
|
|
5160
5377
|
*/
|
|
@@ -5176,6 +5393,7 @@ export interface instanceOf<T, Iso = T> extends declare<T, Iso> {
|
|
|
5176
5393
|
* decoded.toISOString() // => "2024-01-01T00:00:00.000Z"
|
|
5177
5394
|
* ```
|
|
5178
5395
|
*
|
|
5396
|
+
* @stability stable
|
|
5179
5397
|
* @category constructors
|
|
5180
5398
|
* @since 3.10.0
|
|
5181
5399
|
*/
|
|
@@ -5184,6 +5402,7 @@ export declare function instanceOf<C extends abstract new (...args: any) => any,
|
|
|
5184
5402
|
* Constructs an `SchemaAST.Link` that describes how a value of type `T` encodes to and decodes from a `To` schema.
|
|
5185
5403
|
* Used when building low-level AST transformations that bridge two schema types.
|
|
5186
5404
|
*
|
|
5405
|
+
* @stability stable
|
|
5187
5406
|
* @category transforming
|
|
5188
5407
|
* @since 4.0.0
|
|
5189
5408
|
*/
|
|
@@ -5246,6 +5465,7 @@ export declare function link<T>(): <To extends Constraint>(encodeTo: To, transfo
|
|
|
5246
5465
|
* }
|
|
5247
5466
|
* ```
|
|
5248
5467
|
*
|
|
5468
|
+
* @stability stable
|
|
5249
5469
|
* @category constructors
|
|
5250
5470
|
* @since 4.0.0
|
|
5251
5471
|
*/
|
|
@@ -5266,6 +5486,7 @@ export declare const makeFilter: <T>(filter: (input: T, ast: SchemaAST.AST, opti
|
|
|
5266
5486
|
* `reportInput`) or a full {@link SchemaIssue.Issue} (returned unchanged);
|
|
5267
5487
|
* the result is wrapped in an {@link SchemaIssue.Pointer} at the given `path`.
|
|
5268
5488
|
*
|
|
5489
|
+
* @stability stable
|
|
5269
5490
|
* @category models
|
|
5270
5491
|
* @since 3.10.0
|
|
5271
5492
|
*/
|
|
@@ -5293,6 +5514,7 @@ export type FilterIssue = string | SchemaIssue.Issue | {
|
|
|
5293
5514
|
* to returning that element directly; otherwise the entries are grouped
|
|
5294
5515
|
* into an {@link SchemaIssue.Composite}.
|
|
5295
5516
|
*
|
|
5517
|
+
* @stability stable
|
|
5296
5518
|
* @category models
|
|
5297
5519
|
* @since 3.10.0
|
|
5298
5520
|
*/
|
|
@@ -5301,6 +5523,7 @@ export type FilterOutput = undefined | boolean | FilterIssue | ReadonlyArray<Fil
|
|
|
5301
5523
|
* Groups multiple checks into a single {@link SchemaAST.FilterGroup}, applying
|
|
5302
5524
|
* optional shared annotations to the group as a whole.
|
|
5303
5525
|
*
|
|
5526
|
+
* @stability stable
|
|
5304
5527
|
* @category constructors
|
|
5305
5528
|
* @since 4.0.0
|
|
5306
5529
|
*/
|
|
@@ -5320,6 +5543,7 @@ export declare function makeFilterGroup<T>(checks: readonly [SchemaAST.Check<T>,
|
|
|
5320
5543
|
* During arbitrary generation, this applies a `patterns`
|
|
5321
5544
|
* constraint to ensure generated strings match the trimmed pattern.
|
|
5322
5545
|
*
|
|
5546
|
+
* @stability stable
|
|
5323
5547
|
* @category validation
|
|
5324
5548
|
* @since 4.0.0
|
|
5325
5549
|
*/
|
|
@@ -5340,6 +5564,7 @@ export declare function isTrimmed(annotations?: Annotations.Filter): SchemaAST.F
|
|
|
5340
5564
|
* During arbitrary generation, this applies a `patterns`
|
|
5341
5565
|
* constraint to ensure generated strings match the specified RegExp pattern.
|
|
5342
5566
|
*
|
|
5567
|
+
* @stability stable
|
|
5343
5568
|
* @category validation
|
|
5344
5569
|
* @since 4.0.0
|
|
5345
5570
|
*/
|
|
@@ -5359,6 +5584,7 @@ export declare function isPattern(regExp: globalThis.RegExp, annotations?: Annot
|
|
|
5359
5584
|
* During arbitrary generation, this applies a `patterns`
|
|
5360
5585
|
* constraint to ensure generated strings match the number string pattern.
|
|
5361
5586
|
*
|
|
5587
|
+
* @stability stable
|
|
5362
5588
|
* @category validation
|
|
5363
5589
|
* @since 4.0.0
|
|
5364
5590
|
*/
|
|
@@ -5377,6 +5603,7 @@ export declare function isStringFinite(annotations?: Annotations.Filter): Schema
|
|
|
5377
5603
|
* This check corresponds to a `pattern` constraint with the same signed
|
|
5378
5604
|
* base-10 integer pattern.
|
|
5379
5605
|
*
|
|
5606
|
+
* @stability stable
|
|
5380
5607
|
* @category validation
|
|
5381
5608
|
* @since 4.0.0
|
|
5382
5609
|
*/
|
|
@@ -5390,6 +5617,7 @@ export declare function isStringBigInt(annotations?: Annotations.Filter): Schema
|
|
|
5390
5617
|
* The check uses the pattern `^Symbol\((.*)\)$`. It is not a general test for
|
|
5391
5618
|
* whether a string can be passed to JavaScript's `Symbol()` function.
|
|
5392
5619
|
*
|
|
5620
|
+
* @stability stable
|
|
5393
5621
|
* @category validation
|
|
5394
5622
|
* @since 4.0.0
|
|
5395
5623
|
*/
|
|
@@ -5421,6 +5649,7 @@ export declare function isStringSymbol(annotations?: Annotations.Filter): Schema
|
|
|
5421
5649
|
* constraint to ensure generated strings match the UUID pattern.
|
|
5422
5650
|
*
|
|
5423
5651
|
* @see {@link isGUID} for shape-only GUID validation.
|
|
5652
|
+
* @stability stable
|
|
5424
5653
|
* @category validation
|
|
5425
5654
|
* @since 4.0.0
|
|
5426
5655
|
*/
|
|
@@ -5446,6 +5675,7 @@ export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotati
|
|
|
5446
5675
|
* constraint to ensure generated strings match the GUID pattern.
|
|
5447
5676
|
*
|
|
5448
5677
|
* @see {@link isUUID} for strict UUID validation.
|
|
5678
|
+
* @stability stable
|
|
5449
5679
|
* @category validation
|
|
5450
5680
|
* @since 4.0.0
|
|
5451
5681
|
*/
|
|
@@ -5466,6 +5696,7 @@ export declare function isGUID(annotations?: Annotations.Filter): SchemaAST.Filt
|
|
|
5466
5696
|
* During arbitrary generation, this applies a `patterns`
|
|
5467
5697
|
* constraint to ensure generated strings match the ULID pattern.
|
|
5468
5698
|
*
|
|
5699
|
+
* @stability stable
|
|
5469
5700
|
* @category validation
|
|
5470
5701
|
* @since 4.0.0
|
|
5471
5702
|
*/
|
|
@@ -5485,6 +5716,7 @@ export declare function isULID(annotations?: Annotations.Filter): SchemaAST.Filt
|
|
|
5485
5716
|
* During arbitrary generation, this applies a `patterns`
|
|
5486
5717
|
* constraint to ensure generated strings match the Base64 pattern.
|
|
5487
5718
|
*
|
|
5719
|
+
* @stability stable
|
|
5488
5720
|
* @category validation
|
|
5489
5721
|
* @since 4.0.0
|
|
5490
5722
|
*/
|
|
@@ -5505,6 +5737,7 @@ export declare function isBase64(annotations?: Annotations.Filter): SchemaAST.Fi
|
|
|
5505
5737
|
* During arbitrary generation, this applies a `patterns`
|
|
5506
5738
|
* constraint to ensure generated strings match the Base64URL pattern.
|
|
5507
5739
|
*
|
|
5740
|
+
* @stability stable
|
|
5508
5741
|
* @category validation
|
|
5509
5742
|
* @since 4.0.0
|
|
5510
5743
|
*/
|
|
@@ -5518,6 +5751,7 @@ export declare function isBase64Url(annotations?: Annotations.Filter): SchemaAST
|
|
|
5518
5751
|
* metadata. If the prefix ends with a high surrogate, the JSON Schema pattern
|
|
5519
5752
|
* omits that code unit so Unicode matching cannot reject a valid string.
|
|
5520
5753
|
*
|
|
5754
|
+
* @stability stable
|
|
5521
5755
|
* @category validation
|
|
5522
5756
|
* @since 4.0.0
|
|
5523
5757
|
*/
|
|
@@ -5531,6 +5765,7 @@ export declare function isStartingWith(startsWith: string, annotations?: Annotat
|
|
|
5531
5765
|
* metadata. If the suffix begins with a low surrogate, the JSON Schema pattern
|
|
5532
5766
|
* omits that code unit so Unicode matching cannot reject a valid string.
|
|
5533
5767
|
*
|
|
5768
|
+
* @stability stable
|
|
5534
5769
|
* @category validation
|
|
5535
5770
|
* @since 4.0.0
|
|
5536
5771
|
*/
|
|
@@ -5545,6 +5780,7 @@ export declare function isEndingWith(endsWith: string, annotations?: Annotations
|
|
|
5545
5780
|
* omitted from the JSON Schema pattern so Unicode matching cannot reject a
|
|
5546
5781
|
* valid string.
|
|
5547
5782
|
*
|
|
5783
|
+
* @stability stable
|
|
5548
5784
|
* @category validation
|
|
5549
5785
|
* @since 4.0.0
|
|
5550
5786
|
*/
|
|
@@ -5558,6 +5794,7 @@ export declare function isIncluding(includes: string, annotations?: Annotations.
|
|
|
5558
5794
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
5559
5795
|
* change when uppercased.
|
|
5560
5796
|
*
|
|
5797
|
+
* @stability stable
|
|
5561
5798
|
* @category validation
|
|
5562
5799
|
* @since 4.0.0
|
|
5563
5800
|
*/
|
|
@@ -5571,6 +5808,7 @@ export declare function isUppercased(annotations?: Annotations.Filter): SchemaAS
|
|
|
5571
5808
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
5572
5809
|
* change when lowercased.
|
|
5573
5810
|
*
|
|
5811
|
+
* @stability stable
|
|
5574
5812
|
* @category validation
|
|
5575
5813
|
* @since 4.0.0
|
|
5576
5814
|
*/
|
|
@@ -5584,6 +5822,7 @@ export declare function isLowercased(annotations?: Annotations.Filter): SchemaAS
|
|
|
5584
5822
|
* Empty strings pass. Strings whose first character has no lowercase form, such
|
|
5585
5823
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
5586
5824
|
*
|
|
5825
|
+
* @stability stable
|
|
5587
5826
|
* @category validation
|
|
5588
5827
|
* @since 4.0.0
|
|
5589
5828
|
*/
|
|
@@ -5597,6 +5836,7 @@ export declare function isCapitalized(annotations?: Annotations.Filter): SchemaA
|
|
|
5597
5836
|
* Empty strings pass. Strings whose first character has no uppercase form, such
|
|
5598
5837
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
5599
5838
|
*
|
|
5839
|
+
* @stability stable
|
|
5600
5840
|
* @category validation
|
|
5601
5841
|
* @since 4.0.0
|
|
5602
5842
|
*/
|
|
@@ -5604,6 +5844,7 @@ export declare function isUncapitalized(annotations?: Annotations.Filter): Schem
|
|
|
5604
5844
|
/**
|
|
5605
5845
|
* Type-level representation of {@link Finite}.
|
|
5606
5846
|
*
|
|
5847
|
+
* @stability stable
|
|
5607
5848
|
* @category models
|
|
5608
5849
|
* @since 3.10.0
|
|
5609
5850
|
*/
|
|
@@ -5613,6 +5854,7 @@ export interface Finite extends Number {
|
|
|
5613
5854
|
/**
|
|
5614
5855
|
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
5615
5856
|
*
|
|
5857
|
+
* @stability stable
|
|
5616
5858
|
* @category schemas
|
|
5617
5859
|
* @since 3.10.0
|
|
5618
5860
|
*/
|
|
@@ -5631,6 +5873,7 @@ export declare const Finite: Finite;
|
|
|
5631
5873
|
*
|
|
5632
5874
|
* During arbitrary generation, this applies a finite-number constraint.
|
|
5633
5875
|
*
|
|
5876
|
+
* @stability stable
|
|
5634
5877
|
* @category validation
|
|
5635
5878
|
* @since 4.0.0
|
|
5636
5879
|
*/
|
|
@@ -5639,6 +5882,7 @@ export declare const isFinite: (annotations?: Annotations.Filter) => SchemaAST.F
|
|
|
5639
5882
|
* Creates a greater-than (`>`) check for any ordered type from an
|
|
5640
5883
|
* `Order.Order` instance.
|
|
5641
5884
|
*
|
|
5885
|
+
* @stability stable
|
|
5642
5886
|
* @category validation
|
|
5643
5887
|
* @since 4.0.0
|
|
5644
5888
|
*/
|
|
@@ -5651,6 +5895,7 @@ export declare function makeIsGreaterThan<T>(options: {
|
|
|
5651
5895
|
* Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
|
|
5652
5896
|
* `Order.Order` instance.
|
|
5653
5897
|
*
|
|
5898
|
+
* @stability stable
|
|
5654
5899
|
* @category validation
|
|
5655
5900
|
* @since 4.0.0
|
|
5656
5901
|
*/
|
|
@@ -5663,6 +5908,7 @@ export declare function makeIsGreaterThanOrEqualTo<T>(options: {
|
|
|
5663
5908
|
* Creates a less-than (`<`) check for any ordered type from an `Order.Order`
|
|
5664
5909
|
* instance.
|
|
5665
5910
|
*
|
|
5911
|
+
* @stability stable
|
|
5666
5912
|
* @category validation
|
|
5667
5913
|
* @since 4.0.0
|
|
5668
5914
|
*/
|
|
@@ -5675,6 +5921,7 @@ export declare function makeIsLessThan<T>(options: {
|
|
|
5675
5921
|
* Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
|
|
5676
5922
|
* `Order.Order` instance.
|
|
5677
5923
|
*
|
|
5924
|
+
* @stability stable
|
|
5678
5925
|
* @category validation
|
|
5679
5926
|
* @since 4.0.0
|
|
5680
5927
|
*/
|
|
@@ -5687,6 +5934,7 @@ export declare function makeIsLessThanOrEqualTo<T>(options: {
|
|
|
5687
5934
|
* Creates an inclusive or exclusive range check for any ordered type from an
|
|
5688
5935
|
* `Order.Order` instance.
|
|
5689
5936
|
*
|
|
5937
|
+
* @stability stable
|
|
5690
5938
|
* @category validation
|
|
5691
5939
|
* @since 4.0.0
|
|
5692
5940
|
*/
|
|
@@ -5709,6 +5957,7 @@ export declare function makeIsBetween<T>(deriveOptions: {
|
|
|
5709
5957
|
* Creates a divisibility check for any numeric type from a remainder function
|
|
5710
5958
|
* and a zero value.
|
|
5711
5959
|
*
|
|
5960
|
+
* @stability stable
|
|
5712
5961
|
* @category validation
|
|
5713
5962
|
* @since 4.0.0
|
|
5714
5963
|
*/
|
|
@@ -5733,6 +5982,7 @@ export declare function makeIsMultipleOf<T>(options: {
|
|
|
5733
5982
|
* `exclusiveMinimum` constraint to ensure generated numbers are greater than
|
|
5734
5983
|
* the specified value.
|
|
5735
5984
|
*
|
|
5985
|
+
* @stability stable
|
|
5736
5986
|
* @category validation
|
|
5737
5987
|
* @since 4.0.0
|
|
5738
5988
|
*/
|
|
@@ -5752,6 +6002,7 @@ export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Ann
|
|
|
5752
6002
|
* During arbitrary generation, this applies a `minimum` constraint
|
|
5753
6003
|
* to ensure generated numbers are greater than or equal to the specified value.
|
|
5754
6004
|
*
|
|
6005
|
+
* @stability stable
|
|
5755
6006
|
* @category validation
|
|
5756
6007
|
* @since 4.0.0
|
|
5757
6008
|
*/
|
|
@@ -5771,6 +6022,7 @@ export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Ann
|
|
|
5771
6022
|
* `exclusiveMaximum` constraint to ensure generated numbers are less than the
|
|
5772
6023
|
* specified value.
|
|
5773
6024
|
*
|
|
6025
|
+
* @stability stable
|
|
5774
6026
|
* @category validation
|
|
5775
6027
|
* @since 4.0.0
|
|
5776
6028
|
*/
|
|
@@ -5790,6 +6042,7 @@ export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annota
|
|
|
5790
6042
|
* During arbitrary generation, this applies a `maximum` constraint
|
|
5791
6043
|
* to ensure generated numbers are less than or equal to the specified value.
|
|
5792
6044
|
*
|
|
6045
|
+
* @stability stable
|
|
5793
6046
|
* @category validation
|
|
5794
6047
|
* @since 4.0.0
|
|
5795
6048
|
*/
|
|
@@ -5812,6 +6065,7 @@ export declare const isLessThanOrEqualTo: (maximum: number, annotations?: Annota
|
|
|
5812
6065
|
* `exclusiveMaximum` flags to ensure generated numbers fall within the
|
|
5813
6066
|
* specified range.
|
|
5814
6067
|
*
|
|
6068
|
+
* @stability stable
|
|
5815
6069
|
* @category validation
|
|
5816
6070
|
* @since 4.0.0
|
|
5817
6071
|
*/
|
|
@@ -5836,6 +6090,7 @@ export declare const isBetween: (options: {
|
|
|
5836
6090
|
*
|
|
5837
6091
|
* Throws a `RangeError` when `divisor` is zero or is not finite.
|
|
5838
6092
|
*
|
|
6093
|
+
* @stability stable
|
|
5839
6094
|
* @category validation
|
|
5840
6095
|
* @since 4.0.0
|
|
5841
6096
|
*/
|
|
@@ -5848,12 +6103,14 @@ export declare function isMultipleOf(divisor: number, annotations?: Annotations.
|
|
|
5848
6103
|
*
|
|
5849
6104
|
* JSON Schema:
|
|
5850
6105
|
*
|
|
5851
|
-
* This check corresponds to
|
|
6106
|
+
* This check corresponds to `type: "integer"` with `minimum: Number.MIN_SAFE_INTEGER`
|
|
6107
|
+
* and `maximum: Number.MAX_SAFE_INTEGER` in JSON Schema.
|
|
5852
6108
|
*
|
|
5853
6109
|
* Arbitrary:
|
|
5854
6110
|
*
|
|
5855
6111
|
* During arbitrary generation, this applies an integer constraint.
|
|
5856
6112
|
*
|
|
6113
|
+
* @stability stable
|
|
5857
6114
|
* @category validation
|
|
5858
6115
|
* @since 4.0.0
|
|
5859
6116
|
*/
|
|
@@ -5861,6 +6118,7 @@ export declare function isInt(annotations?: Annotations.Filter): SchemaAST.Filte
|
|
|
5861
6118
|
/**
|
|
5862
6119
|
* Type-level representation of {@link Int}.
|
|
5863
6120
|
*
|
|
6121
|
+
* @stability stable
|
|
5864
6122
|
* @category models
|
|
5865
6123
|
* @since 3.10.0
|
|
5866
6124
|
*/
|
|
@@ -5870,6 +6128,7 @@ export interface Int extends Number {
|
|
|
5870
6128
|
/**
|
|
5871
6129
|
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
5872
6130
|
*
|
|
6131
|
+
* @stability stable
|
|
5873
6132
|
* @category schemas
|
|
5874
6133
|
* @since 3.10.0
|
|
5875
6134
|
*/
|
|
@@ -5877,6 +6136,7 @@ export declare const Int: Int;
|
|
|
5877
6136
|
/**
|
|
5878
6137
|
* Type-level representation of {@link Natural}.
|
|
5879
6138
|
*
|
|
6139
|
+
* @stability stable
|
|
5880
6140
|
* @category models
|
|
5881
6141
|
* @since 4.0.0
|
|
5882
6142
|
*/
|
|
@@ -5892,6 +6152,7 @@ export interface Natural extends Int {
|
|
|
5892
6152
|
*
|
|
5893
6153
|
* @see {@link Int} for safe integers that may be negative
|
|
5894
6154
|
*
|
|
6155
|
+
* @stability stable
|
|
5895
6156
|
* @category schemas
|
|
5896
6157
|
* @since 4.0.0
|
|
5897
6158
|
*/
|
|
@@ -5912,6 +6173,7 @@ export declare const Natural: Natural;
|
|
|
5912
6173
|
* During arbitrary generation, this applies integer and range
|
|
5913
6174
|
* constraints to ensure generated numbers are 32-bit signed integers.
|
|
5914
6175
|
*
|
|
6176
|
+
* @stability stable
|
|
5915
6177
|
* @category validation
|
|
5916
6178
|
* @since 4.0.0
|
|
5917
6179
|
*/
|
|
@@ -5932,6 +6194,7 @@ export declare function isInt32(annotations?: Annotations.Filter): SchemaAST.Fil
|
|
|
5932
6194
|
* During arbitrary generation, this applies integer and range
|
|
5933
6195
|
* constraints to ensure generated numbers are 32-bit unsigned integers.
|
|
5934
6196
|
*
|
|
6197
|
+
* @stability stable
|
|
5935
6198
|
* @category validation
|
|
5936
6199
|
* @since 4.0.0
|
|
5937
6200
|
*/
|
|
@@ -5945,6 +6208,7 @@ export declare function isUint32(annotations?: Annotations.Filter): SchemaAST.Fi
|
|
|
5945
6208
|
*
|
|
5946
6209
|
* During arbitrary generation, this applies an exclusive lower bound.
|
|
5947
6210
|
*
|
|
6211
|
+
* @stability stable
|
|
5948
6212
|
* @category validation
|
|
5949
6213
|
* @since 4.0.0
|
|
5950
6214
|
*/
|
|
@@ -5964,6 +6228,7 @@ export declare const isGreaterThanDate: (exclusiveMinimum: globalThis.Date, anno
|
|
|
5964
6228
|
*
|
|
5965
6229
|
* During arbitrary generation, this applies an inclusive lower bound.
|
|
5966
6230
|
*
|
|
6231
|
+
* @stability stable
|
|
5967
6232
|
* @category validation
|
|
5968
6233
|
* @since 4.0.0
|
|
5969
6234
|
*/
|
|
@@ -5977,6 +6242,7 @@ export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, anno
|
|
|
5977
6242
|
*
|
|
5978
6243
|
* During arbitrary generation, this applies an exclusive upper bound.
|
|
5979
6244
|
*
|
|
6245
|
+
* @stability stable
|
|
5980
6246
|
* @category validation
|
|
5981
6247
|
* @since 4.0.0
|
|
5982
6248
|
*/
|
|
@@ -5996,6 +6262,7 @@ export declare const isLessThanDate: (exclusiveMaximum: globalThis.Date, annotat
|
|
|
5996
6262
|
*
|
|
5997
6263
|
* During arbitrary generation, this applies an inclusive upper bound.
|
|
5998
6264
|
*
|
|
6265
|
+
* @stability stable
|
|
5999
6266
|
* @category validation
|
|
6000
6267
|
* @since 4.0.0
|
|
6001
6268
|
*/
|
|
@@ -6015,6 +6282,7 @@ export declare const isLessThanOrEqualToDate: (maximum: globalThis.Date, annotat
|
|
|
6015
6282
|
*
|
|
6016
6283
|
* During arbitrary generation, this applies the specified lower and upper bounds.
|
|
6017
6284
|
*
|
|
6285
|
+
* @stability stable
|
|
6018
6286
|
* @category validation
|
|
6019
6287
|
* @since 4.0.0
|
|
6020
6288
|
*/
|
|
@@ -6033,6 +6301,7 @@ export declare const isBetweenDate: (options: {
|
|
|
6033
6301
|
*
|
|
6034
6302
|
* During arbitrary generation, this applies an exclusive lower bound.
|
|
6035
6303
|
*
|
|
6304
|
+
* @stability stable
|
|
6036
6305
|
* @category validation
|
|
6037
6306
|
* @since 4.0.0
|
|
6038
6307
|
*/
|
|
@@ -6047,6 +6316,7 @@ export declare const isGreaterThanBigInt: (exclusiveMinimum: bigint, annotations
|
|
|
6047
6316
|
*
|
|
6048
6317
|
* During arbitrary generation, this applies an inclusive lower bound.
|
|
6049
6318
|
*
|
|
6319
|
+
* @stability stable
|
|
6050
6320
|
* @category validation
|
|
6051
6321
|
* @since 4.0.0
|
|
6052
6322
|
*/
|
|
@@ -6060,6 +6330,7 @@ export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations
|
|
|
6060
6330
|
*
|
|
6061
6331
|
* During arbitrary generation, this applies an exclusive upper bound.
|
|
6062
6332
|
*
|
|
6333
|
+
* @stability stable
|
|
6063
6334
|
* @category validation
|
|
6064
6335
|
* @since 4.0.0
|
|
6065
6336
|
*/
|
|
@@ -6074,6 +6345,7 @@ export declare const isLessThanBigInt: (exclusiveMaximum: bigint, annotations?:
|
|
|
6074
6345
|
*
|
|
6075
6346
|
* During arbitrary generation, this applies an inclusive upper bound.
|
|
6076
6347
|
*
|
|
6348
|
+
* @stability stable
|
|
6077
6349
|
* @category validation
|
|
6078
6350
|
* @since 4.0.0
|
|
6079
6351
|
*/
|
|
@@ -6088,6 +6360,7 @@ export declare const isLessThanOrEqualToBigInt: (maximum: bigint, annotations?:
|
|
|
6088
6360
|
*
|
|
6089
6361
|
* During arbitrary generation, this applies the specified lower and upper bounds.
|
|
6090
6362
|
*
|
|
6363
|
+
* @stability stable
|
|
6091
6364
|
* @category validation
|
|
6092
6365
|
* @since 4.0.0
|
|
6093
6366
|
*/
|
|
@@ -6128,6 +6401,7 @@ export declare const isBetweenBigInt: (options: {
|
|
|
6128
6401
|
* Schema.is(NonEmptyArraySchema)([1]) // => true
|
|
6129
6402
|
* ```
|
|
6130
6403
|
*
|
|
6404
|
+
* @stability stable
|
|
6131
6405
|
* @category validation
|
|
6132
6406
|
* @since 4.0.0
|
|
6133
6407
|
*/
|
|
@@ -6150,6 +6424,7 @@ export declare function isMinLength(minLength: number, annotations?: Annotations
|
|
|
6150
6424
|
* During arbitrary generation, this applies a `minLength: 1`
|
|
6151
6425
|
* constraint to ensure generated strings or arrays are non-empty.
|
|
6152
6426
|
*
|
|
6427
|
+
* @stability stable
|
|
6153
6428
|
* @category validation
|
|
6154
6429
|
* @since 4.0.0
|
|
6155
6430
|
*/
|
|
@@ -6175,6 +6450,7 @@ export declare function isNonEmpty(annotations?: Annotations.Filter): SchemaAST.
|
|
|
6175
6450
|
* constraint to ensure generated strings or arrays have at most the required
|
|
6176
6451
|
* length.
|
|
6177
6452
|
*
|
|
6453
|
+
* @stability stable
|
|
6178
6454
|
* @category validation
|
|
6179
6455
|
* @since 4.0.0
|
|
6180
6456
|
*/
|
|
@@ -6201,6 +6477,7 @@ export declare function isMaxLength(maxLength: number, annotations?: Annotations
|
|
|
6201
6477
|
* `maxLength` constraints to ensure generated strings or arrays have a length
|
|
6202
6478
|
* within the specified range.
|
|
6203
6479
|
*
|
|
6480
|
+
* @stability stable
|
|
6204
6481
|
* @category validation
|
|
6205
6482
|
* @since 4.0.0
|
|
6206
6483
|
*/
|
|
@@ -6225,6 +6502,7 @@ export declare function isBetweenLength(minimum: number, maximum: number, annota
|
|
|
6225
6502
|
* @see {@link isMinLength} for counting UTF-16 code units
|
|
6226
6503
|
* @see {@link isMaxCodePoints}
|
|
6227
6504
|
* @see {@link isBetweenCodePoints}
|
|
6505
|
+
* @stability stable
|
|
6228
6506
|
* @category validation
|
|
6229
6507
|
* @since 4.0.0
|
|
6230
6508
|
*/
|
|
@@ -6247,6 +6525,7 @@ export declare function isMinCodePoints(minCodePoints: number, annotations?: Ann
|
|
|
6247
6525
|
* @see {@link isMaxLength} for counting UTF-16 code units
|
|
6248
6526
|
* @see {@link isMinCodePoints}
|
|
6249
6527
|
* @see {@link isBetweenCodePoints}
|
|
6528
|
+
* @stability stable
|
|
6250
6529
|
* @category validation
|
|
6251
6530
|
* @since 4.0.0
|
|
6252
6531
|
*/
|
|
@@ -6269,6 +6548,7 @@ export declare function isMaxCodePoints(maxCodePoints: number, annotations?: Ann
|
|
|
6269
6548
|
* @see {@link isBetweenLength} for counting UTF-16 code units
|
|
6270
6549
|
* @see {@link isMinCodePoints}
|
|
6271
6550
|
* @see {@link isMaxCodePoints}
|
|
6551
|
+
* @stability stable
|
|
6272
6552
|
* @category validation
|
|
6273
6553
|
* @since 4.0.0
|
|
6274
6554
|
*/
|
|
@@ -6290,6 +6570,7 @@ export declare function isBetweenCodePoints(minimum: number, maximum: number, an
|
|
|
6290
6570
|
*
|
|
6291
6571
|
* During arbitrary generation, this applies a node-local `minSize` constraint.
|
|
6292
6572
|
*
|
|
6573
|
+
* @stability stable
|
|
6293
6574
|
* @category validation
|
|
6294
6575
|
* @since 4.0.0
|
|
6295
6576
|
*/
|
|
@@ -6313,6 +6594,7 @@ export declare function isMinSize(minSize: number, annotations?: Annotations.Fil
|
|
|
6313
6594
|
*
|
|
6314
6595
|
* During arbitrary generation, this applies a node-local `maxSize` constraint.
|
|
6315
6596
|
*
|
|
6597
|
+
* @stability stable
|
|
6316
6598
|
* @category validation
|
|
6317
6599
|
* @since 4.0.0
|
|
6318
6600
|
*/
|
|
@@ -6336,6 +6618,7 @@ export declare function isMaxSize(maxSize: number, annotations?: Annotations.Fil
|
|
|
6336
6618
|
*
|
|
6337
6619
|
* During arbitrary generation, this applies node-local `minSize` and `maxSize` constraints.
|
|
6338
6620
|
*
|
|
6621
|
+
* @stability stable
|
|
6339
6622
|
* @category validation
|
|
6340
6623
|
* @since 4.0.0
|
|
6341
6624
|
*/
|
|
@@ -6362,6 +6645,7 @@ export declare function isBetweenSize(minimum: number, maximum: number, annotati
|
|
|
6362
6645
|
*
|
|
6363
6646
|
* During arbitrary generation, this applies a node-local `minProperties` constraint.
|
|
6364
6647
|
*
|
|
6648
|
+
* @stability stable
|
|
6365
6649
|
* @category validation
|
|
6366
6650
|
* @since 4.0.0
|
|
6367
6651
|
*/
|
|
@@ -6385,6 +6669,7 @@ export declare function isMinProperties(minProperties: number, annotations?: Ann
|
|
|
6385
6669
|
*
|
|
6386
6670
|
* During arbitrary generation, this applies a node-local `maxProperties` constraint.
|
|
6387
6671
|
*
|
|
6672
|
+
* @stability stable
|
|
6388
6673
|
* @category validation
|
|
6389
6674
|
* @since 4.0.0
|
|
6390
6675
|
*/
|
|
@@ -6408,6 +6693,7 @@ export declare function isMaxProperties(maxProperties: number, annotations?: Ann
|
|
|
6408
6693
|
*
|
|
6409
6694
|
* During arbitrary generation, this applies node-local `minProperties` and `maxProperties` constraints.
|
|
6410
6695
|
*
|
|
6696
|
+
* @stability stable
|
|
6411
6697
|
* @category validation
|
|
6412
6698
|
* @since 4.0.0
|
|
6413
6699
|
*/
|
|
@@ -6427,6 +6713,7 @@ export declare function isBetweenProperties(minimum: number, maximum: number, an
|
|
|
6427
6713
|
* names in the original input. Property transformations and excess-property
|
|
6428
6714
|
* handling can therefore produce different results.
|
|
6429
6715
|
*
|
|
6716
|
+
* @stability stable
|
|
6430
6717
|
* @category validation
|
|
6431
6718
|
* @since 4.0.0
|
|
6432
6719
|
*/
|
|
@@ -6443,6 +6730,7 @@ export declare function isPropertyNames(keySchema: Constraint, annotations?: Ann
|
|
|
6443
6730
|
* During arbitrary generation, this applies a node-local identity selector
|
|
6444
6731
|
* for constructive uniqueness using Effect equality.
|
|
6445
6732
|
*
|
|
6733
|
+
* @stability stable
|
|
6446
6734
|
* @category validation
|
|
6447
6735
|
* @since 4.0.0
|
|
6448
6736
|
*/
|
|
@@ -6459,6 +6747,7 @@ export declare function isUnique<T>(annotations?: Annotations.Filter): SchemaAST
|
|
|
6459
6747
|
* JSON Schema has no equivalent constraint, so this check is omitted from generated documents.
|
|
6460
6748
|
*
|
|
6461
6749
|
* @see {@link isUnique} for validating uniqueness of complete array elements
|
|
6750
|
+
* @stability stable
|
|
6462
6751
|
* @category validation
|
|
6463
6752
|
* @since 4.0.0
|
|
6464
6753
|
*/
|
|
@@ -6466,6 +6755,7 @@ export declare function isUniqueKey<Key, Value>(annotations?: Annotations.Filter
|
|
|
6466
6755
|
/**
|
|
6467
6756
|
* Type-level representation of {@link NonEmptyString}.
|
|
6468
6757
|
*
|
|
6758
|
+
* @stability stable
|
|
6469
6759
|
* @category models
|
|
6470
6760
|
* @since 3.10.0
|
|
6471
6761
|
*/
|
|
@@ -6476,6 +6766,7 @@ export interface NonEmptyString extends String {
|
|
|
6476
6766
|
* Schema for non-empty strings. Validates that a string has at least one
|
|
6477
6767
|
* character.
|
|
6478
6768
|
*
|
|
6769
|
+
* @stability stable
|
|
6479
6770
|
* @category schemas
|
|
6480
6771
|
* @since 3.10.0
|
|
6481
6772
|
*/
|
|
@@ -6483,6 +6774,7 @@ export declare const NonEmptyString: NonEmptyString;
|
|
|
6483
6774
|
/**
|
|
6484
6775
|
* Type-level representation of {@link Char}.
|
|
6485
6776
|
*
|
|
6777
|
+
* @stability stable
|
|
6486
6778
|
* @category models
|
|
6487
6779
|
* @since 3.10.0
|
|
6488
6780
|
*/
|
|
@@ -6505,6 +6797,7 @@ export interface Char extends String {
|
|
|
6505
6797
|
* @see {@link NonEmptyString} for strings with length greater than zero
|
|
6506
6798
|
* @see {@link isBetweenLength} for the underlying length check
|
|
6507
6799
|
*
|
|
6800
|
+
* @stability stable
|
|
6508
6801
|
* @category schemas
|
|
6509
6802
|
* @since 3.10.0
|
|
6510
6803
|
*/
|
|
@@ -6512,6 +6805,7 @@ export declare const Char: Char;
|
|
|
6512
6805
|
/**
|
|
6513
6806
|
* Type-level representation of {@link ErrorInstance}.
|
|
6514
6807
|
*
|
|
6808
|
+
* @stability stable
|
|
6515
6809
|
* @category models
|
|
6516
6810
|
* @since 4.0.0
|
|
6517
6811
|
*/
|
|
@@ -6521,6 +6815,7 @@ export interface ErrorInstance extends instanceOf<globalThis.Error> {
|
|
|
6521
6815
|
/**
|
|
6522
6816
|
* Options for {@link ErrorInstance} and {@link Defect}.
|
|
6523
6817
|
*
|
|
6818
|
+
* @stability stable
|
|
6524
6819
|
* @category options
|
|
6525
6820
|
* @since 4.0.0
|
|
6526
6821
|
*/
|
|
@@ -6551,6 +6846,7 @@ export interface ErrorOptions {
|
|
|
6551
6846
|
* traces are omitted by default for security. Pass `{ includeStack: true }` to
|
|
6552
6847
|
* include stack traces, or `{ excludeCause: true }` to omit causes.
|
|
6553
6848
|
*
|
|
6849
|
+
* @stability stable
|
|
6554
6850
|
* @category schemas
|
|
6555
6851
|
* @since 4.0.0
|
|
6556
6852
|
*/
|
|
@@ -6558,6 +6854,7 @@ export declare function ErrorInstance(options?: ErrorOptions): ErrorInstance;
|
|
|
6558
6854
|
/**
|
|
6559
6855
|
* Type-level representation of {@link Defect}.
|
|
6560
6856
|
*
|
|
6857
|
+
* @stability stable
|
|
6561
6858
|
* @category models
|
|
6562
6859
|
* @since 3.10.0
|
|
6563
6860
|
*/
|
|
@@ -6602,6 +6899,7 @@ export interface Defect extends decodeTo<Unknown, typeof Json> {
|
|
|
6602
6899
|
* string representation.
|
|
6603
6900
|
*
|
|
6604
6901
|
* @see {@link ErrorInstance} for a schema that only accepts JavaScript `Error` values.
|
|
6902
|
+
* @stability stable
|
|
6605
6903
|
* @category schemas
|
|
6606
6904
|
* @since 4.0.0
|
|
6607
6905
|
*/
|
|
@@ -6609,6 +6907,7 @@ export declare function Defect(options?: ErrorOptions): Defect;
|
|
|
6609
6907
|
/**
|
|
6610
6908
|
* Type-level representation returned by {@link ReadonlyMap}.
|
|
6611
6909
|
*
|
|
6910
|
+
* @stability stable
|
|
6612
6911
|
* @category models
|
|
6613
6912
|
* @since 4.0.0
|
|
6614
6913
|
*/
|
|
@@ -6621,6 +6920,7 @@ export interface $ReadonlyMap<Key extends Constraint, Value extends Constraint>
|
|
|
6621
6920
|
* Iso representation used for `ReadonlyMap` schemas: an array of readonly
|
|
6622
6921
|
* `[key, value]` tuples using each entry schema's `Iso` type.
|
|
6623
6922
|
*
|
|
6923
|
+
* @stability stable
|
|
6624
6924
|
* @category utility types
|
|
6625
6925
|
* @since 4.0.0
|
|
6626
6926
|
*/
|
|
@@ -6629,6 +6929,7 @@ export type ReadonlyMapIso<Key extends Constraint, Value extends Constraint> = R
|
|
|
6629
6929
|
* Schema for readonly maps whose keys and values conform to the provided
|
|
6630
6930
|
* schemas.
|
|
6631
6931
|
*
|
|
6932
|
+
* @stability stable
|
|
6632
6933
|
* @category schemas
|
|
6633
6934
|
* @since 3.10.0
|
|
6634
6935
|
*/
|
|
@@ -6636,6 +6937,7 @@ export declare function ReadonlyMap<Key extends Constraint, Value extends Constr
|
|
|
6636
6937
|
/**
|
|
6637
6938
|
* Type-level representation returned by {@link ReadonlySet}.
|
|
6638
6939
|
*
|
|
6940
|
+
* @stability stable
|
|
6639
6941
|
* @category models
|
|
6640
6942
|
* @since 4.0.0
|
|
6641
6943
|
*/
|
|
@@ -6647,6 +6949,7 @@ export interface $ReadonlySet<Value extends Constraint> extends declareConstruct
|
|
|
6647
6949
|
* Iso representation used for `ReadonlySet` schemas: an array of element values
|
|
6648
6950
|
* using the element schema's `Iso` type.
|
|
6649
6951
|
*
|
|
6952
|
+
* @stability stable
|
|
6650
6953
|
* @category utility types
|
|
6651
6954
|
* @since 4.0.0
|
|
6652
6955
|
*/
|
|
@@ -6654,6 +6957,7 @@ export type ReadonlySetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"
|
|
|
6654
6957
|
/**
|
|
6655
6958
|
* Schema for readonly sets whose values conform to the provided element schema.
|
|
6656
6959
|
*
|
|
6960
|
+
* @stability stable
|
|
6657
6961
|
* @category schemas
|
|
6658
6962
|
* @since 3.10.0
|
|
6659
6963
|
*/
|
|
@@ -6661,6 +6965,7 @@ export declare function ReadonlySet<Value extends Constraint>(value: Value): $Re
|
|
|
6661
6965
|
/**
|
|
6662
6966
|
* Type-level representation of {@link RegExp}.
|
|
6663
6967
|
*
|
|
6968
|
+
* @stability stable
|
|
6664
6969
|
* @category models
|
|
6665
6970
|
* @since 4.0.0
|
|
6666
6971
|
*/
|
|
@@ -6674,6 +6979,7 @@ export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
|
6674
6979
|
*
|
|
6675
6980
|
* The default JSON serializer encodes a `RegExp` as `{ source, flags }`.
|
|
6676
6981
|
*
|
|
6982
|
+
* @stability stable
|
|
6677
6983
|
* @category schemas
|
|
6678
6984
|
* @since 4.0.0
|
|
6679
6985
|
*/
|
|
@@ -6681,6 +6987,7 @@ export declare const RegExp: RegExp;
|
|
|
6681
6987
|
/**
|
|
6682
6988
|
* Type-level representation of {@link URL}.
|
|
6683
6989
|
*
|
|
6990
|
+
* @stability stable
|
|
6684
6991
|
* @category models
|
|
6685
6992
|
* @since 4.0.0
|
|
6686
6993
|
*/
|
|
@@ -6696,6 +7003,7 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
6696
7003
|
*
|
|
6697
7004
|
* - encodes `URL` as a `string`
|
|
6698
7005
|
*
|
|
7006
|
+
* @stability stable
|
|
6699
7007
|
* @category schemas
|
|
6700
7008
|
* @since 4.0.0
|
|
6701
7009
|
*/
|
|
@@ -6703,6 +7011,7 @@ export declare const URL: URL;
|
|
|
6703
7011
|
/**
|
|
6704
7012
|
* Type-level representation of {@link URLFromString}.
|
|
6705
7013
|
*
|
|
7014
|
+
* @stability stable
|
|
6706
7015
|
* @category models
|
|
6707
7016
|
* @since 4.0.0
|
|
6708
7017
|
*/
|
|
@@ -6720,6 +7029,7 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
6720
7029
|
* Encoding:
|
|
6721
7030
|
* - A `URL` is encoded as a `string`
|
|
6722
7031
|
*
|
|
7032
|
+
* @stability stable
|
|
6723
7033
|
* @category schemas
|
|
6724
7034
|
* @since 4.0.0
|
|
6725
7035
|
*/
|
|
@@ -6727,6 +7037,7 @@ export declare const URLFromString: URLFromString;
|
|
|
6727
7037
|
/**
|
|
6728
7038
|
* Type-level representation of {@link Date}.
|
|
6729
7039
|
*
|
|
7040
|
+
* @stability stable
|
|
6730
7041
|
* @category models
|
|
6731
7042
|
* @since 4.0.0
|
|
6732
7043
|
*/
|
|
@@ -6758,6 +7069,7 @@ export interface Date extends declare<globalThis.Date> {
|
|
|
6758
7069
|
* @see {@link DateFromString} for decoding strings into Date instances
|
|
6759
7070
|
* @see {@link DateFromMillis} for decoding epoch milliseconds into Date instances
|
|
6760
7071
|
*
|
|
7072
|
+
* @stability stable
|
|
6761
7073
|
* @category schemas
|
|
6762
7074
|
* @since 4.0.0
|
|
6763
7075
|
*/
|
|
@@ -6765,6 +7077,7 @@ export declare const Date: Date;
|
|
|
6765
7077
|
/**
|
|
6766
7078
|
* Type-level representation of {@link DateFromString}.
|
|
6767
7079
|
*
|
|
7080
|
+
* @stability stable
|
|
6768
7081
|
* @category models
|
|
6769
7082
|
* @since 3.10.0
|
|
6770
7083
|
*/
|
|
@@ -6793,6 +7106,7 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
6793
7106
|
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
6794
7107
|
* @see {@link Date} for accepting Date instances directly
|
|
6795
7108
|
*
|
|
7109
|
+
* @stability stable
|
|
6796
7110
|
* @category schemas
|
|
6797
7111
|
* @since 3.10.0
|
|
6798
7112
|
*/
|
|
@@ -6800,6 +7114,7 @@ export declare const DateFromString: DateFromString;
|
|
|
6800
7114
|
/**
|
|
6801
7115
|
* Type-level representation of {@link DateFromMillis}.
|
|
6802
7116
|
*
|
|
7117
|
+
* @stability stable
|
|
6803
7118
|
* @category models
|
|
6804
7119
|
* @since 4.0.0
|
|
6805
7120
|
*/
|
|
@@ -6831,6 +7146,7 @@ export interface DateFromMillis extends decodeTo<Date, Int> {
|
|
|
6831
7146
|
* @see {@link DateFromString} for decoding string-encoded dates
|
|
6832
7147
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
6833
7148
|
*
|
|
7149
|
+
* @stability stable
|
|
6834
7150
|
* @category schemas
|
|
6835
7151
|
* @since 4.0.0
|
|
6836
7152
|
*/
|
|
@@ -6838,6 +7154,7 @@ export declare const DateFromMillis: DateFromMillis;
|
|
|
6838
7154
|
/**
|
|
6839
7155
|
* Type-level representation returned by {@link fromJsonString}.
|
|
6840
7156
|
*
|
|
7157
|
+
* @stability stable
|
|
6841
7158
|
* @category models
|
|
6842
7159
|
* @since 4.0.0
|
|
6843
7160
|
*/
|
|
@@ -6870,6 +7187,7 @@ export interface fromJsonString<S extends Constraint> extends decodeTo<S, String
|
|
|
6870
7187
|
* Schema.encodeSync(schemaFromJsonString)({ a: 1 }) // => "{\n \"a\": 1\n}"
|
|
6871
7188
|
* ```
|
|
6872
7189
|
*
|
|
7190
|
+
* @stability stable
|
|
6873
7191
|
* @category schemas
|
|
6874
7192
|
* @since 4.0.0
|
|
6875
7193
|
*/
|
|
@@ -6881,6 +7199,7 @@ export declare function fromJsonString<S extends Constraint>(schema: S, options?
|
|
|
6881
7199
|
/**
|
|
6882
7200
|
* Type-level representation of {@link File}.
|
|
6883
7201
|
*
|
|
7202
|
+
* @stability stable
|
|
6884
7203
|
* @category models
|
|
6885
7204
|
* @since 4.0.0
|
|
6886
7205
|
*/
|
|
@@ -6895,6 +7214,7 @@ export interface File extends instanceOf<globalThis.File> {
|
|
|
6895
7214
|
* The default JSON serializer encodes a `File` as `{ data, type, name, lastModified }`
|
|
6896
7215
|
* where `data` is base64-encoded.
|
|
6897
7216
|
*
|
|
7217
|
+
* @stability stable
|
|
6898
7218
|
* @category schemas
|
|
6899
7219
|
* @since 4.0.0
|
|
6900
7220
|
*/
|
|
@@ -6902,6 +7222,7 @@ export declare const File: File;
|
|
|
6902
7222
|
/**
|
|
6903
7223
|
* Type-level representation of {@link FormData}.
|
|
6904
7224
|
*
|
|
7225
|
+
* @stability stable
|
|
6905
7226
|
* @category models
|
|
6906
7227
|
* @since 4.0.0
|
|
6907
7228
|
*/
|
|
@@ -6916,6 +7237,7 @@ export interface FormData extends instanceOf<globalThis.FormData> {
|
|
|
6916
7237
|
* The default JSON serializer encodes a `FormData` as an array of `[key, entry]`
|
|
6917
7238
|
* pairs where each entry is tagged as `"String"` or `"File"`.
|
|
6918
7239
|
*
|
|
7240
|
+
* @stability stable
|
|
6919
7241
|
* @category schemas
|
|
6920
7242
|
* @since 4.0.0
|
|
6921
7243
|
*/
|
|
@@ -6923,6 +7245,7 @@ export declare const FormData: FormData;
|
|
|
6923
7245
|
/**
|
|
6924
7246
|
* Type-level representation returned by {@link fromFormData}.
|
|
6925
7247
|
*
|
|
7248
|
+
* @stability stable
|
|
6926
7249
|
* @category models
|
|
6927
7250
|
* @since 4.0.0
|
|
6928
7251
|
*/
|
|
@@ -7008,6 +7331,7 @@ export interface fromFormData<S extends Constraint> extends decodeTo<S, FormData
|
|
|
7008
7331
|
* Schema.decodeUnknownSync(schema)(formData) // => { a: 1 }
|
|
7009
7332
|
* ```
|
|
7010
7333
|
*
|
|
7334
|
+
* @stability stable
|
|
7011
7335
|
* @category decoding
|
|
7012
7336
|
* @since 4.0.0
|
|
7013
7337
|
*/
|
|
@@ -7015,6 +7339,7 @@ export declare function fromFormData<S extends Constraint>(schema: S): fromFormD
|
|
|
7015
7339
|
/**
|
|
7016
7340
|
* Type-level representation of {@link URLSearchParams}.
|
|
7017
7341
|
*
|
|
7342
|
+
* @stability stable
|
|
7018
7343
|
* @category models
|
|
7019
7344
|
* @since 4.0.0
|
|
7020
7345
|
*/
|
|
@@ -7028,6 +7353,7 @@ export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams>
|
|
|
7028
7353
|
*
|
|
7029
7354
|
* The default JSON serializer encodes a `URLSearchParams` as a query string.
|
|
7030
7355
|
*
|
|
7356
|
+
* @stability stable
|
|
7031
7357
|
* @category schemas
|
|
7032
7358
|
* @since 4.0.0
|
|
7033
7359
|
*/
|
|
@@ -7035,6 +7361,7 @@ export declare const URLSearchParams: URLSearchParams;
|
|
|
7035
7361
|
/**
|
|
7036
7362
|
* Type-level representation returned by {@link fromURLSearchParams}.
|
|
7037
7363
|
*
|
|
7364
|
+
* @stability stable
|
|
7038
7365
|
* @category models
|
|
7039
7366
|
* @since 4.0.0
|
|
7040
7367
|
*/
|
|
@@ -7115,6 +7442,7 @@ export interface fromURLSearchParams<S extends Constraint> extends decodeTo<S, U
|
|
|
7115
7442
|
* Schema.decodeUnknownSync(schema)(urlSearchParams) // => { a: 1 }
|
|
7116
7443
|
* ```
|
|
7117
7444
|
*
|
|
7445
|
+
* @stability stable
|
|
7118
7446
|
* @category decoding
|
|
7119
7447
|
* @since 4.0.0
|
|
7120
7448
|
*/
|
|
@@ -7122,6 +7450,7 @@ export declare function fromURLSearchParams<S extends Constraint>(schema: S): fr
|
|
|
7122
7450
|
/**
|
|
7123
7451
|
* Type-level representation of {@link NumberFromString}.
|
|
7124
7452
|
*
|
|
7453
|
+
* @stability stable
|
|
7125
7454
|
* @category models
|
|
7126
7455
|
* @since 3.10.0
|
|
7127
7456
|
*/
|
|
@@ -7142,6 +7471,7 @@ export interface NumberFromString extends decodeTo<Number, String> {
|
|
|
7142
7471
|
* Encoding:
|
|
7143
7472
|
* A number is encoded as a `string`.
|
|
7144
7473
|
*
|
|
7474
|
+
* @stability stable
|
|
7145
7475
|
* @category schemas
|
|
7146
7476
|
* @since 3.10.0
|
|
7147
7477
|
*/
|
|
@@ -7149,6 +7479,7 @@ export declare const NumberFromString: NumberFromString;
|
|
|
7149
7479
|
/**
|
|
7150
7480
|
* Type-level representation of {@link FiniteFromString}.
|
|
7151
7481
|
*
|
|
7482
|
+
* @stability stable
|
|
7152
7483
|
* @category models
|
|
7153
7484
|
* @since 4.0.0
|
|
7154
7485
|
*/
|
|
@@ -7167,6 +7498,7 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
7167
7498
|
* Encoding:
|
|
7168
7499
|
* - A finite number is encoded as a `string`.
|
|
7169
7500
|
*
|
|
7501
|
+
* @stability stable
|
|
7170
7502
|
* @category schemas
|
|
7171
7503
|
* @since 4.0.0
|
|
7172
7504
|
*/
|
|
@@ -7174,6 +7506,7 @@ export declare const FiniteFromString: FiniteFromString;
|
|
|
7174
7506
|
/**
|
|
7175
7507
|
* Type-level representation of {@link BigIntFromString}.
|
|
7176
7508
|
*
|
|
7509
|
+
* @stability stable
|
|
7177
7510
|
* @category models
|
|
7178
7511
|
* @since 4.0.0
|
|
7179
7512
|
*/
|
|
@@ -7205,6 +7538,7 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
7205
7538
|
* @see {@link NumberFromString} for parsing JavaScript number strings, including non-finite values
|
|
7206
7539
|
* @see {@link BigDecimalFromString} for parsing decimal number strings
|
|
7207
7540
|
*
|
|
7541
|
+
* @stability stable
|
|
7208
7542
|
* @category schemas
|
|
7209
7543
|
* @since 4.0.0
|
|
7210
7544
|
*/
|
|
@@ -7212,6 +7546,7 @@ export declare const BigIntFromString: BigIntFromString;
|
|
|
7212
7546
|
/**
|
|
7213
7547
|
* Type-level representation of {@link Trimmed}.
|
|
7214
7548
|
*
|
|
7549
|
+
* @stability stable
|
|
7215
7550
|
* @category models
|
|
7216
7551
|
* @since 3.10.0
|
|
7217
7552
|
*/
|
|
@@ -7221,6 +7556,7 @@ export interface Trimmed extends String {
|
|
|
7221
7556
|
/**
|
|
7222
7557
|
* Schema for strings that contains no leading or trailing whitespaces.
|
|
7223
7558
|
*
|
|
7559
|
+
* @stability stable
|
|
7224
7560
|
* @category schemas
|
|
7225
7561
|
* @since 3.10.0
|
|
7226
7562
|
*/
|
|
@@ -7228,6 +7564,7 @@ export declare const Trimmed: Trimmed;
|
|
|
7228
7564
|
/**
|
|
7229
7565
|
* Type-level representation of {@link Trim}.
|
|
7230
7566
|
*
|
|
7567
|
+
* @stability stable
|
|
7231
7568
|
* @category models
|
|
7232
7569
|
* @since 3.10.0
|
|
7233
7570
|
*/
|
|
@@ -7245,6 +7582,7 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
7245
7582
|
* Encoding:
|
|
7246
7583
|
* - The trimmed string is encoded as is.
|
|
7247
7584
|
*
|
|
7585
|
+
* @stability stable
|
|
7248
7586
|
* @category schemas
|
|
7249
7587
|
* @since 3.10.0
|
|
7250
7588
|
*/
|
|
@@ -7252,6 +7590,7 @@ export declare const Trim: Trim;
|
|
|
7252
7590
|
/**
|
|
7253
7591
|
* Type-level representation of {@link StringFromBase64}.
|
|
7254
7592
|
*
|
|
7593
|
+
* @stability stable
|
|
7255
7594
|
* @category models
|
|
7256
7595
|
* @since 3.10.0
|
|
7257
7596
|
*/
|
|
@@ -7269,6 +7608,7 @@ export interface StringFromBase64 extends decodeTo<String, String> {
|
|
|
7269
7608
|
* Encoding:
|
|
7270
7609
|
* - A `string` is encoded as a base64-encoded string.
|
|
7271
7610
|
*
|
|
7611
|
+
* @stability stable
|
|
7272
7612
|
* @category schemas
|
|
7273
7613
|
* @since 3.10.0
|
|
7274
7614
|
*/
|
|
@@ -7276,6 +7616,7 @@ export declare const StringFromBase64: StringFromBase64;
|
|
|
7276
7616
|
/**
|
|
7277
7617
|
* Type-level representation of {@link StringFromBase64Url}.
|
|
7278
7618
|
*
|
|
7619
|
+
* @stability stable
|
|
7279
7620
|
* @category models
|
|
7280
7621
|
* @since 3.10.0
|
|
7281
7622
|
*/
|
|
@@ -7293,6 +7634,7 @@ export interface StringFromBase64Url extends decodeTo<String, String> {
|
|
|
7293
7634
|
* Encoding:
|
|
7294
7635
|
* - A `string` is encoded as a base64 (URL) encoded string.
|
|
7295
7636
|
*
|
|
7637
|
+
* @stability stable
|
|
7296
7638
|
* @category schemas
|
|
7297
7639
|
* @since 3.10.0
|
|
7298
7640
|
*/
|
|
@@ -7300,6 +7642,7 @@ export declare const StringFromBase64Url: StringFromBase64Url;
|
|
|
7300
7642
|
/**
|
|
7301
7643
|
* Type-level representation of {@link StringFromHex}.
|
|
7302
7644
|
*
|
|
7645
|
+
* @stability stable
|
|
7303
7646
|
* @category models
|
|
7304
7647
|
* @since 3.10.0
|
|
7305
7648
|
*/
|
|
@@ -7317,6 +7660,7 @@ export interface StringFromHex extends decodeTo<String, String> {
|
|
|
7317
7660
|
* Encoding:
|
|
7318
7661
|
* - A `string` is encoded as a hex string.
|
|
7319
7662
|
*
|
|
7663
|
+
* @stability stable
|
|
7320
7664
|
* @category schemas
|
|
7321
7665
|
* @since 3.10.0
|
|
7322
7666
|
*/
|
|
@@ -7324,6 +7668,7 @@ export declare const StringFromHex: StringFromHex;
|
|
|
7324
7668
|
/**
|
|
7325
7669
|
* Type-level representation of {@link StringFromUriComponent}.
|
|
7326
7670
|
*
|
|
7671
|
+
* @stability stable
|
|
7327
7672
|
* @category models
|
|
7328
7673
|
* @since 3.12.0
|
|
7329
7674
|
*/
|
|
@@ -7359,6 +7704,7 @@ export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
|
7359
7704
|
* Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 }) // => "%7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D"
|
|
7360
7705
|
* ```
|
|
7361
7706
|
*
|
|
7707
|
+
* @stability stable
|
|
7362
7708
|
* @category schemas
|
|
7363
7709
|
* @since 3.12.0
|
|
7364
7710
|
*/
|
|
@@ -7367,6 +7713,7 @@ export declare const StringFromUriComponent: StringFromUriComponent;
|
|
|
7367
7713
|
* Schema for property keys accepted by Effect schemas: finite `number`,
|
|
7368
7714
|
* `symbol`, or `string`.
|
|
7369
7715
|
*
|
|
7716
|
+
* @stability stable
|
|
7370
7717
|
* @category schemas
|
|
7371
7718
|
* @since 4.0.0
|
|
7372
7719
|
*/
|
|
@@ -7379,6 +7726,7 @@ export declare const PropertyKey: Union<readonly [Finite, Symbol, String]>;
|
|
|
7379
7726
|
* The result contains an `issues` array where each issue has a message and an
|
|
7380
7727
|
* optional path made of property keys or keyed path segments.
|
|
7381
7728
|
*
|
|
7729
|
+
* @stability stable
|
|
7382
7730
|
* @category schemas
|
|
7383
7731
|
* @since 4.0.0
|
|
7384
7732
|
*/
|
|
@@ -7396,6 +7744,7 @@ export declare const StandardSchemaV1FailureResult: Struct<{
|
|
|
7396
7744
|
/**
|
|
7397
7745
|
* Type-level representation of {@link BooleanFromBit}.
|
|
7398
7746
|
*
|
|
7747
|
+
* @stability stable
|
|
7399
7748
|
* @category models
|
|
7400
7749
|
* @since 4.0.0
|
|
7401
7750
|
*/
|
|
@@ -7418,6 +7767,7 @@ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0,
|
|
|
7418
7767
|
* @see {@link Boolean} for validating values that are already booleans
|
|
7419
7768
|
* @see {@link Literals} for keeping bit literals instead of decoding them
|
|
7420
7769
|
*
|
|
7770
|
+
* @stability stable
|
|
7421
7771
|
* @category schemas
|
|
7422
7772
|
* @since 4.0.0
|
|
7423
7773
|
*/
|
|
@@ -7425,6 +7775,7 @@ export declare const BooleanFromBit: BooleanFromBit;
|
|
|
7425
7775
|
/**
|
|
7426
7776
|
* Type-level representation of {@link Uint8Array}.
|
|
7427
7777
|
*
|
|
7778
|
+
* @stability stable
|
|
7428
7779
|
* @category models
|
|
7429
7780
|
* @since 4.0.0
|
|
7430
7781
|
*/
|
|
@@ -7440,6 +7791,7 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
7440
7791
|
*
|
|
7441
7792
|
* The default JSON serializer encodes Uint8Array as a Base64 encoded string.
|
|
7442
7793
|
*
|
|
7794
|
+
* @stability stable
|
|
7443
7795
|
* @category schemas
|
|
7444
7796
|
* @since 4.0.0
|
|
7445
7797
|
*/
|
|
@@ -7447,6 +7799,7 @@ export declare const Uint8Array: Uint8Array;
|
|
|
7447
7799
|
/**
|
|
7448
7800
|
* Type-level representation of {@link Uint8ArrayFromBase64}.
|
|
7449
7801
|
*
|
|
7802
|
+
* @stability stable
|
|
7450
7803
|
* @category models
|
|
7451
7804
|
* @since 3.10.0
|
|
7452
7805
|
*/
|
|
@@ -7465,6 +7818,7 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
7465
7818
|
* Encoding:
|
|
7466
7819
|
* - A `Uint8Array` is encoded as a base64-encoded string.
|
|
7467
7820
|
*
|
|
7821
|
+
* @stability stable
|
|
7468
7822
|
* @category schemas
|
|
7469
7823
|
* @since 3.10.0
|
|
7470
7824
|
*/
|
|
@@ -7472,6 +7826,7 @@ export declare const Uint8ArrayFromBase64: Uint8ArrayFromBase64;
|
|
|
7472
7826
|
/**
|
|
7473
7827
|
* Type-level representation of {@link Uint8ArrayFromBase64Url}.
|
|
7474
7828
|
*
|
|
7829
|
+
* @stability stable
|
|
7475
7830
|
* @category models
|
|
7476
7831
|
* @since 3.10.0
|
|
7477
7832
|
*/
|
|
@@ -7490,6 +7845,7 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
7490
7845
|
* Encoding:
|
|
7491
7846
|
* - A `Uint8Array` is encoded as a base64 (URL) encoded string.
|
|
7492
7847
|
*
|
|
7848
|
+
* @stability stable
|
|
7493
7849
|
* @category schemas
|
|
7494
7850
|
* @since 3.10.0
|
|
7495
7851
|
*/
|
|
@@ -7497,6 +7853,7 @@ export declare const Uint8ArrayFromBase64Url: Uint8ArrayFromBase64Url;
|
|
|
7497
7853
|
/**
|
|
7498
7854
|
* Type-level representation of {@link Uint8ArrayFromHex}.
|
|
7499
7855
|
*
|
|
7856
|
+
* @stability stable
|
|
7500
7857
|
* @category models
|
|
7501
7858
|
* @since 3.10.0
|
|
7502
7859
|
*/
|
|
@@ -7515,6 +7872,7 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
7515
7872
|
* Encoding:
|
|
7516
7873
|
* - A `Uint8Array` is encoded as a hex encoded string.
|
|
7517
7874
|
*
|
|
7875
|
+
* @stability stable
|
|
7518
7876
|
* @category schemas
|
|
7519
7877
|
* @since 3.10.0
|
|
7520
7878
|
*/
|
|
@@ -7522,6 +7880,7 @@ export declare const Uint8ArrayFromHex: Uint8ArrayFromHex;
|
|
|
7522
7880
|
/**
|
|
7523
7881
|
* Validates that a BigDecimal is greater than the specified value (exclusive).
|
|
7524
7882
|
*
|
|
7883
|
+
* @stability stable
|
|
7525
7884
|
* @category validation
|
|
7526
7885
|
* @since 4.0.0
|
|
7527
7886
|
*/
|
|
@@ -7530,6 +7889,7 @@ export declare const isGreaterThanBigDecimal: (exclusiveMinimum: BigDecimal_.Big
|
|
|
7530
7889
|
* Validates that a BigDecimal is greater than or equal to the specified value
|
|
7531
7890
|
* (inclusive).
|
|
7532
7891
|
*
|
|
7892
|
+
* @stability stable
|
|
7533
7893
|
* @category validation
|
|
7534
7894
|
* @since 4.0.0
|
|
7535
7895
|
*/
|
|
@@ -7537,6 +7897,7 @@ export declare const isGreaterThanOrEqualToBigDecimal: (minimum: BigDecimal_.Big
|
|
|
7537
7897
|
/**
|
|
7538
7898
|
* Validates that a BigDecimal is less than the specified value (exclusive).
|
|
7539
7899
|
*
|
|
7900
|
+
* @stability stable
|
|
7540
7901
|
* @category validation
|
|
7541
7902
|
* @since 4.0.0
|
|
7542
7903
|
*/
|
|
@@ -7545,6 +7906,7 @@ export declare const isLessThanBigDecimal: (exclusiveMaximum: BigDecimal_.BigDec
|
|
|
7545
7906
|
* Validates that a BigDecimal is less than or equal to the specified value
|
|
7546
7907
|
* (inclusive).
|
|
7547
7908
|
*
|
|
7909
|
+
* @stability stable
|
|
7548
7910
|
* @category validation
|
|
7549
7911
|
* @since 4.0.0
|
|
7550
7912
|
*/
|
|
@@ -7557,6 +7919,7 @@ export declare const isLessThanOrEqualToBigDecimal: (maximum: BigDecimal_.BigDec
|
|
|
7557
7919
|
* The minimum and maximum boundaries are inclusive by default. Pass
|
|
7558
7920
|
* `exclusiveMinimum` or `exclusiveMaximum` to exclude either boundary.
|
|
7559
7921
|
*
|
|
7922
|
+
* @stability stable
|
|
7560
7923
|
* @category validation
|
|
7561
7924
|
* @since 4.0.0
|
|
7562
7925
|
*/
|
|
@@ -7569,6 +7932,7 @@ export declare const isBetweenBigDecimal: (options: {
|
|
|
7569
7932
|
/**
|
|
7570
7933
|
* Type-level representation of {@link BigDecimal}.
|
|
7571
7934
|
*
|
|
7935
|
+
* @stability stable
|
|
7572
7936
|
* @category models
|
|
7573
7937
|
* @since 3.10.0
|
|
7574
7938
|
*/
|
|
@@ -7591,6 +7955,7 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
7591
7955
|
*
|
|
7592
7956
|
* @see {@link BigDecimalFromString} for parsing string input into a BigDecimal
|
|
7593
7957
|
*
|
|
7958
|
+
* @stability stable
|
|
7594
7959
|
* @category schemas
|
|
7595
7960
|
* @since 3.10.0
|
|
7596
7961
|
*/
|
|
@@ -7598,6 +7963,7 @@ export declare const BigDecimal: BigDecimal;
|
|
|
7598
7963
|
/**
|
|
7599
7964
|
* Type-level representation of {@link BigDecimalFromString}.
|
|
7600
7965
|
*
|
|
7966
|
+
* @stability stable
|
|
7601
7967
|
* @category models
|
|
7602
7968
|
* @since 4.0.0
|
|
7603
7969
|
*/
|
|
@@ -7628,6 +7994,7 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
7628
7994
|
* @see {@link BigIntFromString} for parsing base-10 integer strings into bigint values
|
|
7629
7995
|
* @see {@link NumberFromString} for parsing JavaScript number strings
|
|
7630
7996
|
*
|
|
7997
|
+
* @stability stable
|
|
7631
7998
|
* @category schemas
|
|
7632
7999
|
* @since 4.0.0
|
|
7633
8000
|
*/
|
|
@@ -7635,6 +8002,7 @@ export declare const BigDecimalFromString: BigDecimalFromString;
|
|
|
7635
8002
|
/**
|
|
7636
8003
|
* Type-level representation of {@link ByteSize}.
|
|
7637
8004
|
*
|
|
8005
|
+
* @stability unstable
|
|
7638
8006
|
* @category models
|
|
7639
8007
|
* @since 4.0.0
|
|
7640
8008
|
*/
|
|
@@ -7650,6 +8018,7 @@ export interface ByteSize extends declare<ByteSize_.ByteSize> {
|
|
|
7650
8018
|
* beyond JavaScript's safe-integer range. The StringTree codec uses the
|
|
7651
8019
|
* human-readable byte-size syntax exposed by {@link ByteSizeFromString}.
|
|
7652
8020
|
*
|
|
8021
|
+
* @stability unstable
|
|
7653
8022
|
* @category schemas
|
|
7654
8023
|
* @since 4.0.0
|
|
7655
8024
|
*/
|
|
@@ -7657,6 +8026,7 @@ export declare const ByteSize: ByteSize;
|
|
|
7657
8026
|
/**
|
|
7658
8027
|
* Type-level representation of {@link ByteSizeFromString}.
|
|
7659
8028
|
*
|
|
8029
|
+
* @stability unstable
|
|
7660
8030
|
* @category models
|
|
7661
8031
|
* @since 4.0.0
|
|
7662
8032
|
*/
|
|
@@ -7689,6 +8059,7 @@ export interface ByteSizeFromString extends decodeTo<ByteSize, String> {
|
|
|
7689
8059
|
* A unit is required. Signs, exponent notation, digit separators, and ambiguous
|
|
7690
8060
|
* unit spellings such as `KB`, `mb`, `Mb`, or `b` are rejected.
|
|
7691
8061
|
*
|
|
8062
|
+
* @stability unstable
|
|
7692
8063
|
* @category schemas
|
|
7693
8064
|
* @since 4.0.0
|
|
7694
8065
|
*/
|
|
@@ -7696,6 +8067,7 @@ export declare const ByteSizeFromString: ByteSizeFromString;
|
|
|
7696
8067
|
/**
|
|
7697
8068
|
* Type-level representation of {@link ByteSizeFromBigInt}.
|
|
7698
8069
|
*
|
|
8070
|
+
* @stability unstable
|
|
7699
8071
|
* @category models
|
|
7700
8072
|
* @since 4.0.0
|
|
7701
8073
|
*/
|
|
@@ -7705,6 +8077,7 @@ export interface ByteSizeFromBigInt extends decodeTo<ByteSize, BigInt> {
|
|
|
7705
8077
|
/**
|
|
7706
8078
|
* Schema that decodes non-negative bigint byte counts.
|
|
7707
8079
|
*
|
|
8080
|
+
* @stability unstable
|
|
7708
8081
|
* @category schemas
|
|
7709
8082
|
* @since 4.0.0
|
|
7710
8083
|
*/
|
|
@@ -7712,6 +8085,7 @@ export declare const ByteSizeFromBigInt: ByteSizeFromBigInt;
|
|
|
7712
8085
|
/**
|
|
7713
8086
|
* Type-level representation of {@link ByteSizeFromNumber}.
|
|
7714
8087
|
*
|
|
8088
|
+
* @stability unstable
|
|
7715
8089
|
* @category models
|
|
7716
8090
|
* @since 4.0.0
|
|
7717
8091
|
*/
|
|
@@ -7725,6 +8099,7 @@ export interface ByteSizeFromNumber extends decodeTo<ByteSize, Number> {
|
|
|
7725
8099
|
*
|
|
7726
8100
|
* Encoding fails when the byte count exceeds `Number.MAX_SAFE_INTEGER`.
|
|
7727
8101
|
*
|
|
8102
|
+
* @stability unstable
|
|
7728
8103
|
* @category schemas
|
|
7729
8104
|
* @since 4.0.0
|
|
7730
8105
|
*/
|
|
@@ -7732,6 +8107,7 @@ export declare const ByteSizeFromNumber: ByteSizeFromNumber;
|
|
|
7732
8107
|
/**
|
|
7733
8108
|
* Type-level representation returned by {@link CauseReason}.
|
|
7734
8109
|
*
|
|
8110
|
+
* @stability stable
|
|
7735
8111
|
* @category models
|
|
7736
8112
|
* @since 4.0.0
|
|
7737
8113
|
*/
|
|
@@ -7748,6 +8124,7 @@ export interface CauseReason<E extends Constraint, D extends Constraint> extends
|
|
|
7748
8124
|
* Failures are represented with a `Fail` tag and encoded error, defects with a
|
|
7749
8125
|
* `Die` tag and encoded defect, and interrupts with an optional `fiberId`.
|
|
7750
8126
|
*
|
|
8127
|
+
* @stability stable
|
|
7751
8128
|
* @category utility types
|
|
7752
8129
|
* @since 4.0.0
|
|
7753
8130
|
*/
|
|
@@ -7778,6 +8155,7 @@ export type CauseReasonIso<E extends Constraint, D extends Constraint> = {
|
|
|
7778
8155
|
* @see {@link Cause} for constructing schemas for full Cause values
|
|
7779
8156
|
* @see {@link CauseReasonIso} for the ISO shape of each cause reason
|
|
7780
8157
|
*
|
|
8158
|
+
* @stability stable
|
|
7781
8159
|
* @category schemas
|
|
7782
8160
|
* @since 4.0.0
|
|
7783
8161
|
*/
|
|
@@ -7785,6 +8163,7 @@ export declare function CauseReason<E extends Constraint, D extends Constraint>(
|
|
|
7785
8163
|
/**
|
|
7786
8164
|
* Type-level representation returned by {@link Cause}.
|
|
7787
8165
|
*
|
|
8166
|
+
* @stability stable
|
|
7788
8167
|
* @category models
|
|
7789
8168
|
* @since 3.10.0
|
|
7790
8169
|
*/
|
|
@@ -7805,6 +8184,7 @@ export interface Cause<E extends Constraint, D extends Constraint> extends decla
|
|
|
7805
8184
|
* @see {@link Cause} for constructing schemas for full Cause values
|
|
7806
8185
|
* @see {@link CauseReasonIso} for the ISO shape of each array element
|
|
7807
8186
|
*
|
|
8187
|
+
* @stability stable
|
|
7808
8188
|
* @category utility types
|
|
7809
8189
|
* @since 4.0.0
|
|
7810
8190
|
*/
|
|
@@ -7827,6 +8207,7 @@ export type CauseIso<E extends Constraint, D extends Constraint> = ReadonlyArray
|
|
|
7827
8207
|
* @see {@link CauseReason} for the schema used by each individual cause reason
|
|
7828
8208
|
* @see {@link CauseIso} for the ordered array representation used by the schema ISO
|
|
7829
8209
|
*
|
|
8210
|
+
* @stability stable
|
|
7830
8211
|
* @category schemas
|
|
7831
8212
|
* @since 3.10.0
|
|
7832
8213
|
*/
|
|
@@ -7834,6 +8215,7 @@ export declare function Cause<E extends Constraint, D extends Constraint>(error:
|
|
|
7834
8215
|
/**
|
|
7835
8216
|
* Type-level representation returned by {@link Chunk}.
|
|
7836
8217
|
*
|
|
8218
|
+
* @stability stable
|
|
7837
8219
|
* @category models
|
|
7838
8220
|
* @since 3.10.0
|
|
7839
8221
|
*/
|
|
@@ -7852,6 +8234,7 @@ export interface Chunk<Value extends Constraint> extends declareConstructor<Chun
|
|
|
7852
8234
|
*
|
|
7853
8235
|
* @see {@link Chunk} for the schema interface and constructor that use this ISO representation
|
|
7854
8236
|
*
|
|
8237
|
+
* @stability stable
|
|
7855
8238
|
* @category utility types
|
|
7856
8239
|
* @since 4.0.0
|
|
7857
8240
|
*/
|
|
@@ -7859,6 +8242,7 @@ export type ChunkIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
|
|
|
7859
8242
|
/**
|
|
7860
8243
|
* Schema for chunks whose values conform to the provided element schema.
|
|
7861
8244
|
*
|
|
8245
|
+
* @stability stable
|
|
7862
8246
|
* @category schemas
|
|
7863
8247
|
* @since 3.10.0
|
|
7864
8248
|
*/
|
|
@@ -7866,6 +8250,7 @@ export declare function Chunk<Value extends Constraint>(value: Value): Chunk<Val
|
|
|
7866
8250
|
/**
|
|
7867
8251
|
* Type-level representation of {@link DateTimeUtc}.
|
|
7868
8252
|
*
|
|
8253
|
+
* @stability stable
|
|
7869
8254
|
* @category models
|
|
7870
8255
|
* @since 3.10.0
|
|
7871
8256
|
*/
|
|
@@ -7890,6 +8275,7 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
7890
8275
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7891
8276
|
* @see {@link DateTimeZoned} for preserving zoned DateTime values
|
|
7892
8277
|
*
|
|
8278
|
+
* @stability stable
|
|
7893
8279
|
* @category schemas
|
|
7894
8280
|
* @since 3.10.0
|
|
7895
8281
|
*/
|
|
@@ -7897,6 +8283,7 @@ export declare const DateTimeUtc: DateTimeUtc;
|
|
|
7897
8283
|
/**
|
|
7898
8284
|
* Type-level representation of {@link DateTimeUtcFromDate}.
|
|
7899
8285
|
*
|
|
8286
|
+
* @stability stable
|
|
7900
8287
|
* @category models
|
|
7901
8288
|
* @since 3.12.0
|
|
7902
8289
|
*/
|
|
@@ -7924,6 +8311,7 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
7924
8311
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7925
8312
|
* @see {@link Date} for validating Date instances without converting them
|
|
7926
8313
|
*
|
|
8314
|
+
* @stability stable
|
|
7927
8315
|
* @category schemas
|
|
7928
8316
|
* @since 3.12.0
|
|
7929
8317
|
*/
|
|
@@ -7931,6 +8319,7 @@ export declare const DateTimeUtcFromDate: DateTimeUtcFromDate;
|
|
|
7931
8319
|
/**
|
|
7932
8320
|
* Type-level representation of {@link DateTimeUtcFromString}.
|
|
7933
8321
|
*
|
|
8322
|
+
* @stability stable
|
|
7934
8323
|
* @category models
|
|
7935
8324
|
* @since 4.0.0
|
|
7936
8325
|
*/
|
|
@@ -7955,6 +8344,7 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
7955
8344
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7956
8345
|
* @see {@link DateFromString} for decoding strings into JavaScript Date instances
|
|
7957
8346
|
*
|
|
8347
|
+
* @stability stable
|
|
7958
8348
|
* @category schemas
|
|
7959
8349
|
* @since 4.0.0
|
|
7960
8350
|
*/
|
|
@@ -7962,6 +8352,7 @@ export declare const DateTimeUtcFromString: DateTimeUtcFromString;
|
|
|
7962
8352
|
/**
|
|
7963
8353
|
* Type-level representation of {@link DateTimeUtcFromMillis}.
|
|
7964
8354
|
*
|
|
8355
|
+
* @stability stable
|
|
7965
8356
|
* @category models
|
|
7966
8357
|
* @since 4.0.0
|
|
7967
8358
|
*/
|
|
@@ -7983,6 +8374,7 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
7983
8374
|
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
7984
8375
|
* @see {@link DateFromMillis} for decoding epoch milliseconds into JavaScript Date instances
|
|
7985
8376
|
*
|
|
8377
|
+
* @stability stable
|
|
7986
8378
|
* @category schemas
|
|
7987
8379
|
* @since 4.0.0
|
|
7988
8380
|
*/
|
|
@@ -7990,6 +8382,7 @@ export declare const DateTimeUtcFromMillis: DateTimeUtcFromMillis;
|
|
|
7990
8382
|
/**
|
|
7991
8383
|
* Type-level representation of {@link TimeZoneOffset}.
|
|
7992
8384
|
*
|
|
8385
|
+
* @stability stable
|
|
7993
8386
|
* @category models
|
|
7994
8387
|
* @since 3.10.0
|
|
7995
8388
|
*/
|
|
@@ -8005,6 +8398,7 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
8005
8398
|
*
|
|
8006
8399
|
* - encodes `DateTime.TimeZone.Offset` as a number (offset in milliseconds)
|
|
8007
8400
|
*
|
|
8401
|
+
* @stability stable
|
|
8008
8402
|
* @category schemas
|
|
8009
8403
|
* @since 3.10.0
|
|
8010
8404
|
*/
|
|
@@ -8012,6 +8406,7 @@ export declare const TimeZoneOffset: TimeZoneOffset;
|
|
|
8012
8406
|
/**
|
|
8013
8407
|
* Type-level representation of {@link TimeZoneNamed}.
|
|
8014
8408
|
*
|
|
8409
|
+
* @stability stable
|
|
8015
8410
|
* @category models
|
|
8016
8411
|
* @since 3.10.0
|
|
8017
8412
|
*/
|
|
@@ -8027,6 +8422,7 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
8027
8422
|
*
|
|
8028
8423
|
* - encodes `DateTime.TimeZone.Named` as a string (IANA time zone identifier)
|
|
8029
8424
|
*
|
|
8425
|
+
* @stability stable
|
|
8030
8426
|
* @category schemas
|
|
8031
8427
|
* @since 3.10.0
|
|
8032
8428
|
*/
|
|
@@ -8034,6 +8430,7 @@ export declare const TimeZoneNamed: TimeZoneNamed;
|
|
|
8034
8430
|
/**
|
|
8035
8431
|
* Type-level representation of {@link TimeZoneNamedFromString}.
|
|
8036
8432
|
*
|
|
8433
|
+
* @stability stable
|
|
8037
8434
|
* @category models
|
|
8038
8435
|
* @since 4.0.0
|
|
8039
8436
|
*/
|
|
@@ -8051,6 +8448,7 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
8051
8448
|
* Encoding:
|
|
8052
8449
|
* - A `DateTime.TimeZone.Named` is encoded as a `string`.
|
|
8053
8450
|
*
|
|
8451
|
+
* @stability stable
|
|
8054
8452
|
* @category schemas
|
|
8055
8453
|
* @since 4.0.0
|
|
8056
8454
|
*/
|
|
@@ -8058,6 +8456,7 @@ export declare const TimeZoneNamedFromString: TimeZoneNamedFromString;
|
|
|
8058
8456
|
/**
|
|
8059
8457
|
* Type-level representation of {@link TimeZone}.
|
|
8060
8458
|
*
|
|
8459
|
+
* @stability stable
|
|
8061
8460
|
* @category models
|
|
8062
8461
|
* @since 3.10.0
|
|
8063
8462
|
*/
|
|
@@ -8074,6 +8473,7 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
8074
8473
|
* - encodes `DateTime.TimeZone` as a string (IANA identifier or offset like
|
|
8075
8474
|
* `+03:00`)
|
|
8076
8475
|
*
|
|
8476
|
+
* @stability stable
|
|
8077
8477
|
* @category schemas
|
|
8078
8478
|
* @since 3.10.0
|
|
8079
8479
|
*/
|
|
@@ -8081,6 +8481,7 @@ export declare const TimeZone: TimeZone;
|
|
|
8081
8481
|
/**
|
|
8082
8482
|
* Type-level representation of {@link TimeZoneFromString}.
|
|
8083
8483
|
*
|
|
8484
|
+
* @stability stable
|
|
8084
8485
|
* @category models
|
|
8085
8486
|
* @since 4.0.0
|
|
8086
8487
|
*/
|
|
@@ -8098,6 +8499,7 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
8098
8499
|
* Encoding:
|
|
8099
8500
|
* - A `DateTime.TimeZone` is encoded as a `string`.
|
|
8100
8501
|
*
|
|
8502
|
+
* @stability stable
|
|
8101
8503
|
* @category schemas
|
|
8102
8504
|
* @since 4.0.0
|
|
8103
8505
|
*/
|
|
@@ -8105,6 +8507,7 @@ export declare const TimeZoneFromString: TimeZoneFromString;
|
|
|
8105
8507
|
/**
|
|
8106
8508
|
* Type-level representation of {@link DateTimeZoned}.
|
|
8107
8509
|
*
|
|
8510
|
+
* @stability stable
|
|
8108
8511
|
* @category models
|
|
8109
8512
|
* @since 3.10.0
|
|
8110
8513
|
*/
|
|
@@ -8123,6 +8526,7 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
8123
8526
|
* - encodes named zones by appending the IANA identifier in brackets, such as
|
|
8124
8527
|
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`
|
|
8125
8528
|
*
|
|
8529
|
+
* @stability stable
|
|
8126
8530
|
* @category schemas
|
|
8127
8531
|
* @since 3.10.0
|
|
8128
8532
|
*/
|
|
@@ -8130,6 +8534,7 @@ export declare const DateTimeZoned: DateTimeZoned;
|
|
|
8130
8534
|
/**
|
|
8131
8535
|
* Type-level representation of {@link DateTimeZonedFromString}.
|
|
8132
8536
|
*
|
|
8537
|
+
* @stability stable
|
|
8133
8538
|
* @category models
|
|
8134
8539
|
* @since 4.0.0
|
|
8135
8540
|
*/
|
|
@@ -8147,6 +8552,7 @@ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String>
|
|
|
8147
8552
|
* Encoding:
|
|
8148
8553
|
* - A `DateTime.Zoned` is encoded as a `string`.
|
|
8149
8554
|
*
|
|
8555
|
+
* @stability stable
|
|
8150
8556
|
* @category schemas
|
|
8151
8557
|
* @since 4.0.0
|
|
8152
8558
|
*/
|
|
@@ -9116,9 +9522,188 @@ export interface SocketAddress extends declare<NetAddress_.SocketAddress> {
|
|
|
9116
9522
|
* @since 4.0.0
|
|
9117
9523
|
*/
|
|
9118
9524
|
export declare const SocketAddress: SocketAddress;
|
|
9525
|
+
/**
|
|
9526
|
+
* Type-level representation of {@link DomainName}.
|
|
9527
|
+
*
|
|
9528
|
+
* @stability experimental
|
|
9529
|
+
* @category models
|
|
9530
|
+
* @since 4.0.0
|
|
9531
|
+
*/
|
|
9532
|
+
export interface DomainName extends brand<String, "~effect/net/Host/DomainName"> {
|
|
9533
|
+
readonly "Rebuild": DomainName;
|
|
9534
|
+
}
|
|
9535
|
+
/**
|
|
9536
|
+
* Schema for normalized DNS domain names.
|
|
9537
|
+
*
|
|
9538
|
+
* **Details**
|
|
9539
|
+
*
|
|
9540
|
+
* Only names already in normalized form (lowercase ASCII, with
|
|
9541
|
+
* internationalized labels in `xn--` form) are accepted. Use
|
|
9542
|
+
* {@link DomainNameFromString} to normalize arbitrary input.
|
|
9543
|
+
*
|
|
9544
|
+
* @stability experimental
|
|
9545
|
+
* @category schemas
|
|
9546
|
+
* @since 4.0.0
|
|
9547
|
+
*/
|
|
9548
|
+
export declare const DomainName: DomainName;
|
|
9549
|
+
/**
|
|
9550
|
+
* Type-level representation of {@link DomainNameFromString}.
|
|
9551
|
+
*
|
|
9552
|
+
* @stability experimental
|
|
9553
|
+
* @category models
|
|
9554
|
+
* @since 4.0.0
|
|
9555
|
+
*/
|
|
9556
|
+
export interface DomainNameFromString extends decodeTo<DomainName, String> {
|
|
9557
|
+
readonly "Rebuild": DomainNameFromString;
|
|
9558
|
+
}
|
|
9559
|
+
/**
|
|
9560
|
+
* Schema for DNS domain names decoded from strings, normalizing case and
|
|
9561
|
+
* converting internationalized names to their ASCII form.
|
|
9562
|
+
*
|
|
9563
|
+
* @stability experimental
|
|
9564
|
+
* @category schemas
|
|
9565
|
+
* @since 4.0.0
|
|
9566
|
+
*/
|
|
9567
|
+
export declare const DomainNameFromString: DomainNameFromString;
|
|
9568
|
+
/**
|
|
9569
|
+
* Type-level representation of {@link ScopedIpv6Literal}.
|
|
9570
|
+
*
|
|
9571
|
+
* @stability experimental
|
|
9572
|
+
* @category models
|
|
9573
|
+
* @since 4.0.0
|
|
9574
|
+
*/
|
|
9575
|
+
export interface ScopedIpv6Literal extends brand<String, "~effect/net/NetAddress/ScopedIpv6Literal"> {
|
|
9576
|
+
readonly "Rebuild": ScopedIpv6Literal;
|
|
9577
|
+
}
|
|
9578
|
+
/**
|
|
9579
|
+
* Schema for canonical scoped IPv6 literals such as `fe80::1%eth0`.
|
|
9580
|
+
*
|
|
9581
|
+
* @stability experimental
|
|
9582
|
+
* @category schemas
|
|
9583
|
+
* @since 4.0.0
|
|
9584
|
+
*/
|
|
9585
|
+
export declare const ScopedIpv6Literal: ScopedIpv6Literal;
|
|
9586
|
+
/**
|
|
9587
|
+
* Type-level representation of {@link ScopedIpv6LiteralFromString}.
|
|
9588
|
+
*
|
|
9589
|
+
* @stability experimental
|
|
9590
|
+
* @category models
|
|
9591
|
+
* @since 4.0.0
|
|
9592
|
+
*/
|
|
9593
|
+
export interface ScopedIpv6LiteralFromString extends decodeTo<ScopedIpv6Literal, String> {
|
|
9594
|
+
readonly "Rebuild": ScopedIpv6LiteralFromString;
|
|
9595
|
+
}
|
|
9596
|
+
/**
|
|
9597
|
+
* Schema for scoped IPv6 literals decoded from strings, normalizing the address
|
|
9598
|
+
* and numeric zones.
|
|
9599
|
+
*
|
|
9600
|
+
* @stability experimental
|
|
9601
|
+
* @category schemas
|
|
9602
|
+
* @since 4.0.0
|
|
9603
|
+
*/
|
|
9604
|
+
export declare const ScopedIpv6LiteralFromString: ScopedIpv6LiteralFromString;
|
|
9605
|
+
/**
|
|
9606
|
+
* Type-level representation of {@link Host}.
|
|
9607
|
+
*
|
|
9608
|
+
* @stability experimental
|
|
9609
|
+
* @category models
|
|
9610
|
+
* @since 4.0.0
|
|
9611
|
+
*/
|
|
9612
|
+
export interface Host extends Union<readonly [IpAddress, ScopedIpv6Literal, DomainName]> {
|
|
9613
|
+
readonly "Rebuild": Host;
|
|
9614
|
+
}
|
|
9615
|
+
/**
|
|
9616
|
+
* Schema for hosts: numeric IP addresses, scoped IPv6 literals, or domain names.
|
|
9617
|
+
*
|
|
9618
|
+
* @stability experimental
|
|
9619
|
+
* @category schemas
|
|
9620
|
+
* @since 4.0.0
|
|
9621
|
+
*/
|
|
9622
|
+
export declare const Host: Host;
|
|
9623
|
+
/**
|
|
9624
|
+
* Type-level representation of {@link HostFromString}.
|
|
9625
|
+
*
|
|
9626
|
+
* @stability experimental
|
|
9627
|
+
* @category models
|
|
9628
|
+
* @since 4.0.0
|
|
9629
|
+
*/
|
|
9630
|
+
export interface HostFromString extends Union<readonly [IpAddressFromString, ScopedIpv6LiteralFromString, DomainNameFromString]> {
|
|
9631
|
+
readonly "Rebuild": HostFromString;
|
|
9632
|
+
}
|
|
9633
|
+
/**
|
|
9634
|
+
* Schema for hosts decoded from strings. Numeric IP strings decode to IP
|
|
9635
|
+
* addresses; other strings decode to scoped IPv6 literals or domain names.
|
|
9636
|
+
*
|
|
9637
|
+
* @stability experimental
|
|
9638
|
+
* @category schemas
|
|
9639
|
+
* @since 4.0.0
|
|
9640
|
+
*/
|
|
9641
|
+
export declare const HostFromString: HostFromString;
|
|
9642
|
+
/**
|
|
9643
|
+
* Type-level representation of {@link HostPort}.
|
|
9644
|
+
*
|
|
9645
|
+
* @stability experimental
|
|
9646
|
+
* @category models
|
|
9647
|
+
* @since 4.0.0
|
|
9648
|
+
*/
|
|
9649
|
+
export interface HostPort extends declare<Host_.HostPort> {
|
|
9650
|
+
readonly "Rebuild": HostPort;
|
|
9651
|
+
}
|
|
9652
|
+
/**
|
|
9653
|
+
* Schema for already-constructed unresolved host and port values.
|
|
9654
|
+
*
|
|
9655
|
+
* @stability experimental
|
|
9656
|
+
* @category schemas
|
|
9657
|
+
* @since 4.0.0
|
|
9658
|
+
*/
|
|
9659
|
+
export declare const HostPort: HostPort;
|
|
9660
|
+
/**
|
|
9661
|
+
* Type-level representation of {@link HostPortFromString}.
|
|
9662
|
+
*
|
|
9663
|
+
* @stability experimental
|
|
9664
|
+
* @category models
|
|
9665
|
+
* @since 4.0.0
|
|
9666
|
+
*/
|
|
9667
|
+
export interface HostPortFromString extends decodeTo<HostPort, String> {
|
|
9668
|
+
readonly "Rebuild": HostPortFromString;
|
|
9669
|
+
}
|
|
9670
|
+
/**
|
|
9671
|
+
* Schema for unresolved endpoints encoded as `host:port` or `[IPv6]:port`
|
|
9672
|
+
* strings.
|
|
9673
|
+
*
|
|
9674
|
+
* @stability experimental
|
|
9675
|
+
* @category schemas
|
|
9676
|
+
* @since 4.0.0
|
|
9677
|
+
*/
|
|
9678
|
+
export declare const HostPortFromString: HostPortFromString;
|
|
9679
|
+
/**
|
|
9680
|
+
* Type-level representation of {@link Port}.
|
|
9681
|
+
*
|
|
9682
|
+
* @stability experimental
|
|
9683
|
+
* @category models
|
|
9684
|
+
* @since 4.0.0
|
|
9685
|
+
*/
|
|
9686
|
+
export interface Port extends Int {
|
|
9687
|
+
readonly "Rebuild": Port;
|
|
9688
|
+
}
|
|
9689
|
+
/**
|
|
9690
|
+
* Schema for TCP and UDP port numbers from 0 through 65535.
|
|
9691
|
+
*
|
|
9692
|
+
* **Details**
|
|
9693
|
+
*
|
|
9694
|
+
* Port 0 is accepted because it asks the operating system to choose a port
|
|
9695
|
+
* when binding, and it matches the port range of `InetAddress` and `HostPort`.
|
|
9696
|
+
* `Config.Port` accepts only 1 through 65535.
|
|
9697
|
+
*
|
|
9698
|
+
* @stability experimental
|
|
9699
|
+
* @category schemas
|
|
9700
|
+
* @since 4.0.0
|
|
9701
|
+
*/
|
|
9702
|
+
export declare const Port: Port;
|
|
9119
9703
|
/**
|
|
9120
9704
|
* Type-level representation of {@link Duration}.
|
|
9121
9705
|
*
|
|
9706
|
+
* @stability stable
|
|
9122
9707
|
* @category models
|
|
9123
9708
|
* @since 3.10.0
|
|
9124
9709
|
*/
|
|
@@ -9141,6 +9726,7 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
9141
9726
|
* Schema.decodeUnknownSync(Schema.Duration)(Duration.seconds(5)) // => Duration.seconds(5)
|
|
9142
9727
|
* ```
|
|
9143
9728
|
*
|
|
9729
|
+
* @stability stable
|
|
9144
9730
|
* @category schemas
|
|
9145
9731
|
*
|
|
9146
9732
|
* @since 3.10.0
|
|
@@ -9149,6 +9735,7 @@ export declare const Duration: Duration;
|
|
|
9149
9735
|
/**
|
|
9150
9736
|
* Type-level representation of {@link DurationFromString}.
|
|
9151
9737
|
*
|
|
9738
|
+
* @stability stable
|
|
9152
9739
|
* @category models
|
|
9153
9740
|
* @since 4.0.0
|
|
9154
9741
|
*/
|
|
@@ -9167,6 +9754,7 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
9167
9754
|
* Encoding:
|
|
9168
9755
|
* - A `Duration` is encoded as a parseable `string`.
|
|
9169
9756
|
*
|
|
9757
|
+
* @stability stable
|
|
9170
9758
|
* @category schemas
|
|
9171
9759
|
* @since 4.0.0
|
|
9172
9760
|
*/
|
|
@@ -9174,6 +9762,7 @@ export declare const DurationFromString: DurationFromString;
|
|
|
9174
9762
|
/**
|
|
9175
9763
|
* Type-level representation of {@link DurationFromNanos}.
|
|
9176
9764
|
*
|
|
9765
|
+
* @stability stable
|
|
9177
9766
|
* @category models
|
|
9178
9767
|
* @since 3.10.0
|
|
9179
9768
|
*/
|
|
@@ -9194,6 +9783,7 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
9194
9783
|
* fails when the duration cannot be represented as nanoseconds, such as
|
|
9195
9784
|
* `Duration.infinity` or `Duration.negativeInfinity`.
|
|
9196
9785
|
*
|
|
9786
|
+
* @stability stable
|
|
9197
9787
|
* @category schemas
|
|
9198
9788
|
* @since 3.10.0
|
|
9199
9789
|
*/
|
|
@@ -9201,6 +9791,7 @@ export declare const DurationFromNanos: DurationFromNanos;
|
|
|
9201
9791
|
/**
|
|
9202
9792
|
* Type-level representation of {@link DurationFromMillis}.
|
|
9203
9793
|
*
|
|
9794
|
+
* @stability stable
|
|
9204
9795
|
* @category models
|
|
9205
9796
|
* @since 3.10.0
|
|
9206
9797
|
*/
|
|
@@ -9223,13 +9814,293 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
9223
9814
|
*
|
|
9224
9815
|
* `NaN` is decoded as `Duration.zero`, matching `Duration.millis`.
|
|
9225
9816
|
*
|
|
9817
|
+
* @stability stable
|
|
9226
9818
|
* @category schemas
|
|
9227
9819
|
* @since 3.10.0
|
|
9228
9820
|
*/
|
|
9229
9821
|
export declare const DurationFromMillis: DurationFromMillis;
|
|
9822
|
+
/**
|
|
9823
|
+
* Type-level representation of {@link DnsRecordType}.
|
|
9824
|
+
*
|
|
9825
|
+
* @stability experimental
|
|
9826
|
+
* @category models
|
|
9827
|
+
* @since 4.0.0
|
|
9828
|
+
*/
|
|
9829
|
+
export interface DnsRecordType extends Literals<ReadonlyArray<Dns_.RecordType>> {
|
|
9830
|
+
}
|
|
9831
|
+
/**
|
|
9832
|
+
* Schema for supported DNS record types such as `"A"` or `"SRV"`.
|
|
9833
|
+
*
|
|
9834
|
+
* @stability experimental
|
|
9835
|
+
* @category schemas
|
|
9836
|
+
* @since 4.0.0
|
|
9837
|
+
*/
|
|
9838
|
+
export declare const DnsRecordType: DnsRecordType;
|
|
9839
|
+
/**
|
|
9840
|
+
* Type-level representation of {@link DnsARecord}.
|
|
9841
|
+
*
|
|
9842
|
+
* @stability experimental
|
|
9843
|
+
* @category models
|
|
9844
|
+
* @since 4.0.0
|
|
9845
|
+
*/
|
|
9846
|
+
export interface DnsARecord extends declare<Dns_.A> {
|
|
9847
|
+
readonly "Rebuild": DnsARecord;
|
|
9848
|
+
}
|
|
9849
|
+
/**
|
|
9850
|
+
* Schema for already-constructed IPv4 address (`A`) DNS records.
|
|
9851
|
+
*
|
|
9852
|
+
* @stability experimental
|
|
9853
|
+
* @category schemas
|
|
9854
|
+
* @since 4.0.0
|
|
9855
|
+
*/
|
|
9856
|
+
export declare const DnsARecord: DnsARecord;
|
|
9857
|
+
/**
|
|
9858
|
+
* Type-level representation of {@link DnsAaaaRecord}.
|
|
9859
|
+
*
|
|
9860
|
+
* @stability experimental
|
|
9861
|
+
* @category models
|
|
9862
|
+
* @since 4.0.0
|
|
9863
|
+
*/
|
|
9864
|
+
export interface DnsAaaaRecord extends declare<Dns_.Aaaa> {
|
|
9865
|
+
readonly "Rebuild": DnsAaaaRecord;
|
|
9866
|
+
}
|
|
9867
|
+
/**
|
|
9868
|
+
* Schema for already-constructed IPv6 address (`AAAA`) DNS records.
|
|
9869
|
+
*
|
|
9870
|
+
* @stability experimental
|
|
9871
|
+
* @category schemas
|
|
9872
|
+
* @since 4.0.0
|
|
9873
|
+
*/
|
|
9874
|
+
export declare const DnsAaaaRecord: DnsAaaaRecord;
|
|
9875
|
+
/**
|
|
9876
|
+
* Type-level representation of {@link DnsCaaRecord}.
|
|
9877
|
+
*
|
|
9878
|
+
* @stability experimental
|
|
9879
|
+
* @category models
|
|
9880
|
+
* @since 4.0.0
|
|
9881
|
+
*/
|
|
9882
|
+
export interface DnsCaaRecord extends declare<Dns_.Caa> {
|
|
9883
|
+
readonly "Rebuild": DnsCaaRecord;
|
|
9884
|
+
}
|
|
9885
|
+
/**
|
|
9886
|
+
* Schema for already-constructed certification authority authorization (`CAA`) DNS records.
|
|
9887
|
+
*
|
|
9888
|
+
* @stability experimental
|
|
9889
|
+
* @category schemas
|
|
9890
|
+
* @since 4.0.0
|
|
9891
|
+
*/
|
|
9892
|
+
export declare const DnsCaaRecord: DnsCaaRecord;
|
|
9893
|
+
/**
|
|
9894
|
+
* Type-level representation of {@link DnsCnameRecord}.
|
|
9895
|
+
*
|
|
9896
|
+
* @stability experimental
|
|
9897
|
+
* @category models
|
|
9898
|
+
* @since 4.0.0
|
|
9899
|
+
*/
|
|
9900
|
+
export interface DnsCnameRecord extends declare<Dns_.Cname> {
|
|
9901
|
+
readonly "Rebuild": DnsCnameRecord;
|
|
9902
|
+
}
|
|
9903
|
+
/**
|
|
9904
|
+
* Schema for already-constructed canonical name (`CNAME`) DNS records.
|
|
9905
|
+
*
|
|
9906
|
+
* @stability experimental
|
|
9907
|
+
* @category schemas
|
|
9908
|
+
* @since 4.0.0
|
|
9909
|
+
*/
|
|
9910
|
+
export declare const DnsCnameRecord: DnsCnameRecord;
|
|
9911
|
+
/**
|
|
9912
|
+
* Type-level representation of {@link DnsMxRecord}.
|
|
9913
|
+
*
|
|
9914
|
+
* @stability experimental
|
|
9915
|
+
* @category models
|
|
9916
|
+
* @since 4.0.0
|
|
9917
|
+
*/
|
|
9918
|
+
export interface DnsMxRecord extends declare<Dns_.Mx> {
|
|
9919
|
+
readonly "Rebuild": DnsMxRecord;
|
|
9920
|
+
}
|
|
9921
|
+
/**
|
|
9922
|
+
* Schema for already-constructed mail exchange (`MX`) DNS records.
|
|
9923
|
+
*
|
|
9924
|
+
* @stability experimental
|
|
9925
|
+
* @category schemas
|
|
9926
|
+
* @since 4.0.0
|
|
9927
|
+
*/
|
|
9928
|
+
export declare const DnsMxRecord: DnsMxRecord;
|
|
9929
|
+
/**
|
|
9930
|
+
* Type-level representation of {@link DnsNaptrRecord}.
|
|
9931
|
+
*
|
|
9932
|
+
* @stability experimental
|
|
9933
|
+
* @category models
|
|
9934
|
+
* @since 4.0.0
|
|
9935
|
+
*/
|
|
9936
|
+
export interface DnsNaptrRecord extends declare<Dns_.Naptr> {
|
|
9937
|
+
readonly "Rebuild": DnsNaptrRecord;
|
|
9938
|
+
}
|
|
9939
|
+
/**
|
|
9940
|
+
* Schema for already-constructed naming authority pointer (`NAPTR`) DNS records.
|
|
9941
|
+
*
|
|
9942
|
+
* @stability experimental
|
|
9943
|
+
* @category schemas
|
|
9944
|
+
* @since 4.0.0
|
|
9945
|
+
*/
|
|
9946
|
+
export declare const DnsNaptrRecord: DnsNaptrRecord;
|
|
9947
|
+
/**
|
|
9948
|
+
* Type-level representation of {@link DnsNsRecord}.
|
|
9949
|
+
*
|
|
9950
|
+
* @stability experimental
|
|
9951
|
+
* @category models
|
|
9952
|
+
* @since 4.0.0
|
|
9953
|
+
*/
|
|
9954
|
+
export interface DnsNsRecord extends declare<Dns_.Ns> {
|
|
9955
|
+
readonly "Rebuild": DnsNsRecord;
|
|
9956
|
+
}
|
|
9957
|
+
/**
|
|
9958
|
+
* Schema for already-constructed name server (`NS`) DNS records.
|
|
9959
|
+
*
|
|
9960
|
+
* @stability experimental
|
|
9961
|
+
* @category schemas
|
|
9962
|
+
* @since 4.0.0
|
|
9963
|
+
*/
|
|
9964
|
+
export declare const DnsNsRecord: DnsNsRecord;
|
|
9965
|
+
/**
|
|
9966
|
+
* Type-level representation of {@link DnsPtrRecord}.
|
|
9967
|
+
*
|
|
9968
|
+
* @stability experimental
|
|
9969
|
+
* @category models
|
|
9970
|
+
* @since 4.0.0
|
|
9971
|
+
*/
|
|
9972
|
+
export interface DnsPtrRecord extends declare<Dns_.Ptr> {
|
|
9973
|
+
readonly "Rebuild": DnsPtrRecord;
|
|
9974
|
+
}
|
|
9975
|
+
/**
|
|
9976
|
+
* Schema for already-constructed pointer (`PTR`) DNS records.
|
|
9977
|
+
*
|
|
9978
|
+
* @stability experimental
|
|
9979
|
+
* @category schemas
|
|
9980
|
+
* @since 4.0.0
|
|
9981
|
+
*/
|
|
9982
|
+
export declare const DnsPtrRecord: DnsPtrRecord;
|
|
9983
|
+
/**
|
|
9984
|
+
* Type-level representation of {@link DnsSoaRecord}.
|
|
9985
|
+
*
|
|
9986
|
+
* @stability experimental
|
|
9987
|
+
* @category models
|
|
9988
|
+
* @since 4.0.0
|
|
9989
|
+
*/
|
|
9990
|
+
export interface DnsSoaRecord extends declare<Dns_.Soa> {
|
|
9991
|
+
readonly "Rebuild": DnsSoaRecord;
|
|
9992
|
+
}
|
|
9993
|
+
/**
|
|
9994
|
+
* Schema for already-constructed start of authority (`SOA`) DNS records.
|
|
9995
|
+
*
|
|
9996
|
+
* @stability experimental
|
|
9997
|
+
* @category schemas
|
|
9998
|
+
* @since 4.0.0
|
|
9999
|
+
*/
|
|
10000
|
+
export declare const DnsSoaRecord: DnsSoaRecord;
|
|
10001
|
+
/**
|
|
10002
|
+
* Type-level representation of {@link DnsSrvRecord}.
|
|
10003
|
+
*
|
|
10004
|
+
* @stability experimental
|
|
10005
|
+
* @category models
|
|
10006
|
+
* @since 4.0.0
|
|
10007
|
+
*/
|
|
10008
|
+
export interface DnsSrvRecord extends declare<Dns_.Srv> {
|
|
10009
|
+
readonly "Rebuild": DnsSrvRecord;
|
|
10010
|
+
}
|
|
10011
|
+
/**
|
|
10012
|
+
* Schema for already-constructed service locator (`SRV`) DNS records.
|
|
10013
|
+
*
|
|
10014
|
+
* @stability experimental
|
|
10015
|
+
* @category schemas
|
|
10016
|
+
* @since 4.0.0
|
|
10017
|
+
*/
|
|
10018
|
+
export declare const DnsSrvRecord: DnsSrvRecord;
|
|
10019
|
+
/**
|
|
10020
|
+
* Type-level representation of {@link DnsTlsaRecord}.
|
|
10021
|
+
*
|
|
10022
|
+
* @stability experimental
|
|
10023
|
+
* @category models
|
|
10024
|
+
* @since 4.0.0
|
|
10025
|
+
*/
|
|
10026
|
+
export interface DnsTlsaRecord extends declare<Dns_.Tlsa> {
|
|
10027
|
+
readonly "Rebuild": DnsTlsaRecord;
|
|
10028
|
+
}
|
|
10029
|
+
/**
|
|
10030
|
+
* Schema for already-constructed TLS authentication (`TLSA`) DNS records.
|
|
10031
|
+
*
|
|
10032
|
+
* **Details**
|
|
10033
|
+
*
|
|
10034
|
+
* The default JSON serializer encodes the certificate association `data` as a
|
|
10035
|
+
* hex string.
|
|
10036
|
+
*
|
|
10037
|
+
* @stability experimental
|
|
10038
|
+
* @category schemas
|
|
10039
|
+
* @since 4.0.0
|
|
10040
|
+
*/
|
|
10041
|
+
export declare const DnsTlsaRecord: DnsTlsaRecord;
|
|
10042
|
+
/**
|
|
10043
|
+
* Type-level representation of {@link DnsTxtRecord}.
|
|
10044
|
+
*
|
|
10045
|
+
* @stability experimental
|
|
10046
|
+
* @category models
|
|
10047
|
+
* @since 4.0.0
|
|
10048
|
+
*/
|
|
10049
|
+
export interface DnsTxtRecord extends declare<Dns_.Txt> {
|
|
10050
|
+
readonly "Rebuild": DnsTxtRecord;
|
|
10051
|
+
}
|
|
10052
|
+
/**
|
|
10053
|
+
* Schema for already-constructed text (`TXT`) DNS records.
|
|
10054
|
+
*
|
|
10055
|
+
* @stability experimental
|
|
10056
|
+
* @category schemas
|
|
10057
|
+
* @since 4.0.0
|
|
10058
|
+
*/
|
|
10059
|
+
export declare const DnsTxtRecord: DnsTxtRecord;
|
|
10060
|
+
/**
|
|
10061
|
+
* Type-level representation of {@link DnsRecord}.
|
|
10062
|
+
*
|
|
10063
|
+
* @stability experimental
|
|
10064
|
+
* @category models
|
|
10065
|
+
* @since 4.0.0
|
|
10066
|
+
*/
|
|
10067
|
+
export interface DnsRecord extends Union<readonly [
|
|
10068
|
+
DnsARecord,
|
|
10069
|
+
DnsAaaaRecord,
|
|
10070
|
+
DnsCaaRecord,
|
|
10071
|
+
DnsCnameRecord,
|
|
10072
|
+
DnsMxRecord,
|
|
10073
|
+
DnsNaptrRecord,
|
|
10074
|
+
DnsNsRecord,
|
|
10075
|
+
DnsPtrRecord,
|
|
10076
|
+
DnsSoaRecord,
|
|
10077
|
+
DnsSrvRecord,
|
|
10078
|
+
DnsTlsaRecord,
|
|
10079
|
+
DnsTxtRecord
|
|
10080
|
+
]> {
|
|
10081
|
+
readonly "Rebuild": DnsRecord;
|
|
10082
|
+
}
|
|
10083
|
+
/**
|
|
10084
|
+
* Schema for already-constructed DNS records of any supported record type.
|
|
10085
|
+
*
|
|
10086
|
+
* **Details**
|
|
10087
|
+
*
|
|
10088
|
+
* The default JSON serializer encodes records as objects tagged by record type,
|
|
10089
|
+
* with addresses and names as canonical strings, SOA timers as whole seconds,
|
|
10090
|
+
* and TLSA data as hex, such as
|
|
10091
|
+
* `{ "_tag": "SRV", "target": "db.internal", "port": 5432, "priority": 10, "weight": 5 }`.
|
|
10092
|
+
* Decoding accepts only canonical addresses and normalized domain names, and
|
|
10093
|
+
* reports invalid fields with their path.
|
|
10094
|
+
*
|
|
10095
|
+
* @stability experimental
|
|
10096
|
+
* @category schemas
|
|
10097
|
+
* @since 4.0.0
|
|
10098
|
+
*/
|
|
10099
|
+
export declare const DnsRecord: DnsRecord;
|
|
9230
10100
|
/**
|
|
9231
10101
|
* Type-level representation returned by {@link Exit}.
|
|
9232
10102
|
*
|
|
10103
|
+
* @stability stable
|
|
9233
10104
|
* @category models
|
|
9234
10105
|
* @since 3.10.0
|
|
9235
10106
|
*/
|
|
@@ -9247,6 +10118,7 @@ export interface Exit<A extends Constraint, E extends Constraint, D extends Cons
|
|
|
9247
10118
|
* Successful exits are represented as `{ _tag: "Success", value }`, while failed
|
|
9248
10119
|
* exits are represented as `{ _tag: "Failure", cause }`.
|
|
9249
10120
|
*
|
|
10121
|
+
* @stability stable
|
|
9250
10122
|
* @category utility types
|
|
9251
10123
|
* @since 4.0.0
|
|
9252
10124
|
*/
|
|
@@ -9266,6 +10138,7 @@ export type ExitIso<A extends Constraint, E extends Constraint, D extends Constr
|
|
|
9266
10138
|
* Use when serializing or validating an effect outcome where success, typed
|
|
9267
10139
|
* failure, and defects each need their own schema.
|
|
9268
10140
|
*
|
|
10141
|
+
* @stability stable
|
|
9269
10142
|
* @category schemas
|
|
9270
10143
|
* @since 3.10.0
|
|
9271
10144
|
*/
|
|
@@ -9273,6 +10146,7 @@ export declare function Exit<A extends Constraint, E extends Constraint, D exten
|
|
|
9273
10146
|
/**
|
|
9274
10147
|
* Encoded representation of an immutable Effect graph.
|
|
9275
10148
|
*
|
|
10149
|
+
* @stability unstable
|
|
9276
10150
|
* @category models
|
|
9277
10151
|
* @since 4.0.0
|
|
9278
10152
|
*/
|
|
@@ -9280,6 +10154,7 @@ export type EncodedGraph<N, E, T extends Graph_.Kind> = Graph_.Snapshot<N, E, T>
|
|
|
9280
10154
|
/**
|
|
9281
10155
|
* Iso representation used for {@link Graph} schemas.
|
|
9282
10156
|
*
|
|
10157
|
+
* @stability unstable
|
|
9283
10158
|
* @category utility types
|
|
9284
10159
|
* @since 4.0.0
|
|
9285
10160
|
*/
|
|
@@ -9287,6 +10162,7 @@ export type GraphIso<T extends Graph_.Kind, Node extends Constraint, Edge extend
|
|
|
9287
10162
|
/**
|
|
9288
10163
|
* Type-level representation returned by {@link Graph}.
|
|
9289
10164
|
*
|
|
10165
|
+
* @stability unstable
|
|
9290
10166
|
* @category models
|
|
9291
10167
|
* @since 4.0.0
|
|
9292
10168
|
*/
|
|
@@ -9326,6 +10202,7 @@ export interface Graph<T extends Graph_.Kind, Node extends Constraint, Edge exte
|
|
|
9326
10202
|
* encoded.edges // => [{ index: 0, source: 0, target: 1, data: 1 }]
|
|
9327
10203
|
* ```
|
|
9328
10204
|
*
|
|
10205
|
+
* @stability unstable
|
|
9329
10206
|
* @category schemas
|
|
9330
10207
|
* @since 4.0.0
|
|
9331
10208
|
*/
|
|
@@ -9335,6 +10212,7 @@ export declare function Graph<T extends Graph_.Kind, Node extends Constraint, Ed
|
|
|
9335
10212
|
/**
|
|
9336
10213
|
* Type-level representation returned by {@link HashMap}.
|
|
9337
10214
|
*
|
|
10215
|
+
* @stability stable
|
|
9338
10216
|
* @category models
|
|
9339
10217
|
* @since 3.10.0
|
|
9340
10218
|
*/
|
|
@@ -9347,6 +10225,7 @@ export interface HashMap<Key extends Constraint, Value extends Constraint> exten
|
|
|
9347
10225
|
* Iso representation used for `HashMap` schemas: an array of readonly
|
|
9348
10226
|
* `[key, value]` tuples using each entry schema's `Iso` type.
|
|
9349
10227
|
*
|
|
10228
|
+
* @stability stable
|
|
9350
10229
|
* @category utility types
|
|
9351
10230
|
* @since 4.0.0
|
|
9352
10231
|
*/
|
|
@@ -9354,6 +10233,7 @@ export type HashMapIso<Key extends Constraint, Value extends Constraint> = Reado
|
|
|
9354
10233
|
/**
|
|
9355
10234
|
* Schema for hash maps whose keys and values conform to the provided schemas.
|
|
9356
10235
|
*
|
|
10236
|
+
* @stability stable
|
|
9357
10237
|
* @category schemas
|
|
9358
10238
|
* @since 3.10.0
|
|
9359
10239
|
*/
|
|
@@ -9361,6 +10241,7 @@ export declare function HashMap<Key extends Constraint, Value extends Constraint
|
|
|
9361
10241
|
/**
|
|
9362
10242
|
* Type-level representation returned by {@link HashSet}.
|
|
9363
10243
|
*
|
|
10244
|
+
* @stability stable
|
|
9364
10245
|
* @category models
|
|
9365
10246
|
* @since 3.10.0
|
|
9366
10247
|
*/
|
|
@@ -9372,6 +10253,7 @@ export interface HashSet<Value extends Constraint> extends declareConstructor<Ha
|
|
|
9372
10253
|
* Iso representation used for `HashSet` schemas: an array of element values
|
|
9373
10254
|
* using the element schema's `Iso` type.
|
|
9374
10255
|
*
|
|
10256
|
+
* @stability stable
|
|
9375
10257
|
* @category utility types
|
|
9376
10258
|
* @since 4.0.0
|
|
9377
10259
|
*/
|
|
@@ -9379,6 +10261,7 @@ export type HashSetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
|
|
|
9379
10261
|
/**
|
|
9380
10262
|
* Schema for hash sets whose values conform to the provided element schema.
|
|
9381
10263
|
*
|
|
10264
|
+
* @stability stable
|
|
9382
10265
|
* @category schemas
|
|
9383
10266
|
* @since 3.10.0
|
|
9384
10267
|
*/
|
|
@@ -9386,6 +10269,7 @@ export declare function HashSet<Value extends Constraint>(value: Value): HashSet
|
|
|
9386
10269
|
/**
|
|
9387
10270
|
* Type-level representation returned by {@link Option}.
|
|
9388
10271
|
*
|
|
10272
|
+
* @stability stable
|
|
9389
10273
|
* @category models
|
|
9390
10274
|
* @since 3.10.0
|
|
9391
10275
|
*/
|
|
@@ -9401,6 +10285,7 @@ export interface Option<A extends Constraint> extends declareConstructor<Option_
|
|
|
9401
10285
|
* `None` is represented as `{ _tag: "None" }`, while `Some` is represented as
|
|
9402
10286
|
* `{ _tag: "Some", value }` using the wrapped schema's `Iso` type.
|
|
9403
10287
|
*
|
|
10288
|
+
* @stability stable
|
|
9404
10289
|
* @category utility types
|
|
9405
10290
|
* @since 4.0.0
|
|
9406
10291
|
*/
|
|
@@ -9413,6 +10298,7 @@ export type OptionIso<A extends Constraint> = {
|
|
|
9413
10298
|
/**
|
|
9414
10299
|
* Schema for `Option<A>` values.
|
|
9415
10300
|
*
|
|
10301
|
+
* @stability stable
|
|
9416
10302
|
* @category schemas
|
|
9417
10303
|
* @since 3.10.0
|
|
9418
10304
|
*/
|
|
@@ -9420,6 +10306,7 @@ export declare function Option<A extends Constraint>(value: A): Option<A>;
|
|
|
9420
10306
|
/**
|
|
9421
10307
|
* Type-level representation returned by {@link OptionFromNullOr}.
|
|
9422
10308
|
*
|
|
10309
|
+
* @stability stable
|
|
9423
10310
|
* @category models
|
|
9424
10311
|
* @since 3.10.0
|
|
9425
10312
|
*/
|
|
@@ -9434,6 +10321,7 @@ export interface OptionFromNullOr<S extends Constraint> extends decodeTo<Option<
|
|
|
9434
10321
|
* Decoding maps `null` to `None` and all other values to `Some`. Encoding maps
|
|
9435
10322
|
* `None` to `null` and maps `Some` to its value.
|
|
9436
10323
|
*
|
|
10324
|
+
* @stability stable
|
|
9437
10325
|
* @category schemas
|
|
9438
10326
|
* @since 3.10.0
|
|
9439
10327
|
*/
|
|
@@ -9441,6 +10329,7 @@ export declare function OptionFromNullOr<S extends Constraint>(schema: S): Optio
|
|
|
9441
10329
|
/**
|
|
9442
10330
|
* Type-level representation returned by {@link OptionFromUndefinedOr}.
|
|
9443
10331
|
*
|
|
10332
|
+
* @stability stable
|
|
9444
10333
|
* @category models
|
|
9445
10334
|
* @since 3.10.0
|
|
9446
10335
|
*/
|
|
@@ -9456,6 +10345,7 @@ export interface OptionFromUndefinedOr<S extends Constraint> extends decodeTo<Op
|
|
|
9456
10345
|
* Decoding maps `undefined` to `None` and all other values to `Some`. Encoding
|
|
9457
10346
|
* maps `None` to `undefined` and maps `Some` to its value.
|
|
9458
10347
|
*
|
|
10348
|
+
* @stability stable
|
|
9459
10349
|
* @category schemas
|
|
9460
10350
|
* @since 3.10.0
|
|
9461
10351
|
*/
|
|
@@ -9463,6 +10353,7 @@ export declare function OptionFromUndefinedOr<S extends Constraint>(schema: S):
|
|
|
9463
10353
|
/**
|
|
9464
10354
|
* Type-level representation returned by {@link OptionFromNullishOr}.
|
|
9465
10355
|
*
|
|
10356
|
+
* @stability stable
|
|
9466
10357
|
* @category models
|
|
9467
10358
|
* @since 3.10.0
|
|
9468
10359
|
*/
|
|
@@ -9479,6 +10370,7 @@ export interface OptionFromNullishOr<S extends Constraint> extends decodeTo<Opti
|
|
|
9479
10370
|
* `options.onNoneEncoding`, which defaults to `undefined`, and maps `Some` to
|
|
9480
10371
|
* its value.
|
|
9481
10372
|
*
|
|
10373
|
+
* @stability stable
|
|
9482
10374
|
* @category schemas
|
|
9483
10375
|
* @since 3.10.0
|
|
9484
10376
|
*/
|
|
@@ -9678,6 +10570,7 @@ export declare const RecordFromUrlParams: RecordFromUrlParams;
|
|
|
9678
10570
|
/**
|
|
9679
10571
|
* Type-level representation returned by {@link OptionFromOptionalKey}.
|
|
9680
10572
|
*
|
|
10573
|
+
* @stability stable
|
|
9681
10574
|
* @category models
|
|
9682
10575
|
* @since 4.0.0
|
|
9683
10576
|
*/
|
|
@@ -9692,6 +10585,7 @@ export interface OptionFromOptionalKey<S extends Constraint> extends decodeTo<Op
|
|
|
9692
10585
|
* Decoding maps a missing key to `None` and a present value to `Some`.
|
|
9693
10586
|
* Encoding maps `None` to a missing key and maps `Some` to its value.
|
|
9694
10587
|
*
|
|
10588
|
+
* @stability stable
|
|
9695
10589
|
* @category schemas
|
|
9696
10590
|
* @since 4.0.0
|
|
9697
10591
|
*/
|
|
@@ -9699,6 +10593,7 @@ export declare function OptionFromOptionalKey<S extends Constraint>(schema: S):
|
|
|
9699
10593
|
/**
|
|
9700
10594
|
* Type-level representation returned by {@link OptionFromOptional}.
|
|
9701
10595
|
*
|
|
10596
|
+
* @stability stable
|
|
9702
10597
|
* @category models
|
|
9703
10598
|
* @since 4.0.0
|
|
9704
10599
|
*/
|
|
@@ -9715,6 +10610,7 @@ export interface OptionFromOptional<S extends Constraint> extends decodeTo<Optio
|
|
|
9715
10610
|
* maps all other values to `Some`. Encoding maps `None` to a missing key and
|
|
9716
10611
|
* maps `Some` to its value.
|
|
9717
10612
|
*
|
|
10613
|
+
* @stability stable
|
|
9718
10614
|
* @category schemas
|
|
9719
10615
|
* @since 4.0.0
|
|
9720
10616
|
*/
|
|
@@ -9722,6 +10618,7 @@ export declare function OptionFromOptional<S extends Constraint>(schema: S): Opt
|
|
|
9722
10618
|
/**
|
|
9723
10619
|
* Type-level representation returned by {@link OptionFromOptionalNullOr}.
|
|
9724
10620
|
*
|
|
10621
|
+
* @stability stable
|
|
9725
10622
|
* @category models
|
|
9726
10623
|
* @since 4.0.0
|
|
9727
10624
|
*/
|
|
@@ -9739,6 +10636,7 @@ export interface OptionFromOptionalNullOr<S extends Constraint> extends decodeTo
|
|
|
9739
10636
|
* according to `options.onNoneEncoding`: `"omit"` encodes a missing key,
|
|
9740
10637
|
* `null` encodes `null`, and `undefined` encodes `undefined`.
|
|
9741
10638
|
*
|
|
10639
|
+
* @stability stable
|
|
9742
10640
|
* @category schemas
|
|
9743
10641
|
* @since 4.0.0
|
|
9744
10642
|
*/
|
|
@@ -9748,6 +10646,7 @@ export declare function OptionFromOptionalNullOr<S extends Constraint>(schema: S
|
|
|
9748
10646
|
/**
|
|
9749
10647
|
* Type-level representation returned by {@link Redacted}.
|
|
9750
10648
|
*
|
|
10649
|
+
* @stability stable
|
|
9751
10650
|
* @category models
|
|
9752
10651
|
* @since 3.10.0
|
|
9753
10652
|
*/
|
|
@@ -9772,6 +10671,7 @@ export interface Redacted<S extends Constraint> extends declareConstructor<Redac
|
|
|
9772
10671
|
* sensitive and should not be exposed in JSON.
|
|
9773
10672
|
*
|
|
9774
10673
|
* @see {@link RedactedFromValue} for decoding raw values and wrapping them in `Redacted`.
|
|
10674
|
+
* @stability stable
|
|
9775
10675
|
* @category schemas
|
|
9776
10676
|
* @since 3.10.0
|
|
9777
10677
|
*/
|
|
@@ -9782,6 +10682,7 @@ export declare function Redacted<S extends Constraint>(value: S, options?: {
|
|
|
9782
10682
|
/**
|
|
9783
10683
|
* Type-level representation returned by {@link RedactedFromValue}.
|
|
9784
10684
|
*
|
|
10685
|
+
* @stability stable
|
|
9785
10686
|
* @category models
|
|
9786
10687
|
* @since 4.0.0
|
|
9787
10688
|
*/
|
|
@@ -9794,6 +10695,7 @@ export interface RedactedFromValue<S extends Constraint> extends decodeTo<Redact
|
|
|
9794
10695
|
* the raw value and wraps it.
|
|
9795
10696
|
*
|
|
9796
10697
|
* @see {@link Redacted} for schemas whose input is already a `Redacted` value.
|
|
10698
|
+
* @stability stable
|
|
9797
10699
|
* @category schemas
|
|
9798
10700
|
* @since 4.0.0
|
|
9799
10701
|
*/
|
|
@@ -9804,6 +10706,7 @@ export declare function RedactedFromValue<S extends Constraint>(value: S, option
|
|
|
9804
10706
|
/**
|
|
9805
10707
|
* Type-level representation returned by {@link Result}.
|
|
9806
10708
|
*
|
|
10709
|
+
* @stability stable
|
|
9807
10710
|
* @category models
|
|
9808
10711
|
* @since 4.0.0
|
|
9809
10712
|
*/
|
|
@@ -9820,6 +10723,7 @@ export interface Result<A extends Constraint, E extends Constraint> extends decl
|
|
|
9820
10723
|
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
9821
10724
|
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
9822
10725
|
*
|
|
10726
|
+
* @stability stable
|
|
9823
10727
|
* @category utility types
|
|
9824
10728
|
* @since 4.0.0
|
|
9825
10729
|
*/
|
|
@@ -9833,6 +10737,7 @@ export type ResultIso<A extends Constraint, E extends Constraint> = {
|
|
|
9833
10737
|
/**
|
|
9834
10738
|
* Schema for `Result<A, E>` values.
|
|
9835
10739
|
*
|
|
10740
|
+
* @stability stable
|
|
9836
10741
|
* @category schemas
|
|
9837
10742
|
* @since 4.0.0
|
|
9838
10743
|
*/
|
|
@@ -9840,6 +10745,7 @@ export declare function Result<A extends Constraint, E extends Constraint>(succe
|
|
|
9840
10745
|
/**
|
|
9841
10746
|
* Type-level representation returned by {@link Class}.
|
|
9842
10747
|
*
|
|
10748
|
+
* @stability stable
|
|
9843
10749
|
* @category models
|
|
9844
10750
|
* @since 3.10.0
|
|
9845
10751
|
*/
|
|
@@ -9896,6 +10802,10 @@ export interface Class<Self, S extends Constraint & {
|
|
|
9896
10802
|
*
|
|
9897
10803
|
* **Gotchas**
|
|
9898
10804
|
*
|
|
10805
|
+
* Fields with the same name replace inherited fields. Use this to refine
|
|
10806
|
+
* validation or change encoding. Effect does not check compatibility; the
|
|
10807
|
+
* caller must ensure the replacement preserves the base class contract.
|
|
10808
|
+
*
|
|
9899
10809
|
* Checks from a `Struct` argument are evaluated against the full subclass
|
|
9900
10810
|
* value after inherited and extension fields are merged. Object-wide checks
|
|
9901
10811
|
* such as `isMaxProperties` count inherited fields too.
|
|
@@ -9973,6 +10883,7 @@ type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use
|
|
|
9973
10883
|
* @see {@link Error} for defining schema-backed error classes
|
|
9974
10884
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
9975
10885
|
*
|
|
10886
|
+
* @stability stable
|
|
9976
10887
|
* @category constructors
|
|
9977
10888
|
* @since 3.10.0
|
|
9978
10889
|
*/
|
|
@@ -10043,6 +10954,7 @@ export declare const Class: {
|
|
|
10043
10954
|
* @see {@link Error} for defining schema-backed error classes
|
|
10044
10955
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
10045
10956
|
*
|
|
10957
|
+
* @stability stable
|
|
10046
10958
|
* @category constructors
|
|
10047
10959
|
* @since 3.10.0
|
|
10048
10960
|
*/
|
|
@@ -10113,6 +11025,7 @@ export declare const Class: {
|
|
|
10113
11025
|
* @see {@link Error} for defining schema-backed error classes
|
|
10114
11026
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
10115
11027
|
*
|
|
11028
|
+
* @stability stable
|
|
10116
11029
|
* @category constructors
|
|
10117
11030
|
* @since 3.10.0
|
|
10118
11031
|
*/
|
|
@@ -10183,6 +11096,7 @@ export declare const Class: {
|
|
|
10183
11096
|
* @see {@link Error} for defining schema-backed error classes
|
|
10184
11097
|
* @see {@link TaggedError} for defining tagged schema-backed error classes
|
|
10185
11098
|
*
|
|
11099
|
+
* @stability stable
|
|
10186
11100
|
* @category constructors
|
|
10187
11101
|
* @since 3.10.0
|
|
10188
11102
|
*/
|
|
@@ -10216,6 +11130,7 @@ export declare const Class: {
|
|
|
10216
11130
|
* c.radius // => 5
|
|
10217
11131
|
* ```
|
|
10218
11132
|
*
|
|
11133
|
+
* @stability stable
|
|
10219
11134
|
* @category constructors
|
|
10220
11135
|
* @since 3.10.0
|
|
10221
11136
|
*/
|
|
@@ -10247,6 +11162,7 @@ export declare const TaggedClass: {
|
|
|
10247
11162
|
* c.radius // => 5
|
|
10248
11163
|
* ```
|
|
10249
11164
|
*
|
|
11165
|
+
* @stability stable
|
|
10250
11166
|
* @category constructors
|
|
10251
11167
|
* @since 3.10.0
|
|
10252
11168
|
*/
|
|
@@ -10278,6 +11194,7 @@ export declare const TaggedClass: {
|
|
|
10278
11194
|
* c.radius // => 5
|
|
10279
11195
|
* ```
|
|
10280
11196
|
*
|
|
11197
|
+
* @stability stable
|
|
10281
11198
|
* @category constructors
|
|
10282
11199
|
* @since 3.10.0
|
|
10283
11200
|
*/
|
|
@@ -10309,6 +11226,7 @@ export declare const TaggedClass: {
|
|
|
10309
11226
|
* c.radius // => 5
|
|
10310
11227
|
* ```
|
|
10311
11228
|
*
|
|
11229
|
+
* @stability stable
|
|
10312
11230
|
* @category constructors
|
|
10313
11231
|
* @since 3.10.0
|
|
10314
11232
|
*/
|
|
@@ -10341,6 +11259,7 @@ export declare const TaggedClass: {
|
|
|
10341
11259
|
* error.id // => 1
|
|
10342
11260
|
* ```
|
|
10343
11261
|
*
|
|
11262
|
+
* @stability stable
|
|
10344
11263
|
* @category constructors
|
|
10345
11264
|
* @since 4.0.0
|
|
10346
11265
|
*/
|
|
@@ -10367,6 +11286,7 @@ export declare const Error: {
|
|
|
10367
11286
|
* error.id // => 1
|
|
10368
11287
|
* ```
|
|
10369
11288
|
*
|
|
11289
|
+
* @stability stable
|
|
10370
11290
|
* @category constructors
|
|
10371
11291
|
* @since 4.0.0
|
|
10372
11292
|
*/
|
|
@@ -10393,6 +11313,7 @@ export declare const Error: {
|
|
|
10393
11313
|
* error.id // => 1
|
|
10394
11314
|
* ```
|
|
10395
11315
|
*
|
|
11316
|
+
* @stability stable
|
|
10396
11317
|
* @category constructors
|
|
10397
11318
|
* @since 4.0.0
|
|
10398
11319
|
*/
|
|
@@ -10419,6 +11340,7 @@ export declare const Error: {
|
|
|
10419
11340
|
* error.id // => 1
|
|
10420
11341
|
* ```
|
|
10421
11342
|
*
|
|
11343
|
+
* @stability stable
|
|
10422
11344
|
* @category constructors
|
|
10423
11345
|
* @since 4.0.0
|
|
10424
11346
|
*/
|
|
@@ -10451,6 +11373,7 @@ export declare const Error: {
|
|
|
10451
11373
|
* error.id // => 42
|
|
10452
11374
|
* ```
|
|
10453
11375
|
*
|
|
11376
|
+
* @stability stable
|
|
10454
11377
|
* @category constructors
|
|
10455
11378
|
* @since 3.10.0
|
|
10456
11379
|
*/
|
|
@@ -10481,6 +11404,7 @@ export declare const TaggedError: {
|
|
|
10481
11404
|
* error.id // => 42
|
|
10482
11405
|
* ```
|
|
10483
11406
|
*
|
|
11407
|
+
* @stability stable
|
|
10484
11408
|
* @category constructors
|
|
10485
11409
|
* @since 3.10.0
|
|
10486
11410
|
*/
|
|
@@ -10511,6 +11435,7 @@ export declare const TaggedError: {
|
|
|
10511
11435
|
* error.id // => 42
|
|
10512
11436
|
* ```
|
|
10513
11437
|
*
|
|
11438
|
+
* @stability stable
|
|
10514
11439
|
* @category constructors
|
|
10515
11440
|
* @since 3.10.0
|
|
10516
11441
|
*/
|
|
@@ -10541,6 +11466,7 @@ export declare const TaggedError: {
|
|
|
10541
11466
|
* error.id // => 42
|
|
10542
11467
|
* ```
|
|
10543
11468
|
*
|
|
11469
|
+
* @stability stable
|
|
10544
11470
|
* @category constructors
|
|
10545
11471
|
* @since 3.10.0
|
|
10546
11472
|
*/
|
|
@@ -10560,6 +11486,7 @@ export declare const TaggedError: {
|
|
|
10560
11486
|
* The annotation is applied through this helper because adding it directly to
|
|
10561
11487
|
* `Annotations.Bottom` would make schemas invariant.
|
|
10562
11488
|
*
|
|
11489
|
+
* @stability stable
|
|
10563
11490
|
* @category formatting
|
|
10564
11491
|
* @since 4.0.0
|
|
10565
11492
|
*/
|
|
@@ -10574,6 +11501,7 @@ export declare function overrideToFormatter<S extends Top>(toFormatter: () => Fo
|
|
|
10574
11501
|
* The optional `onBefore` hook lets you intercept specific AST nodes before
|
|
10575
11502
|
* the default formatting logic runs.
|
|
10576
11503
|
*
|
|
11504
|
+
* @stability stable
|
|
10577
11505
|
* @category formatting
|
|
10578
11506
|
* @since 4.0.0
|
|
10579
11507
|
*/
|
|
@@ -10589,6 +11517,7 @@ export declare function toFormatter<S extends Constraint>(schema: S, options?: {
|
|
|
10589
11517
|
* Use when you need a custom equivalence instead of the default structural
|
|
10590
11518
|
* equivalence derived by {@link toEquivalence}.
|
|
10591
11519
|
*
|
|
11520
|
+
* @stability stable
|
|
10592
11521
|
* @category instances
|
|
10593
11522
|
* @since 4.0.0
|
|
10594
11523
|
*/
|
|
@@ -10609,6 +11538,7 @@ export declare function overrideToEquivalence<S extends Top>(toEquivalence: () =
|
|
|
10609
11538
|
* eq({ id: 1, name: "Alice" }, { id: 2, name: "Alice" }) // => false
|
|
10610
11539
|
* ```
|
|
10611
11540
|
*
|
|
11541
|
+
* @stability stable
|
|
10612
11542
|
* @category instances
|
|
10613
11543
|
* @since 4.0.0
|
|
10614
11544
|
*/
|
|
@@ -10631,6 +11561,7 @@ export declare function toEquivalence<T>(schema: Schema<T>): Equivalence.Equival
|
|
|
10631
11561
|
*
|
|
10632
11562
|
* @see {@link SchemaRepresentation.toRepresentation} for converting a `SchemaAST.AST` directly
|
|
10633
11563
|
*
|
|
11564
|
+
* @stability stable
|
|
10634
11565
|
* @category converting
|
|
10635
11566
|
* @since 4.0.0
|
|
10636
11567
|
*/
|
|
@@ -10649,6 +11580,7 @@ export declare function toRepresentation(schema: Constraint, options?: SchemaRep
|
|
|
10649
11580
|
* `SchemaRepresentation.toJsonSchemaMultiDocument`, reference allocation has already happened and `referencePolicy`
|
|
10650
11581
|
* has no effect.
|
|
10651
11582
|
*
|
|
11583
|
+
* @stability stable
|
|
10652
11584
|
* @category options
|
|
10653
11585
|
* @since 4.0.0
|
|
10654
11586
|
*/
|
|
@@ -10788,6 +11720,7 @@ export interface ToJsonSchemaOptions extends SchemaRepresentation.ToRepresentati
|
|
|
10788
11720
|
* @see {@link toCodecJson} for decoding and encoding the canonical JSON representation
|
|
10789
11721
|
* @see {@link SchemaRepresentation.toJsonSchemaDocument} for compiling an existing live representation document
|
|
10790
11722
|
*
|
|
11723
|
+
* @stability stable
|
|
10791
11724
|
* @category converting
|
|
10792
11725
|
* @since 4.0.0
|
|
10793
11726
|
*/
|
|
@@ -10795,6 +11728,7 @@ export declare function toJsonSchemaDocument(schema: Constraint, options?: ToJso
|
|
|
10795
11728
|
/**
|
|
10796
11729
|
* Type-level representation returned by {@link toCodecJson}.
|
|
10797
11730
|
*
|
|
11731
|
+
* @stability stable
|
|
10798
11732
|
* @category converting
|
|
10799
11733
|
* @since 4.0.0
|
|
10800
11734
|
*/
|
|
@@ -10829,6 +11763,7 @@ export interface toCodecJson<S extends Constraint> extends BottomLazy<S["ast"],
|
|
|
10829
11763
|
* checks and annotations remain on its source node rather than being copied to
|
|
10830
11764
|
* the JSON target. Source checks still run after the transformation.
|
|
10831
11765
|
*
|
|
11766
|
+
* @stability stable
|
|
10832
11767
|
* @category converting
|
|
10833
11768
|
* @since 4.0.0
|
|
10834
11769
|
*/
|
|
@@ -10854,6 +11789,7 @@ export declare const toCodecJson: {
|
|
|
10854
11789
|
* checks and annotations remain on its source node rather than being copied to
|
|
10855
11790
|
* the JSON target. Source checks still run after the transformation.
|
|
10856
11791
|
*
|
|
11792
|
+
* @stability stable
|
|
10857
11793
|
* @category converting
|
|
10858
11794
|
* @since 4.0.0
|
|
10859
11795
|
*/
|
|
@@ -10873,6 +11809,7 @@ export declare const toCodecJson: {
|
|
|
10873
11809
|
* Links cannot require services because the returned `Codec` does not expose
|
|
10874
11810
|
* service requirements.
|
|
10875
11811
|
*
|
|
11812
|
+
* @stability stable
|
|
10876
11813
|
* @category converting
|
|
10877
11814
|
* @since 4.0.0
|
|
10878
11815
|
*/
|
|
@@ -10891,6 +11828,7 @@ export declare const toCodecIso: {
|
|
|
10891
11828
|
* Links cannot require services because the returned `Codec` does not expose
|
|
10892
11829
|
* service requirements.
|
|
10893
11830
|
*
|
|
11831
|
+
* @stability stable
|
|
10894
11832
|
* @category converting
|
|
10895
11833
|
* @since 4.0.0
|
|
10896
11834
|
*/
|
|
@@ -10900,6 +11838,7 @@ export declare const toCodecIso: {
|
|
|
10900
11838
|
* A {@link Tree} of `string | undefined` nodes. Leaf values are either a
|
|
10901
11839
|
* string representation or `undefined` for opaque/declaration types.
|
|
10902
11840
|
*
|
|
11841
|
+
* @stability stable
|
|
10903
11842
|
* @category models
|
|
10904
11843
|
* @since 4.0.0
|
|
10905
11844
|
*/
|
|
@@ -10907,6 +11846,7 @@ export type StringTree = Tree<string | undefined>;
|
|
|
10907
11846
|
/**
|
|
10908
11847
|
* Type-level representation returned by {@link toCodecStringTree}.
|
|
10909
11848
|
*
|
|
11849
|
+
* @stability stable
|
|
10910
11850
|
* @category converting
|
|
10911
11851
|
* @since 4.0.0
|
|
10912
11852
|
*/
|
|
@@ -10937,6 +11877,7 @@ export interface toCodecStringTree<S extends Constraint> extends BottomLazy<S["a
|
|
|
10937
11877
|
* `toCodec` encoding. A callback can return `undefined` when the declaration is
|
|
10938
11878
|
* already in canonical StringTree form.
|
|
10939
11879
|
*
|
|
11880
|
+
* @stability stable
|
|
10940
11881
|
* @category converting
|
|
10941
11882
|
* @since 4.0.0
|
|
10942
11883
|
*/
|
|
@@ -10958,6 +11899,7 @@ export declare const toCodecStringTree: {
|
|
|
10958
11899
|
* `toCodec` encoding. A callback can return `undefined` when the declaration is
|
|
10959
11900
|
* already in canonical StringTree form.
|
|
10960
11901
|
*
|
|
11902
|
+
* @stability stable
|
|
10961
11903
|
* @category converting
|
|
10962
11904
|
* @since 4.0.0
|
|
10963
11905
|
*/
|
|
@@ -10966,6 +11908,7 @@ export declare const toCodecStringTree: {
|
|
|
10966
11908
|
/**
|
|
10967
11909
|
* Type-level representation returned by {@link toCodecArrayFromSingle}.
|
|
10968
11910
|
*
|
|
11911
|
+
* @stability stable
|
|
10969
11912
|
* @category converting
|
|
10970
11913
|
* @since 4.0.0
|
|
10971
11914
|
*/
|
|
@@ -10993,6 +11936,7 @@ export interface toCodecArrayFromSingle<S extends Constraint> extends BottomLazy
|
|
|
10993
11936
|
* decoding convenience rather than a canonical StringTree representation. It
|
|
10994
11937
|
* does not parse comma-separated strings.
|
|
10995
11938
|
*
|
|
11939
|
+
* @stability stable
|
|
10996
11940
|
* @category converting
|
|
10997
11941
|
* @since 4.0.0
|
|
10998
11942
|
*/
|
|
@@ -11012,6 +11956,7 @@ export declare const toCodecArrayFromSingle: {
|
|
|
11012
11956
|
* decoding convenience rather than a canonical StringTree representation. It
|
|
11013
11957
|
* does not parse comma-separated strings.
|
|
11014
11958
|
*
|
|
11959
|
+
* @stability stable
|
|
11015
11960
|
* @category converting
|
|
11016
11961
|
* @since 4.0.0
|
|
11017
11962
|
*/
|
|
@@ -11038,6 +11983,7 @@ type XmlEncoderOptions = {
|
|
|
11038
11983
|
* an `Effect` that succeeds with the XML string or fails with a
|
|
11039
11984
|
* {@link SchemaIssue.Issue} if codec encoding fails.
|
|
11040
11985
|
*
|
|
11986
|
+
* @stability stable
|
|
11041
11987
|
* @category encoding
|
|
11042
11988
|
* @since 4.0.0
|
|
11043
11989
|
*/
|
|
@@ -11059,6 +12005,7 @@ export declare function toEncoderXml<T, RE>(codec: ConstraintCodec<T, unknown, u
|
|
|
11059
12005
|
* `SchemaIssue.makeFormatterDefault()`. Consume {@link toCodecIso} with an
|
|
11060
12006
|
* effectful parser for asynchronous execution or explicit failure handling.
|
|
11061
12007
|
*
|
|
12008
|
+
* @stability stable
|
|
11062
12009
|
* @category converting
|
|
11063
12010
|
* @since 4.0.0
|
|
11064
12011
|
*/
|
|
@@ -11066,6 +12013,7 @@ export declare function toIso<S extends Constraint>(schema: S): Optic_.Iso<S["Ty
|
|
|
11066
12013
|
/**
|
|
11067
12014
|
* Returns an identity `Iso` over the schema's source (`Type`) side.
|
|
11068
12015
|
*
|
|
12016
|
+
* @stability stable
|
|
11069
12017
|
* @category constructors
|
|
11070
12018
|
* @since 4.0.0
|
|
11071
12019
|
*/
|
|
@@ -11073,6 +12021,7 @@ export declare function toIsoSource<S extends Constraint>(schema: S): Optic_.Iso
|
|
|
11073
12021
|
/**
|
|
11074
12022
|
* Returns an identity `Iso` over the schema's focus (`Iso`) side.
|
|
11075
12023
|
*
|
|
12024
|
+
* @stability stable
|
|
11076
12025
|
* @category constructors
|
|
11077
12026
|
* @since 4.0.0
|
|
11078
12027
|
*/
|
|
@@ -11080,6 +12029,7 @@ export declare function toIsoFocus<S extends Constraint>(schema: S): Optic_.Iso<
|
|
|
11080
12029
|
/**
|
|
11081
12030
|
* Type-level representation returned by {@link overrideToCodecIso}.
|
|
11082
12031
|
*
|
|
12032
|
+
* @stability stable
|
|
11083
12033
|
* @category transforming
|
|
11084
12034
|
* @since 4.0.0
|
|
11085
12035
|
*/
|
|
@@ -11107,6 +12057,7 @@ export interface overrideToCodecIso<S extends Constraint, Iso> extends BottomLaz
|
|
|
11107
12057
|
* provided `decode` and `encode` getters to transform between the schema type
|
|
11108
12058
|
* and the target codec.
|
|
11109
12059
|
*
|
|
12060
|
+
* @stability stable
|
|
11110
12061
|
* @category transforming
|
|
11111
12062
|
* @since 4.0.0
|
|
11112
12063
|
*/
|
|
@@ -11132,6 +12083,7 @@ export declare function overrideToCodecIso<S extends Constraint, Iso>(to: Constr
|
|
|
11132
12083
|
* `SchemaIssue.makeFormatterDefault()`. Invalid patch operations instead produce
|
|
11133
12084
|
* {@link JsonPatch.apply} errors.
|
|
11134
12085
|
*
|
|
12086
|
+
* @stability stable
|
|
11135
12087
|
* @category converting
|
|
11136
12088
|
* @since 4.0.0
|
|
11137
12089
|
*/
|
|
@@ -11140,6 +12092,7 @@ export declare function toDifferJsonPatch<T>(schema: ConstraintCodec<T, unknown>
|
|
|
11140
12092
|
* Recursive tree type whose leaves are `Node` values and whose branches are
|
|
11141
12093
|
* readonly arrays or string-keyed records of child trees.
|
|
11142
12094
|
*
|
|
12095
|
+
* @stability stable
|
|
11143
12096
|
* @category models
|
|
11144
12097
|
* @since 4.0.0
|
|
11145
12098
|
*/
|
|
@@ -11148,6 +12101,7 @@ export type Tree<Node> = Node | TreeRecord<Node> | ReadonlyArray<Tree<Node>>;
|
|
|
11148
12101
|
* A record node in a {@link Tree}: an object mapping string keys to child
|
|
11149
12102
|
* `Tree` nodes.
|
|
11150
12103
|
*
|
|
12104
|
+
* @stability stable
|
|
11151
12105
|
* @category models
|
|
11152
12106
|
* @since 4.0.0
|
|
11153
12107
|
*/
|
|
@@ -11159,6 +12113,7 @@ export interface TreeRecord<A> {
|
|
|
11159
12113
|
* The resulting schema accepts a single node value, an array of trees, or an
|
|
11160
12114
|
* object whose values are trees.
|
|
11161
12115
|
*
|
|
12116
|
+
* @stability stable
|
|
11162
12117
|
* @category schemas
|
|
11163
12118
|
* @since 4.0.0
|
|
11164
12119
|
*/
|
|
@@ -11169,6 +12124,7 @@ export declare function Tree<S extends Constraint>(node: S): Union<readonly [S,
|
|
|
11169
12124
|
* readonly record of `string → Json`. For the corresponding schema, see the
|
|
11170
12125
|
* {@link Json} const.
|
|
11171
12126
|
*
|
|
12127
|
+
* @stability stable
|
|
11172
12128
|
* @category models
|
|
11173
12129
|
* @since 4.0.0
|
|
11174
12130
|
*/
|
|
@@ -11176,6 +12132,7 @@ export type Json = null | number | boolean | string | JsonArray | JsonObject;
|
|
|
11176
12132
|
/**
|
|
11177
12133
|
* A readonly array of {@link Json} values.
|
|
11178
12134
|
*
|
|
12135
|
+
* @stability stable
|
|
11179
12136
|
* @category models
|
|
11180
12137
|
* @since 4.0.0
|
|
11181
12138
|
*/
|
|
@@ -11184,6 +12141,7 @@ export interface JsonArray extends ReadonlyArray<Json> {
|
|
|
11184
12141
|
/**
|
|
11185
12142
|
* A readonly record whose values are {@link Json} values.
|
|
11186
12143
|
*
|
|
12144
|
+
* @stability stable
|
|
11187
12145
|
* @category models
|
|
11188
12146
|
* @since 4.0.0
|
|
11189
12147
|
*/
|
|
@@ -11201,6 +12159,7 @@ export interface JsonObject {
|
|
|
11201
12159
|
* Schema.decodeUnknownOption(Schema.Json)({ key: [1, true, null] }) // => Option.some({ key: [1, true, null] })
|
|
11202
12160
|
* ```
|
|
11203
12161
|
*
|
|
12162
|
+
* @stability stable
|
|
11204
12163
|
* @category schemas
|
|
11205
12164
|
* @since 4.0.0
|
|
11206
12165
|
*/
|
|
@@ -11222,6 +12181,7 @@ export declare const Json: Codec<Json>;
|
|
|
11222
12181
|
* ```
|
|
11223
12182
|
*
|
|
11224
12183
|
* @see {@link Json} for a schema that also accepts JSON arrays and primitive values
|
|
12184
|
+
* @stability stable
|
|
11225
12185
|
* @category schemas
|
|
11226
12186
|
* @since 4.0.0
|
|
11227
12187
|
*/
|
|
@@ -11230,6 +12190,7 @@ export declare const JsonObject: $Record<String, Codec<Json, Json, never, never>
|
|
|
11230
12190
|
* Recursive TypeScript type for mutable JSON values: `null`, `number`,
|
|
11231
12191
|
* `boolean`, `string`, mutable arrays, or mutable string-keyed records.
|
|
11232
12192
|
*
|
|
12193
|
+
* @stability stable
|
|
11233
12194
|
* @category models
|
|
11234
12195
|
* @since 4.0.0
|
|
11235
12196
|
*/
|
|
@@ -11237,6 +12198,7 @@ export type MutableJson = null | number | boolean | string | MutableJsonArray |
|
|
|
11237
12198
|
/**
|
|
11238
12199
|
* A mutable array of {@link MutableJson} values.
|
|
11239
12200
|
*
|
|
12201
|
+
* @stability stable
|
|
11240
12202
|
* @category models
|
|
11241
12203
|
* @since 4.0.0
|
|
11242
12204
|
*/
|
|
@@ -11245,6 +12207,7 @@ export interface MutableJsonArray extends Array<MutableJson> {
|
|
|
11245
12207
|
/**
|
|
11246
12208
|
* A mutable record whose values are {@link MutableJson} values.
|
|
11247
12209
|
*
|
|
12210
|
+
* @stability stable
|
|
11248
12211
|
* @category models
|
|
11249
12212
|
* @since 4.0.0
|
|
11250
12213
|
*/
|
|
@@ -11255,6 +12218,7 @@ export interface MutableJsonObject {
|
|
|
11255
12218
|
* Schema that accepts any mutable JSON-compatible value. See {@link Json} for
|
|
11256
12219
|
* the immutable variant.
|
|
11257
12220
|
*
|
|
12221
|
+
* @stability stable
|
|
11258
12222
|
* @category schemas
|
|
11259
12223
|
* @since 4.0.0
|
|
11260
12224
|
*/
|
|
@@ -11265,6 +12229,7 @@ export declare const MutableJson: Codec<MutableJson>;
|
|
|
11265
12229
|
* annotations are taken from the last check; otherwise they are taken from
|
|
11266
12230
|
* the base schema instance.
|
|
11267
12231
|
*
|
|
12232
|
+
* @stability stable
|
|
11268
12233
|
* @category getters
|
|
11269
12234
|
* @since 4.0.0
|
|
11270
12235
|
*/
|
|
@@ -11274,6 +12239,7 @@ export declare function resolveAnnotations<S extends Constraint>(schema: S): Ann
|
|
|
11274
12239
|
* annotations are those attached via `annotateKey` and live on the AST's
|
|
11275
12240
|
* `context` rather than on the schema node itself.
|
|
11276
12241
|
*
|
|
12242
|
+
* @stability stable
|
|
11277
12243
|
* @category getters
|
|
11278
12244
|
* @since 4.0.0
|
|
11279
12245
|
*/
|
|
@@ -11288,6 +12254,7 @@ export declare function resolveAnnotationsKey<S extends Constraint>(schema: S):
|
|
|
11288
12254
|
* Use {@link resolveAnnotations} to read the annotations attached to a schema at
|
|
11289
12255
|
* runtime.
|
|
11290
12256
|
*
|
|
12257
|
+
* @stability stable
|
|
11291
12258
|
* @category models
|
|
11292
12259
|
* @since 4.0.0
|
|
11293
12260
|
*/
|