effect 4.0.0-beta.70 → 4.0.0-beta.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Array.d.ts +1483 -239
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +617 -164
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +646 -52
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +331 -28
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +474 -18
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +292 -14
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +239 -19
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +163 -13
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +53 -8
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +82 -11
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +73 -12
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +53 -15
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +488 -200
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +349 -129
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +539 -158
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +222 -89
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +81 -6
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +45 -4
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +179 -54
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +65 -22
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +60 -3
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +31 -1
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +21 -21
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +14 -18
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +135 -50
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +109 -37
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +52 -29
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +21 -21
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +32 -7
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +32 -7
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +503 -48
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +191 -17
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +116 -6
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +92 -6
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +30 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +30 -1
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +92 -47
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +16 -12
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +313 -128
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +167 -68
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +345 -79
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +131 -12
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +5 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Duration.d.ts +203 -50
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +112 -32
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2006 -810
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +785 -350
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +16 -2
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +16 -2
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +100 -8
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +141 -8
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +10 -11
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +7 -8
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +46 -43
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +43 -35
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +135 -16
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +93 -12
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +96 -26
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +28 -2
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +149 -101
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +117 -80
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +321 -72
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +152 -3
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +6 -6
- package/dist/FiberHandle.js +4 -4
- package/dist/FiberMap.d.ts +18 -18
- package/dist/FiberMap.js +8 -8
- package/dist/FiberSet.d.ts +21 -13
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +17 -9
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +79 -16
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +93 -33
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +221 -2
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +155 -2
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +4 -6
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +3 -5
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +164 -18
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +116 -15
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +297 -25
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +75 -12
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +59 -26
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +95 -19
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +119 -17
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +35 -37
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +13 -15
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +210 -9
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +95 -5
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +16 -16
- package/dist/HashSet.js +6 -6
- package/dist/Inspectable.d.ts +47 -4
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +74 -17
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +261 -81
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +123 -43
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +34 -19
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +52 -44
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +5 -5
- package/dist/JsonPointer.js +5 -5
- package/dist/JsonSchema.d.ts +77 -33
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +45 -31
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +158 -13
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +79 -4
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +297 -101
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +94 -36
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +9 -2
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +1 -2
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +96 -21
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +68 -9
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +21 -7
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +26 -13
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +82 -10
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +33 -2
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +215 -42
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +242 -59
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +68 -41
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +60 -33
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +285 -40
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +128 -7
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +111 -4
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +98 -39
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +24 -6
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +23 -5
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +141 -4
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +73 -2
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +20 -11
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +6 -6
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +22 -6
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +6 -1
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +434 -17
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +268 -13
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +26 -33
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +18 -25
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +186 -150
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +75 -72
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +93 -120
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +149 -142
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +37 -5
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +22 -3
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +238 -15
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +106 -8
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +34 -6
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +19 -5
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +29 -4
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +16 -4
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +53 -4
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +45 -4
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +140 -14
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +63 -8
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +98 -168
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +109 -120
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +75 -9
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +70 -9
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +241 -66
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +187 -52
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +148 -3
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +69 -2
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +167 -59
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +163 -55
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +71 -16
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +35 -0
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +171 -9
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +49 -3
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +73 -18
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +23 -3
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +174 -53
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +128 -23
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +27 -23
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +22 -18
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +82 -4
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +64 -4
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +17 -7
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +2 -4
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +168 -32
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +135 -30
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +226 -30
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +162 -23
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +15 -2
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +49 -3
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +218 -35
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +57 -10
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +213 -29
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +99 -11
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +62 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +52 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +380 -57
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +176 -32
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +124 -14
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +150 -25
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +436 -115
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +344 -107
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +53 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +42 -3
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +934 -239
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +655 -217
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +239 -28
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +239 -28
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +127 -129
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +115 -117
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +45 -56
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +39 -50
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +254 -15
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +295 -33
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +106 -77
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +101 -71
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +92 -56
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +86 -50
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +9 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +38 -11
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +127 -25
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +91 -21
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +364 -19
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +155 -7
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +69 -7
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +49 -5
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +348 -29
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +103 -8
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +343 -45
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +194 -26
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +72 -17
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +62 -16
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +774 -224
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +333 -91
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +219 -47
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +179 -29
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +54 -110
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +26 -42
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +341 -105
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +162 -44
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +25 -7
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +25 -7
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +529 -29
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +193 -11
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +36 -13
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +5 -0
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +76 -20
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +41 -5
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +74 -7
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +74 -7
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +67 -30
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +7 -7
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +96 -108
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +42 -52
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +42 -9
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +42 -9
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +85 -2
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +56 -2
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +20 -20
- package/dist/TxHashMap.js +8 -8
- package/dist/TxHashSet.d.ts +14 -14
- package/dist/TxHashSet.js +6 -6
- package/dist/TxPriorityQueue.d.ts +43 -8
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +41 -6
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +98 -8
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +70 -8
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +58 -17
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +10 -10
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +88 -16
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +78 -14
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +113 -8
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +82 -8
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +173 -14
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +130 -14
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +206 -3
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +111 -3
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +68 -13
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts +171 -30
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +115 -30
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +130 -22
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +36 -12
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +21 -16
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +14 -6
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +0 -5205
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5205
- package/dist/index.js.map +1 -1
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/request.js +3 -1
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schema/arbitrary.js +11 -1
- package/dist/internal/schema/arbitrary.js.map +1 -1
- package/dist/internal/schema/representation.js +21 -12
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +69 -0
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +73 -9
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +79 -30
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +69 -31
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.d.ts +0 -107
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +0 -107
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +33 -5
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +33 -5
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +9 -0
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +43 -11
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +45 -6
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +73 -33
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +104 -8
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +103 -7
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +8 -3
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +8 -3
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +51 -7
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +50 -6
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +299 -169
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +278 -147
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +108 -14
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +80 -10
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +35 -13
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +34 -12
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +48 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +24 -3
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +23 -2
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +71 -13
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +35 -1
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +34 -12
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +33 -11
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +40 -27
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +34 -26
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +41 -25
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +41 -25
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +85 -24
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +84 -23
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +1 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +1 -1
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +0 -560
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +0 -560
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/Argument.js +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +3 -3
- package/dist/unstable/cli/CliError.js +3 -3
- package/dist/unstable/cli/CliOutput.d.ts +1 -1
- package/dist/unstable/cli/Command.d.ts +136 -8
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +50 -4
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +13 -0
- package/dist/unstable/cli/Completions.d.ts.map +1 -1
- package/dist/unstable/cli/Completions.js +41 -1
- package/dist/unstable/cli/Completions.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +24 -12
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +18 -6
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +39 -8
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +39 -8
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +128 -2
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +59 -7
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -3
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +59 -10
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +37 -7
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +51 -9
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.d.ts +0 -220
- package/dist/unstable/cli/index.d.ts.map +1 -1
- package/dist/unstable/cli/index.js +0 -220
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +61 -22
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +61 -22
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +58 -5
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +58 -5
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +87 -26
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +87 -26
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +49 -10
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +6 -1
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +6 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +33 -6
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +32 -5
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +19 -0
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +19 -0
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +44 -7
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +44 -7
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +5 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +4 -5
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +19 -0
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +19 -0
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +11 -11
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +11 -11
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +42 -22
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +42 -22
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +33 -14
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts +35 -9
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +35 -9
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +11 -11
- package/dist/unstable/cluster/Message.js +11 -11
- package/dist/unstable/cluster/MessageStorage.d.ts +38 -24
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +37 -23
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +18 -8
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +18 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +47 -14
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +47 -14
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +52 -10
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +52 -10
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +33 -16
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +33 -16
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +19 -4
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +19 -4
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +25 -1
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +24 -0
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +24 -2
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +24 -2
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +27 -3
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +63 -20
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +60 -16
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +61 -17
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -14
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -15
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +26 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +26 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +51 -9
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +51 -9
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +27 -13
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +27 -13
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +19 -5
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +19 -5
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +27 -1
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +27 -1
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +38 -0
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +73 -13
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +20 -0
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +20 -0
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +25 -14
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +25 -14
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/index.d.ts +0 -790
- package/dist/unstable/cluster/index.d.ts.map +1 -1
- package/dist/unstable/cluster/index.js +0 -790
- package/dist/unstable/cluster/index.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +41 -11
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +41 -11
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +38 -0
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +68 -11
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +24 -16
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +20 -13
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +20 -13
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/devtools/index.d.ts +0 -58
- package/dist/unstable/devtools/index.d.ts.map +1 -1
- package/dist/unstable/devtools/index.js +0 -58
- package/dist/unstable/devtools/index.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +30 -14
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +28 -14
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +28 -14
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +38 -17
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +3 -3
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/index.d.ts +0 -49
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +0 -49
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +28 -13
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +23 -15
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +22 -14
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +7 -7
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +36 -19
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +63 -25
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +61 -23
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +49 -40
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +28 -28
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +14 -4
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +14 -4
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +7 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +7 -2
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +24 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +24 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +82 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +119 -22
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +33 -7
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +68 -24
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +21 -0
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +50 -14
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +39 -15
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +39 -15
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +30 -11
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/index.d.ts +0 -240
- package/dist/unstable/eventlog/index.d.ts.map +1 -1
- package/dist/unstable/eventlog/index.js +0 -240
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +99 -52
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +77 -30
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +43 -13
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +43 -13
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +59 -17
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +59 -17
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +60 -22
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +58 -20
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +6 -2
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +59 -15
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +66 -30
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +17 -7
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +15 -14
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +39 -22
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +37 -16
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +37 -16
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +35 -16
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +33 -14
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +3 -3
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +3 -3
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +46 -20
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +46 -20
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +19 -14
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +54 -26
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +34 -21
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +34 -21
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +41 -28
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +39 -26
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +53 -21
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +20 -5
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +28 -14
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +64 -42
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +48 -26
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +30 -13
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +29 -12
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +32 -19
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +32 -19
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +39 -19
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +39 -19
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.d.ts +27 -14
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +25 -12
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +41 -28
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +32 -17
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +43 -28
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +40 -25
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +0 -452
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +0 -452
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +50 -26
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +3 -3
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +39 -25
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +28 -16
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +51 -23
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +37 -17
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +34 -23
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +49 -25
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -25
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +4 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +28 -16
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +43 -43
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +42 -42
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +54 -24
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +54 -24
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +28 -16
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +7 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +45 -27
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/httpapi/index.d.ts +0 -311
- package/dist/unstable/httpapi/index.d.ts.map +1 -1
- package/dist/unstable/httpapi/index.js +0 -311
- package/dist/unstable/httpapi/index.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +31 -16
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +31 -15
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +33 -15
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +27 -16
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +27 -16
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
- package/dist/unstable/observability/PrometheusMetrics.js +3 -3
- package/dist/unstable/observability/index.d.ts +0 -183
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +0 -183
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +12 -4
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +10 -2
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +8 -3
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +8 -3
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +29 -16
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +27 -14
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +10 -5
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +9 -4
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +20 -10
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +19 -9
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +33 -15
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/persistence/index.d.ts +0 -147
- package/dist/unstable/persistence/index.d.ts.map +1 -1
- package/dist/unstable/persistence/index.js +0 -147
- package/dist/unstable/persistence/index.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +14 -14
- package/dist/unstable/process/ChildProcess.js +7 -7
- package/dist/unstable/process/ChildProcessSpawner.d.ts +17 -5
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +17 -5
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.d.ts +0 -45
- package/dist/unstable/process/index.d.ts.map +1 -1
- package/dist/unstable/process/index.js +0 -45
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +74 -22
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +52 -20
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +81 -35
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +70 -32
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +32 -16
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +52 -25
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +81 -20
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +81 -20
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -1
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +37 -17
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +44 -21
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +44 -21
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.d.ts +0 -166
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +0 -166
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +47 -32
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +15 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +27 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +27 -12
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +31 -17
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +31 -17
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +29 -18
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +37 -19
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +4 -4
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +31 -21
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +31 -21
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +30 -20
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +30 -20
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +50 -33
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +48 -31
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +22 -17
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +22 -17
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +31 -15
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +31 -15
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +29 -14
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/index.d.ts +0 -272
- package/dist/unstable/rpc/index.d.ts.map +1 -1
- package/dist/unstable/rpc/index.js +0 -272
- package/dist/unstable/rpc/index.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +32 -33
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +25 -26
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -1
- package/dist/unstable/schema/VariantSchema.js +1 -1
- package/dist/unstable/schema/index.d.ts +0 -37
- package/dist/unstable/schema/index.d.ts.map +1 -1
- package/dist/unstable/schema/index.js +0 -37
- package/dist/unstable/schema/index.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +8 -2
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +8 -2
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +2 -2
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/socket/index.d.ts +0 -44
- package/dist/unstable/socket/index.d.ts.map +1 -1
- package/dist/unstable/socket/index.js +0 -44
- package/dist/unstable/socket/index.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +39 -18
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +7 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -2
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/SqlError.d.ts +2 -2
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +33 -17
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +3 -3
- package/dist/unstable/sql/SqlResolver.js +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +51 -21
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +51 -21
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +34 -14
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +0 -178
- package/dist/unstable/sql/index.d.ts.map +1 -1
- package/dist/unstable/sql/index.js +0 -178
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +32 -21
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +32 -21
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +37 -24
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +35 -22
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +1 -1
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +32 -16
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +31 -20
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +31 -20
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.d.ts +0 -80
- package/dist/unstable/workers/index.d.ts.map +1 -1
- package/dist/unstable/workers/index.js +0 -80
- package/dist/unstable/workers/index.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +2 -2
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +25 -13
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +12 -12
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableQueue.d.ts +36 -18
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +36 -18
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +22 -23
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +17 -18
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +26 -8
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +25 -7
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/index.d.ts +0 -160
- package/dist/unstable/workflow/index.d.ts.map +1 -1
- package/dist/unstable/workflow/index.js +0 -160
- package/dist/unstable/workflow/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +1557 -312
- package/src/BigDecimal.ts +646 -52
- package/src/BigInt.ts +474 -18
- package/src/Boolean.ts +239 -19
- package/src/Brand.ts +102 -11
- package/src/Cache.ts +96 -24
- package/src/Cause.ts +488 -200
- package/src/Channel.ts +647 -191
- package/src/ChannelSchema.ts +99 -6
- package/src/Chunk.ts +187 -54
- package/src/Clock.ts +60 -3
- package/src/Combiner.ts +21 -21
- package/src/Config.ts +135 -50
- package/src/ConfigProvider.ts +52 -29
- package/src/Console.ts +32 -7
- package/src/Context.ts +516 -50
- package/src/Cron.ts +116 -6
- package/src/Crypto.ts +30 -1
- package/src/Data.ts +92 -47
- package/src/DateTime.ts +313 -128
- package/src/Deferred.ts +345 -79
- package/src/Differ.ts +5 -0
- package/src/Duration.ts +203 -50
- package/src/Effect.ts +2044 -816
- package/src/Effectable.ts +16 -2
- package/src/Encoding.ts +146 -9
- package/src/Equal.ts +10 -11
- package/src/Equivalence.ts +49 -46
- package/src/ErrorReporter.ts +135 -16
- package/src/ExecutionPlan.ts +96 -26
- package/src/Exit.ts +149 -101
- package/src/Fiber.ts +321 -72
- package/src/FiberHandle.ts +6 -6
- package/src/FiberMap.ts +20 -20
- package/src/FiberSet.ts +21 -13
- package/src/FileSystem.ts +119 -39
- package/src/Filter.ts +221 -2
- package/src/Formatter.ts +4 -6
- package/src/Function.ts +164 -18
- package/src/Graph.ts +297 -25
- package/src/HKT.ts +59 -26
- package/src/Hash.ts +143 -23
- package/src/HashMap.ts +35 -37
- package/src/HashRing.ts +210 -9
- package/src/HashSet.ts +16 -16
- package/src/Inspectable.ts +86 -17
- package/src/Iterable.ts +261 -81
- package/src/JsonPatch.ts +79 -56
- package/src/JsonPointer.ts +5 -5
- package/src/JsonSchema.ts +77 -33
- package/src/Latch.ts +164 -13
- package/src/Layer.ts +297 -101
- package/src/LayerMap.ts +9 -2
- package/src/LogLevel.ts +96 -21
- package/src/Logger.ts +31 -15
- package/src/ManagedRuntime.ts +82 -10
- package/src/Match.ts +250 -59
- package/src/Metric.ts +68 -41
- package/src/MutableHashMap.ts +381 -52
- package/src/MutableHashSet.ts +145 -41
- package/src/MutableList.ts +24 -6
- package/src/MutableRef.ts +141 -4
- package/src/Newtype.ts +20 -11
- package/src/NonEmptyIterable.ts +22 -6
- package/src/Number.ts +434 -17
- package/src/Optic.ts +26 -33
- package/src/Option.ts +186 -150
- package/src/Order.ts +163 -161
- package/src/Ordering.ts +37 -5
- package/src/PartitionedSemaphore.ts +238 -15
- package/src/Path.ts +34 -6
- package/src/Pipeable.ts +29 -4
- package/src/PlatformError.ts +53 -4
- package/src/Pool.ts +174 -32
- package/src/Predicate.ts +151 -196
- package/src/PrimaryKey.ts +75 -9
- package/src/PubSub.ts +241 -66
- package/src/Pull.ts +148 -3
- package/src/Queue.ts +167 -59
- package/src/Random.ts +71 -16
- package/src/RcMap.ts +171 -9
- package/src/RcRef.ts +73 -18
- package/src/Record.ts +174 -53
- package/src/Redactable.ts +27 -23
- package/src/Redacted.ts +82 -4
- package/src/Reducer.ts +17 -7
- package/src/Ref.ts +332 -54
- package/src/References.ts +226 -30
- package/src/RegExp.ts +49 -3
- package/src/Request.ts +218 -35
- package/src/RequestResolver.ts +268 -36
- package/src/Resource.ts +62 -3
- package/src/Result.ts +380 -57
- package/src/Runtime.ts +172 -32
- package/src/Schedule.ts +510 -145
- package/src/Scheduler.ts +53 -4
- package/src/Schema.ts +975 -264
- package/src/SchemaAST.ts +239 -28
- package/src/SchemaGetter.ts +127 -129
- package/src/SchemaIssue.ts +45 -56
- package/src/SchemaParser.ts +295 -33
- package/src/SchemaRepresentation.ts +106 -77
- package/src/SchemaTransformation.ts +92 -56
- package/src/SchemaUtils.ts +38 -11
- package/src/Scope.ts +127 -25
- package/src/ScopedCache.ts +418 -21
- package/src/ScopedRef.ts +69 -7
- package/src/Semaphore.ts +348 -29
- package/src/Sink.ts +343 -45
- package/src/Stdio.ts +72 -17
- package/src/Stream.ts +880 -242
- package/src/String.ts +221 -49
- package/src/Struct.ts +54 -110
- package/src/SubscriptionRef.ts +341 -105
- package/src/Symbol.ts +25 -7
- package/src/SynchronizedRef.ts +529 -29
- package/src/Take.ts +36 -13
- package/src/Terminal.ts +76 -20
- package/src/Tracer.ts +74 -7
- package/src/Trie.ts +67 -30
- package/src/Tuple.ts +96 -108
- package/src/TxChunk.ts +42 -9
- package/src/TxDeferred.ts +85 -2
- package/src/TxHashMap.ts +22 -22
- package/src/TxHashSet.ts +22 -22
- package/src/TxPriorityQueue.ts +43 -8
- package/src/TxPubSub.ts +98 -8
- package/src/TxQueue.ts +58 -17
- package/src/TxReentrantLock.ts +88 -16
- package/src/TxRef.ts +113 -8
- package/src/TxSemaphore.ts +173 -14
- package/src/TxSubscriptionRef.ts +206 -3
- package/src/Types.ts +68 -13
- package/src/UndefinedOr.ts +171 -30
- package/src/Unify.ts +130 -22
- package/src/Utils.ts +21 -16
- package/src/index.ts +0 -5205
- package/src/internal/effect.ts +59 -29
- package/src/internal/request.ts +3 -1
- package/src/internal/schema/arbitrary.ts +14 -1
- package/src/internal/schema/representation.ts +37 -14
- package/src/testing/TestConsole.ts +105 -9
- package/src/testing/TestSchema.ts +81 -31
- package/src/testing/index.ts +0 -107
- package/src/unstable/ai/AiError.ts +33 -5
- package/src/unstable/ai/AnthropicStructuredOutput.ts +43 -11
- package/src/unstable/ai/Chat.ts +82 -33
- package/src/unstable/ai/EmbeddingModel.ts +104 -8
- package/src/unstable/ai/IdGenerator.ts +8 -3
- package/src/unstable/ai/LanguageModel.ts +51 -7
- package/src/unstable/ai/McpSchema.ts +299 -169
- package/src/unstable/ai/McpServer.ts +108 -14
- package/src/unstable/ai/Model.ts +35 -13
- package/src/unstable/ai/OpenAiStructuredOutput.ts +48 -1
- package/src/unstable/ai/Prompt.ts +24 -3
- package/src/unstable/ai/Response.ts +71 -13
- package/src/unstable/ai/ResponseIdTracker.ts +34 -12
- package/src/unstable/ai/Telemetry.ts +40 -27
- package/src/unstable/ai/Tokenizer.ts +41 -25
- package/src/unstable/ai/Tool.ts +85 -24
- package/src/unstable/ai/Toolkit.ts +32 -4
- package/src/unstable/ai/index.ts +0 -560
- package/src/unstable/cli/Argument.ts +1 -1
- package/src/unstable/cli/CliError.ts +3 -3
- package/src/unstable/cli/CliOutput.ts +1 -1
- package/src/unstable/cli/Command.ts +136 -8
- package/src/unstable/cli/Completions.ts +41 -1
- package/src/unstable/cli/Flag.ts +24 -12
- package/src/unstable/cli/GlobalFlag.ts +39 -8
- package/src/unstable/cli/Param.ts +137 -11
- package/src/unstable/cli/Primitive.ts +59 -10
- package/src/unstable/cli/Prompt.ts +63 -14
- package/src/unstable/cli/index.ts +0 -220
- package/src/unstable/cli/internal/parser.ts +1 -1
- package/src/unstable/cluster/ClusterCron.ts +1 -1
- package/src/unstable/cluster/ClusterError.ts +61 -22
- package/src/unstable/cluster/ClusterMetrics.ts +58 -5
- package/src/unstable/cluster/ClusterSchema.ts +87 -26
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +63 -11
- package/src/unstable/cluster/DeliverAt.ts +6 -1
- package/src/unstable/cluster/Entity.ts +33 -6
- package/src/unstable/cluster/EntityAddress.ts +19 -0
- package/src/unstable/cluster/EntityId.ts +44 -7
- package/src/unstable/cluster/EntityResource.ts +5 -6
- package/src/unstable/cluster/EntityType.ts +19 -0
- package/src/unstable/cluster/Envelope.ts +11 -11
- package/src/unstable/cluster/HttpRunner.ts +42 -22
- package/src/unstable/cluster/K8sHttpClient.ts +32 -13
- package/src/unstable/cluster/MachineId.ts +35 -9
- package/src/unstable/cluster/Message.ts +11 -11
- package/src/unstable/cluster/MessageStorage.ts +38 -24
- package/src/unstable/cluster/Reply.ts +18 -8
- package/src/unstable/cluster/Runner.ts +47 -14
- package/src/unstable/cluster/RunnerAddress.ts +52 -10
- package/src/unstable/cluster/RunnerHealth.ts +33 -16
- package/src/unstable/cluster/RunnerServer.ts +19 -4
- package/src/unstable/cluster/Runners.ts +25 -1
- package/src/unstable/cluster/ShardId.ts +24 -2
- package/src/unstable/cluster/Sharding.ts +63 -20
- package/src/unstable/cluster/ShardingConfig.ts +60 -16
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +27 -14
- package/src/unstable/cluster/SingleRunner.ts +26 -1
- package/src/unstable/cluster/Singleton.ts +51 -9
- package/src/unstable/cluster/SingletonAddress.ts +27 -13
- package/src/unstable/cluster/Snowflake.ts +19 -5
- package/src/unstable/cluster/SocketRunner.ts +27 -1
- package/src/unstable/cluster/SqlMessageStorage.ts +73 -13
- package/src/unstable/cluster/SqlRunnerStorage.ts +20 -0
- package/src/unstable/cluster/TestRunner.ts +25 -14
- package/src/unstable/cluster/index.ts +0 -790
- package/src/unstable/devtools/DevTools.ts +41 -11
- package/src/unstable/devtools/DevToolsClient.ts +68 -11
- package/src/unstable/devtools/DevToolsSchema.ts +24 -16
- package/src/unstable/devtools/DevToolsServer.ts +18 -11
- package/src/unstable/devtools/index.ts +0 -58
- package/src/unstable/encoding/Msgpack.ts +30 -14
- package/src/unstable/encoding/Ndjson.ts +28 -14
- package/src/unstable/encoding/Sse.ts +38 -17
- package/src/unstable/encoding/index.ts +0 -49
- package/src/unstable/eventlog/Event.ts +30 -15
- package/src/unstable/eventlog/EventGroup.ts +23 -15
- package/src/unstable/eventlog/EventJournal.ts +38 -21
- package/src/unstable/eventlog/EventLog.ts +63 -25
- package/src/unstable/eventlog/EventLogEncryption.ts +8 -3
- package/src/unstable/eventlog/EventLogMessage.ts +49 -40
- package/src/unstable/eventlog/EventLogRemote.ts +14 -4
- package/src/unstable/eventlog/EventLogServer.ts +36 -17
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +24 -2
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +119 -22
- package/src/unstable/eventlog/EventLogSessionAuth.ts +68 -24
- package/src/unstable/eventlog/SqlEventJournal.ts +50 -14
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +39 -15
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +30 -11
- package/src/unstable/eventlog/index.ts +0 -240
- package/src/unstable/http/Cookies.ts +97 -50
- package/src/unstable/http/Etag.ts +43 -13
- package/src/unstable/http/FetchHttpClient.ts +59 -17
- package/src/unstable/http/Headers.ts +62 -24
- package/src/unstable/http/HttpBody.ts +59 -15
- package/src/unstable/http/HttpClient.ts +119 -33
- package/src/unstable/http/HttpClientError.ts +41 -24
- package/src/unstable/http/HttpClientRequest.ts +37 -16
- package/src/unstable/http/HttpClientResponse.ts +33 -14
- package/src/unstable/http/HttpEffect.ts +35 -18
- package/src/unstable/http/HttpMethod.ts +46 -20
- package/src/unstable/http/HttpRouter.ts +58 -30
- package/src/unstable/http/HttpServer.ts +34 -21
- package/src/unstable/http/HttpServerError.ts +41 -28
- package/src/unstable/http/HttpServerRequest.ts +51 -19
- package/src/unstable/http/HttpServerRespondable.ts +28 -14
- package/src/unstable/http/HttpServerResponse.ts +66 -44
- package/src/unstable/http/HttpStaticServer.ts +29 -12
- package/src/unstable/http/HttpTraceContext.ts +32 -19
- package/src/unstable/http/Multipart.ts +39 -19
- package/src/unstable/http/Template.ts +25 -12
- package/src/unstable/http/Url.ts +41 -28
- package/src/unstable/http/UrlParams.ts +43 -28
- package/src/unstable/http/index.ts +0 -452
- package/src/unstable/httpapi/HttpApi.ts +48 -24
- package/src/unstable/httpapi/HttpApiBuilder.ts +40 -26
- package/src/unstable/httpapi/HttpApiClient.ts +28 -16
- package/src/unstable/httpapi/HttpApiEndpoint.ts +51 -23
- package/src/unstable/httpapi/HttpApiError.ts +38 -18
- package/src/unstable/httpapi/HttpApiGroup.ts +34 -23
- package/src/unstable/httpapi/HttpApiMiddleware.ts +49 -25
- package/src/unstable/httpapi/HttpApiScalar.ts +32 -17
- package/src/unstable/httpapi/HttpApiSchema.ts +43 -43
- package/src/unstable/httpapi/HttpApiSecurity.ts +54 -24
- package/src/unstable/httpapi/HttpApiSwagger.ts +28 -16
- package/src/unstable/httpapi/HttpApiTest.ts +1 -1
- package/src/unstable/httpapi/OpenApi.ts +43 -25
- package/src/unstable/httpapi/index.ts +0 -311
- package/src/unstable/observability/Otlp.ts +31 -16
- package/src/unstable/observability/OtlpLogger.ts +31 -15
- package/src/unstable/observability/OtlpResource.ts +33 -15
- package/src/unstable/observability/OtlpSerialization.ts +25 -14
- package/src/unstable/observability/PrometheusMetrics.ts +3 -3
- package/src/unstable/observability/index.ts +0 -183
- package/src/unstable/persistence/KeyValueStore.ts +12 -4
- package/src/unstable/persistence/Persistable.ts +8 -3
- package/src/unstable/persistence/PersistedCache.ts +27 -14
- package/src/unstable/persistence/PersistedQueue.ts +10 -5
- package/src/unstable/persistence/RateLimiter.ts +20 -10
- package/src/unstable/persistence/Redis.ts +33 -15
- package/src/unstable/persistence/index.ts +0 -147
- package/src/unstable/process/ChildProcess.ts +14 -14
- package/src/unstable/process/ChildProcessSpawner.ts +17 -5
- package/src/unstable/process/index.ts +0 -45
- package/src/unstable/reactivity/AsyncResult.ts +96 -24
- package/src/unstable/reactivity/Atom.ts +89 -35
- package/src/unstable/reactivity/AtomRef.ts +58 -25
- package/src/unstable/reactivity/AtomRegistry.ts +79 -18
- package/src/unstable/reactivity/Hydration.ts +37 -17
- package/src/unstable/reactivity/Reactivity.ts +42 -19
- package/src/unstable/reactivity/index.ts +0 -166
- package/src/unstable/rpc/Rpc.ts +47 -32
- package/src/unstable/rpc/RpcClient.ts +58 -34
- package/src/unstable/rpc/RpcClientError.ts +29 -15
- package/src/unstable/rpc/RpcGroup.ts +28 -17
- package/src/unstable/rpc/RpcMessage.ts +37 -19
- package/src/unstable/rpc/RpcMiddleware.ts +31 -21
- package/src/unstable/rpc/RpcSchema.ts +30 -20
- package/src/unstable/rpc/RpcSerialization.ts +48 -31
- package/src/unstable/rpc/RpcServer.ts +53 -40
- package/src/unstable/rpc/RpcTest.ts +29 -13
- package/src/unstable/rpc/RpcWorker.ts +29 -14
- package/src/unstable/rpc/index.ts +0 -272
- package/src/unstable/schema/Model.ts +32 -33
- package/src/unstable/schema/VariantSchema.ts +1 -1
- package/src/unstable/schema/index.ts +0 -37
- package/src/unstable/socket/Socket.ts +8 -2
- package/src/unstable/socket/SocketServer.ts +2 -2
- package/src/unstable/socket/index.ts +0 -44
- package/src/unstable/sql/Migrator.ts +39 -18
- package/src/unstable/sql/SqlClient.ts +7 -2
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/SqlError.ts +33 -17
- package/src/unstable/sql/SqlResolver.ts +3 -3
- package/src/unstable/sql/SqlSchema.ts +51 -21
- package/src/unstable/sql/Statement.ts +35 -15
- package/src/unstable/sql/index.ts +0 -178
- package/src/unstable/workers/Transferable.ts +32 -21
- package/src/unstable/workers/Worker.ts +35 -22
- package/src/unstable/workers/WorkerError.ts +35 -19
- package/src/unstable/workers/WorkerRunner.ts +29 -18
- package/src/unstable/workers/index.ts +0 -80
- package/src/unstable/workflow/DurableClock.ts +25 -13
- package/src/unstable/workflow/DurableDeferred.ts +12 -12
- package/src/unstable/workflow/DurableQueue.ts +34 -16
- package/src/unstable/workflow/Workflow.ts +22 -23
- package/src/unstable/workflow/WorkflowEngine.ts +26 -8
- package/src/unstable/workflow/index.ts +0 -160
package/dist/Schema.d.ts
CHANGED
|
@@ -153,7 +153,7 @@ export type ConstructorDefault = "no-default" | "with-default";
|
|
|
153
153
|
*
|
|
154
154
|
* **When to use**
|
|
155
155
|
*
|
|
156
|
-
*
|
|
156
|
+
* Use when passing `disableChecks: true` to skip validation when you trust the data.
|
|
157
157
|
* - Pass `parseOptions` to control error reporting behavior.
|
|
158
158
|
*
|
|
159
159
|
* @see {@link Bottom.makeEffect}
|
|
@@ -179,7 +179,7 @@ export interface MakeOptions {
|
|
|
179
179
|
*
|
|
180
180
|
* **When to use**
|
|
181
181
|
*
|
|
182
|
-
*
|
|
182
|
+
* Use when you are writing advanced generic schema utilities or performing schema
|
|
183
183
|
* introspection.
|
|
184
184
|
* - In user code, prefer {@link Schema}, {@link Codec}, {@link Decoder}, or
|
|
185
185
|
* {@link Encoder} instead.
|
|
@@ -213,10 +213,57 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends AST.AST, o
|
|
|
213
213
|
check(...checks: readonly [AST.Check<this["Type"]>, ...Array<AST.Check<this["Type"]>>]): this["Rebuild"];
|
|
214
214
|
rebuild(ast: this["ast"]): this["Rebuild"];
|
|
215
215
|
/**
|
|
216
|
-
* Constructs a value from the make input representation.
|
|
216
|
+
* Constructs a value from the make input representation synchronously.
|
|
217
|
+
*
|
|
218
|
+
* **When to use**
|
|
219
|
+
*
|
|
220
|
+
* Use when constructor input is trusted or when validation failure
|
|
221
|
+
* should abort with a thrown `Error`.
|
|
222
|
+
*
|
|
223
|
+
* **Details**
|
|
224
|
+
*
|
|
225
|
+
* Applies constructor defaults and type-side validation according to
|
|
226
|
+
* `MakeOptions`.
|
|
227
|
+
*
|
|
228
|
+
* **Gotchas**
|
|
229
|
+
*
|
|
230
|
+
* Throws an `Error` with the schema issue in its `cause` when validation
|
|
231
|
+
* fails.
|
|
232
|
+
*
|
|
233
|
+
* @see {@link Bottom.makeOption} — construct synchronously and discard validation details
|
|
234
|
+
* @see {@link Bottom.makeEffect} — construct through `Effect` when validation failure should stay in the error channel
|
|
217
235
|
*/
|
|
218
236
|
make(input: this["~type.make.in"], options?: MakeOptions): this["Type"];
|
|
237
|
+
/**
|
|
238
|
+
* Constructs a value from the make input representation, returning `Option.none`
|
|
239
|
+
* when validation fails.
|
|
240
|
+
*
|
|
241
|
+
* **When to use**
|
|
242
|
+
*
|
|
243
|
+
* Use when you only need to know whether construction succeeds
|
|
244
|
+
* and do not need validation details.
|
|
245
|
+
*
|
|
246
|
+
* **Details**
|
|
247
|
+
*
|
|
248
|
+
* Applies constructor defaults and type-side validation according to
|
|
249
|
+
* `MakeOptions`.
|
|
250
|
+
*
|
|
251
|
+
* @see {@link Bottom.make} — construct synchronously when validation failure should throw
|
|
252
|
+
* @see {@link Bottom.makeEffect} — construct through `Effect` when validation details should stay in the error channel
|
|
253
|
+
*/
|
|
219
254
|
makeOption(input: this["~type.make.in"], options?: MakeOptions): Option_.Option<this["Type"]>;
|
|
255
|
+
/**
|
|
256
|
+
* Constructs a value from the make input representation, returning validation
|
|
257
|
+
* failures in the `Effect` error channel.
|
|
258
|
+
*
|
|
259
|
+
* **When to use**
|
|
260
|
+
*
|
|
261
|
+
* Use when constructor input may fail validation and you want to
|
|
262
|
+
* compose that failure with other `Effect` operations instead of throwing.
|
|
263
|
+
*
|
|
264
|
+
* @see {@link Bottom.make} — construct synchronously when validation failure should throw
|
|
265
|
+
* @see {@link Bottom.makeOption} — construct synchronously and discard validation details
|
|
266
|
+
*/
|
|
220
267
|
makeEffect(input: this["~type.make.in"], options?: MakeOptions): Effect.Effect<this["Type"], SchemaError>;
|
|
221
268
|
}
|
|
222
269
|
/**
|
|
@@ -322,7 +369,7 @@ export interface declare<T, Iso = T> extends declareConstructor<T, T, readonly [
|
|
|
322
369
|
*/
|
|
323
370
|
export declare function declare<T, Iso = T>(is: (u: unknown) => u is T, annotations?: Annotations.Declaration<T> | undefined): declare<T, Iso>;
|
|
324
371
|
/**
|
|
325
|
-
*
|
|
372
|
+
* Returns a schema widened to the fully-parameterized {@link Bottom} interface,
|
|
326
373
|
* making all 14 type parameters visible to TypeScript.
|
|
327
374
|
*
|
|
328
375
|
* **Details**
|
|
@@ -695,8 +742,8 @@ export interface Encoder<out E, out RE = never> extends Codec<unknown, E, unknow
|
|
|
695
742
|
readonly "Rebuild": Encoder<E, RE>;
|
|
696
743
|
}
|
|
697
744
|
/**
|
|
698
|
-
*
|
|
699
|
-
*
|
|
745
|
+
* Returns a codec widened to the full {@link Codec} interface, prompting
|
|
746
|
+
* TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`).
|
|
700
747
|
*
|
|
701
748
|
* **Details**
|
|
702
749
|
*
|
|
@@ -843,7 +890,7 @@ export declare function toStandardSchemaV1<S extends Decoder<unknown>>(self: S,
|
|
|
843
890
|
readonly parseOptions?: AST.ParseOptions | undefined;
|
|
844
891
|
}): StandardSchemaV1<S["Encoded"], S["Type"]> & S;
|
|
845
892
|
/**
|
|
846
|
-
*
|
|
893
|
+
* Converts a schema to an experimental Standard JSON Schema V1 representation.
|
|
847
894
|
*
|
|
848
895
|
* **Details**
|
|
849
896
|
*
|
|
@@ -889,11 +936,15 @@ export declare const is: typeof Parser.is;
|
|
|
889
936
|
* Creates an assertion function that throws an error if the input doesn't match
|
|
890
937
|
* the schema.
|
|
891
938
|
*
|
|
939
|
+
* **When to use**
|
|
940
|
+
*
|
|
941
|
+
* Use to validate unknown input at runtime while narrowing the value with a
|
|
942
|
+
* TypeScript `asserts` predicate.
|
|
943
|
+
*
|
|
892
944
|
* **Details**
|
|
893
945
|
*
|
|
894
|
-
*
|
|
895
|
-
*
|
|
896
|
-
* throws an error if it fails.
|
|
946
|
+
* The input is narrowed if the assertion succeeds. If validation fails, the
|
|
947
|
+
* assertion throws.
|
|
897
948
|
*
|
|
898
949
|
* **Example** (Basic Usage)
|
|
899
950
|
*
|
|
@@ -921,9 +972,16 @@ export declare const is: typeof Parser.is;
|
|
|
921
972
|
export declare const asserts: <S extends Top, I>(schema: S, input: I) => asserts input is I & S["Type"];
|
|
922
973
|
/**
|
|
923
974
|
* Decodes an `unknown` input against a schema, returning an `Effect` that
|
|
924
|
-
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
925
|
-
*
|
|
926
|
-
*
|
|
975
|
+
* succeeds with the decoded value or fails with a {@link SchemaError}.
|
|
976
|
+
*
|
|
977
|
+
* **When to use**
|
|
978
|
+
*
|
|
979
|
+
* Use when decoding input whose type is not statically known.
|
|
980
|
+
*
|
|
981
|
+
* **Details**
|
|
982
|
+
*
|
|
983
|
+
* Prefer {@link decodeEffect} when the input is already typed as the schema's
|
|
984
|
+
* `Encoded` type.
|
|
927
985
|
* Options may be provided either when creating the decoder or when applying it;
|
|
928
986
|
* application options override creation options.
|
|
929
987
|
*
|
|
@@ -934,8 +992,15 @@ export declare function decodeUnknownEffect<S extends Top>(schema: S, options?:
|
|
|
934
992
|
/**
|
|
935
993
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
936
994
|
* returning an `Effect` that succeeds with the decoded value or fails with a
|
|
937
|
-
* {@link SchemaError}.
|
|
938
|
-
*
|
|
995
|
+
* {@link SchemaError}.
|
|
996
|
+
*
|
|
997
|
+
* **When to use**
|
|
998
|
+
*
|
|
999
|
+
* Use when the input is already typed as the schema's `Encoded` type.
|
|
1000
|
+
*
|
|
1001
|
+
* **Details**
|
|
1002
|
+
*
|
|
1003
|
+
* For `unknown` input use {@link decodeUnknownEffect}.
|
|
939
1004
|
* Options may be provided either when creating the decoder or when applying it;
|
|
940
1005
|
* application options override creation options.
|
|
941
1006
|
*
|
|
@@ -946,9 +1011,18 @@ export declare const decodeEffect: <S extends Top>(schema: S, options?: AST.Pars
|
|
|
946
1011
|
/**
|
|
947
1012
|
* Decodes an `unknown` input against a schema synchronously, returning an
|
|
948
1013
|
* `Exit` that is either a `Success` with the decoded value or a `Failure` with
|
|
949
|
-
* a {@link SchemaError}.
|
|
950
|
-
*
|
|
951
|
-
*
|
|
1014
|
+
* a {@link SchemaError}.
|
|
1015
|
+
*
|
|
1016
|
+
* **When to use**
|
|
1017
|
+
*
|
|
1018
|
+
* Use when the input type is not statically known and decoding should return an
|
|
1019
|
+
* `Exit` instead of failing or throwing.
|
|
1020
|
+
*
|
|
1021
|
+
* **Details**
|
|
1022
|
+
*
|
|
1023
|
+
* Only usable with schemas that have no `DecodingServices` requirement. Prefer
|
|
1024
|
+
* {@link decodeExit} when the input is already typed as the schema's `Encoded`
|
|
1025
|
+
* type.
|
|
952
1026
|
* Options may be provided either when creating the decoder or when applying it;
|
|
953
1027
|
* application options override creation options.
|
|
954
1028
|
*
|
|
@@ -959,9 +1033,17 @@ export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S,
|
|
|
959
1033
|
/**
|
|
960
1034
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
961
1035
|
* synchronously, returning an `Exit` that is either a `Success` with the
|
|
962
|
-
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
963
|
-
*
|
|
964
|
-
*
|
|
1036
|
+
* decoded value or a `Failure` with a {@link SchemaError}.
|
|
1037
|
+
*
|
|
1038
|
+
* **When to use**
|
|
1039
|
+
*
|
|
1040
|
+
* Use when typed input should be decoded into an `Exit` instead of failing or
|
|
1041
|
+
* throwing.
|
|
1042
|
+
*
|
|
1043
|
+
* **Details**
|
|
1044
|
+
*
|
|
1045
|
+
* Only usable with schemas that have no `DecodingServices` requirement. For
|
|
1046
|
+
* `unknown` input use {@link decodeUnknownExit}.
|
|
965
1047
|
* Options may be provided either when creating the decoder or when applying it;
|
|
966
1048
|
* application options override creation options.
|
|
967
1049
|
*
|
|
@@ -971,10 +1053,17 @@ export declare function decodeUnknownExit<S extends Decoder<unknown>>(schema: S,
|
|
|
971
1053
|
export declare const decodeExit: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Exit_.Exit<S["Type"], SchemaError>;
|
|
972
1054
|
/**
|
|
973
1055
|
* Decodes an `unknown` input against a schema, returning an `Option` that is
|
|
974
|
-
* `Some` with the decoded value on success or `None` on failure.
|
|
975
|
-
*
|
|
976
|
-
*
|
|
977
|
-
*
|
|
1056
|
+
* `Some` with the decoded value on success or `None` on failure.
|
|
1057
|
+
*
|
|
1058
|
+
* **When to use**
|
|
1059
|
+
*
|
|
1060
|
+
* Use when the input type is not statically known and you only need to know
|
|
1061
|
+
* whether decoding succeeded.
|
|
1062
|
+
*
|
|
1063
|
+
* **Details**
|
|
1064
|
+
*
|
|
1065
|
+
* Prefer this over {@link decodeUnknownExit} or {@link decodeUnknownEffect}
|
|
1066
|
+
* when you don't need error details. For typed input use {@link decodeOption}.
|
|
978
1067
|
* Options may be provided either when creating the decoder or when applying it;
|
|
979
1068
|
* application options override creation options.
|
|
980
1069
|
*
|
|
@@ -985,7 +1074,15 @@ export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
|
|
|
985
1074
|
/**
|
|
986
1075
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
987
1076
|
* returning an `Option` that is `Some` with the decoded value on success or
|
|
988
|
-
* `None` on failure.
|
|
1077
|
+
* `None` on failure.
|
|
1078
|
+
*
|
|
1079
|
+
* **When to use**
|
|
1080
|
+
*
|
|
1081
|
+
* Use when typed input should be decoded and only success or failure matters.
|
|
1082
|
+
*
|
|
1083
|
+
* **Details**
|
|
1084
|
+
*
|
|
1085
|
+
* For `unknown` input use {@link decodeUnknownOption}.
|
|
989
1086
|
* Options may be provided either when creating the decoder or when applying it;
|
|
990
1087
|
* application options override creation options.
|
|
991
1088
|
*
|
|
@@ -995,8 +1092,16 @@ export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption;
|
|
|
995
1092
|
export declare const decodeOption: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Option_.Option<S["Type"]>;
|
|
996
1093
|
/**
|
|
997
1094
|
* Decodes an `unknown` input against a schema, returning a `Result` that
|
|
998
|
-
* succeeds with the decoded value or fails with a schema issue.
|
|
999
|
-
*
|
|
1095
|
+
* succeeds with the decoded value or fails with a schema issue.
|
|
1096
|
+
*
|
|
1097
|
+
* **When to use**
|
|
1098
|
+
*
|
|
1099
|
+
* Use when the input type is not statically known and decoding should return a
|
|
1100
|
+
* `Result` with structured issue data.
|
|
1101
|
+
*
|
|
1102
|
+
* **Details**
|
|
1103
|
+
*
|
|
1104
|
+
* For typed input use {@link decodeResult}.
|
|
1000
1105
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1001
1106
|
* application options override creation options.
|
|
1002
1107
|
*
|
|
@@ -1007,7 +1112,16 @@ export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult;
|
|
|
1007
1112
|
/**
|
|
1008
1113
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1009
1114
|
* returning a `Result` that succeeds with the decoded value or fails with a
|
|
1010
|
-
* schema issue.
|
|
1115
|
+
* schema issue.
|
|
1116
|
+
*
|
|
1117
|
+
* **When to use**
|
|
1118
|
+
*
|
|
1119
|
+
* Use when typed input should be decoded into a `Result` with structured issue
|
|
1120
|
+
* data.
|
|
1121
|
+
*
|
|
1122
|
+
* **Details**
|
|
1123
|
+
*
|
|
1124
|
+
* For `unknown` input use {@link decodeUnknownResult}.
|
|
1011
1125
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1012
1126
|
* application options override creation options.
|
|
1013
1127
|
*
|
|
@@ -1017,9 +1131,15 @@ export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult;
|
|
|
1017
1131
|
export declare const decodeResult: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => Result_.Result<S["Type"], Issue.Issue>;
|
|
1018
1132
|
/**
|
|
1019
1133
|
* Decodes an `unknown` input against a schema, returning a `Promise` that
|
|
1020
|
-
* resolves with the decoded value or rejects with a schema issue.
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1134
|
+
* resolves with the decoded value or rejects with a schema issue.
|
|
1135
|
+
*
|
|
1136
|
+
* **When to use**
|
|
1137
|
+
*
|
|
1138
|
+
* Use when integrating unknown input validation with Promise-based APIs.
|
|
1139
|
+
*
|
|
1140
|
+
* **Details**
|
|
1141
|
+
*
|
|
1142
|
+
* For typed input use {@link decodePromise}.
|
|
1023
1143
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1024
1144
|
* application options override creation options.
|
|
1025
1145
|
*
|
|
@@ -1030,10 +1150,15 @@ export declare const decodeUnknownPromise: typeof Parser.decodeUnknownPromise;
|
|
|
1030
1150
|
/**
|
|
1031
1151
|
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
1032
1152
|
* returning a `Promise` that resolves with the decoded value or rejects with a
|
|
1033
|
-
* schema issue.
|
|
1153
|
+
* schema issue.
|
|
1154
|
+
*
|
|
1155
|
+
* **When to use**
|
|
1156
|
+
*
|
|
1157
|
+
* Use when integrating typed input decoding with Promise-based APIs.
|
|
1034
1158
|
*
|
|
1035
1159
|
* **Details**
|
|
1036
1160
|
*
|
|
1161
|
+
* For `unknown` input use `decodeUnknownPromise`.
|
|
1037
1162
|
* Options may be provided either when creating the decoder or when applying it;
|
|
1038
1163
|
* application options override creation options.
|
|
1039
1164
|
*
|
|
@@ -1044,11 +1169,15 @@ export declare const decodePromise: typeof Parser.decodePromise;
|
|
|
1044
1169
|
/**
|
|
1045
1170
|
* Decodes an `unknown` input against a schema synchronously, returning the
|
|
1046
1171
|
* decoded value or throwing an `Error` whose cause contains the schema issue.
|
|
1047
|
-
*
|
|
1048
|
-
*
|
|
1172
|
+
*
|
|
1173
|
+
* **When to use**
|
|
1174
|
+
*
|
|
1175
|
+
* Use when validating unknown data at a boundary and treating schema mismatches
|
|
1176
|
+
* as exceptions.
|
|
1049
1177
|
*
|
|
1050
1178
|
* **Details**
|
|
1051
1179
|
*
|
|
1180
|
+
* For typed input use `decodeSync`.
|
|
1052
1181
|
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
1053
1182
|
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
1054
1183
|
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
@@ -1078,10 +1207,16 @@ export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
|
|
|
1078
1207
|
/**
|
|
1079
1208
|
* Decodes a typed input (the schema's `Encoded` type) against a schema
|
|
1080
1209
|
* synchronously, returning the decoded value or throwing an `Error` whose cause
|
|
1081
|
-
* contains the schema issue.
|
|
1210
|
+
* contains the schema issue.
|
|
1211
|
+
*
|
|
1212
|
+
* **When to use**
|
|
1213
|
+
*
|
|
1214
|
+
* Use when typed input should be decoded synchronously and schema mismatches
|
|
1215
|
+
* should throw.
|
|
1082
1216
|
*
|
|
1083
1217
|
* **Details**
|
|
1084
1218
|
*
|
|
1219
|
+
* For `unknown` input use `decodeUnknownSync`.
|
|
1085
1220
|
* Only service-free schemas can be decoded synchronously. Options may be
|
|
1086
1221
|
* provided either when creating the decoder or when applying it; application
|
|
1087
1222
|
* options override creation options.
|
|
@@ -1092,9 +1227,16 @@ export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync;
|
|
|
1092
1227
|
export declare const decodeSync: <S extends Decoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Encoded"], options?: AST.ParseOptions) => S["Type"];
|
|
1093
1228
|
/**
|
|
1094
1229
|
* Encodes an `unknown` input against a schema, returning an `Effect` that
|
|
1095
|
-
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
1096
|
-
*
|
|
1097
|
-
*
|
|
1230
|
+
* succeeds with the encoded value or fails with a {@link SchemaError}.
|
|
1231
|
+
*
|
|
1232
|
+
* **When to use**
|
|
1233
|
+
*
|
|
1234
|
+
* Use when encoding input whose type is not statically known.
|
|
1235
|
+
*
|
|
1236
|
+
* **Details**
|
|
1237
|
+
*
|
|
1238
|
+
* Prefer {@link encodeEffect} when the input is already typed as the schema's
|
|
1239
|
+
* `Type`.
|
|
1098
1240
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1099
1241
|
* application options override creation options.
|
|
1100
1242
|
*
|
|
@@ -1116,8 +1258,15 @@ export declare function encodeUnknownEffect<S extends Top>(schema: S, options?:
|
|
|
1116
1258
|
/**
|
|
1117
1259
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1118
1260
|
* `Effect` that succeeds with the encoded value or fails with a
|
|
1119
|
-
* {@link SchemaError}.
|
|
1120
|
-
*
|
|
1261
|
+
* {@link SchemaError}.
|
|
1262
|
+
*
|
|
1263
|
+
* **When to use**
|
|
1264
|
+
*
|
|
1265
|
+
* Use when the input is already typed as the schema's `Type`.
|
|
1266
|
+
*
|
|
1267
|
+
* **Details**
|
|
1268
|
+
*
|
|
1269
|
+
* For `unknown` input use {@link encodeUnknownEffect}.
|
|
1121
1270
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1122
1271
|
* application options override creation options.
|
|
1123
1272
|
*
|
|
@@ -1128,9 +1277,17 @@ export declare const encodeEffect: <S extends Top>(schema: S, options?: AST.Pars
|
|
|
1128
1277
|
/**
|
|
1129
1278
|
* Encodes an `unknown` input against a schema synchronously, returning an
|
|
1130
1279
|
* `Exit` that is either a `Success` with the encoded value or a `Failure` with
|
|
1131
|
-
* a {@link SchemaError}.
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1280
|
+
* a {@link SchemaError}.
|
|
1281
|
+
*
|
|
1282
|
+
* **When to use**
|
|
1283
|
+
*
|
|
1284
|
+
* Use when the input type is not statically known and encoding should return an
|
|
1285
|
+
* `Exit` instead of failing or throwing.
|
|
1286
|
+
*
|
|
1287
|
+
* **Details**
|
|
1288
|
+
*
|
|
1289
|
+
* Only usable with schemas that have no `EncodingServices` requirement. Prefer
|
|
1290
|
+
* {@link encodeExit} when the input is already typed as the schema's `Type`.
|
|
1134
1291
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1135
1292
|
* application options override creation options.
|
|
1136
1293
|
*
|
|
@@ -1141,9 +1298,17 @@ export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S,
|
|
|
1141
1298
|
/**
|
|
1142
1299
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1143
1300
|
* returning an `Exit` that is either a `Success` with the encoded value or a
|
|
1144
|
-
* `Failure` with a {@link SchemaError}.
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1301
|
+
* `Failure` with a {@link SchemaError}.
|
|
1302
|
+
*
|
|
1303
|
+
* **When to use**
|
|
1304
|
+
*
|
|
1305
|
+
* Use when typed input should be encoded into an `Exit` instead of failing or
|
|
1306
|
+
* throwing.
|
|
1307
|
+
*
|
|
1308
|
+
* **Details**
|
|
1309
|
+
*
|
|
1310
|
+
* Only usable with schemas that have no `EncodingServices` requirement. For
|
|
1311
|
+
* `unknown` input use {@link encodeUnknownExit}.
|
|
1147
1312
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1148
1313
|
* application options override creation options.
|
|
1149
1314
|
*
|
|
@@ -1153,10 +1318,17 @@ export declare function encodeUnknownExit<S extends Encoder<unknown>>(schema: S,
|
|
|
1153
1318
|
export declare const encodeExit: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Exit_.Exit<S["Encoded"], SchemaError>;
|
|
1154
1319
|
/**
|
|
1155
1320
|
* Encodes an `unknown` input against a schema, returning an `Option` that is
|
|
1156
|
-
* `Some` with the encoded value on success or `None` on failure.
|
|
1157
|
-
*
|
|
1158
|
-
*
|
|
1159
|
-
*
|
|
1321
|
+
* `Some` with the encoded value on success or `None` on failure.
|
|
1322
|
+
*
|
|
1323
|
+
* **When to use**
|
|
1324
|
+
*
|
|
1325
|
+
* Use when the input type is not statically known and you only need to know
|
|
1326
|
+
* whether encoding succeeded.
|
|
1327
|
+
*
|
|
1328
|
+
* **Details**
|
|
1329
|
+
*
|
|
1330
|
+
* Prefer this over {@link encodeUnknownExit} or {@link encodeUnknownEffect}
|
|
1331
|
+
* when you don't need error details. For typed input use {@link encodeOption}.
|
|
1160
1332
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1161
1333
|
* application options override creation options.
|
|
1162
1334
|
*
|
|
@@ -1167,7 +1339,15 @@ export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
|
|
|
1167
1339
|
/**
|
|
1168
1340
|
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
1169
1341
|
* `Option` that is `Some` with the encoded value on success or `None` on
|
|
1170
|
-
* failure.
|
|
1342
|
+
* failure.
|
|
1343
|
+
*
|
|
1344
|
+
* **When to use**
|
|
1345
|
+
*
|
|
1346
|
+
* Use when typed input should be encoded and only success or failure matters.
|
|
1347
|
+
*
|
|
1348
|
+
* **Details**
|
|
1349
|
+
*
|
|
1350
|
+
* For `unknown` input use {@link encodeUnknownOption}.
|
|
1171
1351
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1172
1352
|
* application options override creation options.
|
|
1173
1353
|
*
|
|
@@ -1177,8 +1357,16 @@ export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption;
|
|
|
1177
1357
|
export declare const encodeOption: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Option_.Option<S["Encoded"]>;
|
|
1178
1358
|
/**
|
|
1179
1359
|
* Encodes an `unknown` input against a schema, returning a `Result` that
|
|
1180
|
-
* succeeds with the encoded value or fails with a schema issue.
|
|
1181
|
-
*
|
|
1360
|
+
* succeeds with the encoded value or fails with a schema issue.
|
|
1361
|
+
*
|
|
1362
|
+
* **When to use**
|
|
1363
|
+
*
|
|
1364
|
+
* Use when the input type is not statically known and encoding should return a
|
|
1365
|
+
* `Result` with structured issue data.
|
|
1366
|
+
*
|
|
1367
|
+
* **Details**
|
|
1368
|
+
*
|
|
1369
|
+
* For typed input use {@link encodeResult}.
|
|
1182
1370
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1183
1371
|
* application options override creation options.
|
|
1184
1372
|
*
|
|
@@ -1189,6 +1377,14 @@ export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult;
|
|
|
1189
1377
|
/**
|
|
1190
1378
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1191
1379
|
* `Result` that succeeds with the encoded value or fails with a schema issue.
|
|
1380
|
+
*
|
|
1381
|
+
* **When to use**
|
|
1382
|
+
*
|
|
1383
|
+
* Use when typed input should be encoded into a `Result` with structured issue
|
|
1384
|
+
* data.
|
|
1385
|
+
*
|
|
1386
|
+
* **Details**
|
|
1387
|
+
*
|
|
1192
1388
|
* For `unknown` input use {@link encodeUnknownResult}.
|
|
1193
1389
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1194
1390
|
* application options override creation options.
|
|
@@ -1199,9 +1395,15 @@ export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult;
|
|
|
1199
1395
|
export declare const encodeResult: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Result_.Result<S["Encoded"], Issue.Issue>;
|
|
1200
1396
|
/**
|
|
1201
1397
|
* Encodes an `unknown` input against a schema, returning a `Promise` that
|
|
1202
|
-
* resolves with the encoded value or rejects with a schema issue.
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1398
|
+
* resolves with the encoded value or rejects with a schema issue.
|
|
1399
|
+
*
|
|
1400
|
+
* **When to use**
|
|
1401
|
+
*
|
|
1402
|
+
* Use when integrating unknown input serialization with Promise-based APIs.
|
|
1403
|
+
*
|
|
1404
|
+
* **Details**
|
|
1405
|
+
*
|
|
1406
|
+
* For typed input use {@link encodePromise}.
|
|
1205
1407
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1206
1408
|
* application options override creation options.
|
|
1207
1409
|
*
|
|
@@ -1212,7 +1414,15 @@ export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema:
|
|
|
1212
1414
|
/**
|
|
1213
1415
|
* Encodes a typed input (the schema's `Type`) against a schema, returning a
|
|
1214
1416
|
* `Promise` that resolves with the encoded value or rejects with a
|
|
1215
|
-
* {@link SchemaError}.
|
|
1417
|
+
* {@link SchemaError}.
|
|
1418
|
+
*
|
|
1419
|
+
* **When to use**
|
|
1420
|
+
*
|
|
1421
|
+
* Use when integrating typed input serialization with Promise-based APIs.
|
|
1422
|
+
*
|
|
1423
|
+
* **Details**
|
|
1424
|
+
*
|
|
1425
|
+
* For `unknown` input use {@link encodeUnknownPromise}.
|
|
1216
1426
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1217
1427
|
* application options override creation options.
|
|
1218
1428
|
*
|
|
@@ -1222,9 +1432,16 @@ export declare const encodeUnknownPromise: <S extends Encoder<unknown>>(schema:
|
|
|
1222
1432
|
export declare const encodePromise: <S extends Encoder<unknown>>(schema: S, options?: AST.ParseOptions) => (input: S["Type"], options?: AST.ParseOptions) => Promise<S["Encoded"]>;
|
|
1223
1433
|
/**
|
|
1224
1434
|
* Encodes an `unknown` input against a schema synchronously, throwing a
|
|
1225
|
-
* {@link SchemaError} on failure.
|
|
1226
|
-
*
|
|
1227
|
-
*
|
|
1435
|
+
* {@link SchemaError} on failure.
|
|
1436
|
+
*
|
|
1437
|
+
* **When to use**
|
|
1438
|
+
*
|
|
1439
|
+
* Use when serializing unknown data at a boundary and treating schema
|
|
1440
|
+
* mismatches as unrecoverable errors.
|
|
1441
|
+
*
|
|
1442
|
+
* **Details**
|
|
1443
|
+
*
|
|
1444
|
+
* For non-throwing alternatives see {@link encodeUnknownOption},
|
|
1228
1445
|
* {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For typed input
|
|
1229
1446
|
* use {@link encodeSync}.
|
|
1230
1447
|
* Options may be provided either when creating the encoder or when applying it;
|
|
@@ -1236,8 +1453,16 @@ export declare const encodePromise: <S extends Encoder<unknown>>(schema: S, opti
|
|
|
1236
1453
|
export declare const encodeUnknownSync: typeof Parser.encodeUnknownSync;
|
|
1237
1454
|
/**
|
|
1238
1455
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
1239
|
-
* throwing a {@link SchemaError} on failure.
|
|
1240
|
-
*
|
|
1456
|
+
* throwing a {@link SchemaError} on failure.
|
|
1457
|
+
*
|
|
1458
|
+
* **When to use**
|
|
1459
|
+
*
|
|
1460
|
+
* Use when typed input should be encoded synchronously and schema mismatches
|
|
1461
|
+
* should throw.
|
|
1462
|
+
*
|
|
1463
|
+
* **Details**
|
|
1464
|
+
*
|
|
1465
|
+
* For `unknown` input use {@link encodeUnknownSync}.
|
|
1241
1466
|
* Options may be provided either when creating the encoder or when applying it;
|
|
1242
1467
|
* application options override creation options.
|
|
1243
1468
|
*
|
|
@@ -1288,7 +1513,7 @@ export declare function asClass<S extends Top>(schema: S): S & {
|
|
|
1288
1513
|
new (_: never): {};
|
|
1289
1514
|
};
|
|
1290
1515
|
/**
|
|
1291
|
-
*
|
|
1516
|
+
* Checks whether a value is a `Schema`.
|
|
1292
1517
|
*
|
|
1293
1518
|
* @category guards
|
|
1294
1519
|
* @since 3.10.0
|
|
@@ -1337,8 +1562,12 @@ interface requiredKeyLambda extends Lambda {
|
|
|
1337
1562
|
readonly "~lambda.out": this["~lambda.in"] extends optionalKey<Top> ? this["~lambda.in"]["schema"] : "Error: schema not eligible for requiredKey";
|
|
1338
1563
|
}
|
|
1339
1564
|
/**
|
|
1340
|
-
* Reverses
|
|
1341
|
-
*
|
|
1565
|
+
* Reverses `optionalKey` and returns the inner required schema.
|
|
1566
|
+
*
|
|
1567
|
+
* **When to use**
|
|
1568
|
+
*
|
|
1569
|
+
* Use to remove optional-key wrapping from a schema field that was previously
|
|
1570
|
+
* wrapped with {@link optionalKey}.
|
|
1342
1571
|
*
|
|
1343
1572
|
* @category combinators
|
|
1344
1573
|
* @since 4.0.0
|
|
@@ -1393,8 +1622,16 @@ interface requiredLambda extends Lambda {
|
|
|
1393
1622
|
readonly "~lambda.out": this["~lambda.in"] extends optional<Top> ? this["~lambda.in"]["schema"]["members"][0] : "Error: schema not eligible for required";
|
|
1394
1623
|
}
|
|
1395
1624
|
/**
|
|
1396
|
-
* Reverses
|
|
1397
|
-
*
|
|
1625
|
+
* Reverses `optional` and returns the inner schema.
|
|
1626
|
+
*
|
|
1627
|
+
* **When to use**
|
|
1628
|
+
*
|
|
1629
|
+
* Use to remove optional wrapping from a schema field that was previously
|
|
1630
|
+
* wrapped with {@link optional}.
|
|
1631
|
+
*
|
|
1632
|
+
* **Details**
|
|
1633
|
+
*
|
|
1634
|
+
* This also unwraps the `UndefinedOr` member added by `optional`.
|
|
1398
1635
|
*
|
|
1399
1636
|
* @category combinators
|
|
1400
1637
|
* @since 3.10.0
|
|
@@ -1427,8 +1664,12 @@ interface readonlyKeyLambda extends Lambda {
|
|
|
1427
1664
|
readonly "~lambda.out": this["~lambda.in"] extends mutableKey<Top> ? this["~lambda.in"]["schema"] : "Error: schema not eligible for readonlyKey";
|
|
1428
1665
|
}
|
|
1429
1666
|
/**
|
|
1430
|
-
* Reverses
|
|
1431
|
-
*
|
|
1667
|
+
* Reverses `mutableKey` and returns the inner readonly schema.
|
|
1668
|
+
*
|
|
1669
|
+
* **When to use**
|
|
1670
|
+
*
|
|
1671
|
+
* Use to remove mutable-key wrapping from a schema field that was previously
|
|
1672
|
+
* wrapped with {@link mutableKey}.
|
|
1432
1673
|
*
|
|
1433
1674
|
* @category combinators
|
|
1434
1675
|
* @since 4.0.0
|
|
@@ -1489,8 +1730,15 @@ export interface flip<S extends Top> extends Bottom<S["Encoded"], S["Type"], S["
|
|
|
1489
1730
|
readonly schema: S;
|
|
1490
1731
|
}
|
|
1491
1732
|
/**
|
|
1492
|
-
* Swaps the
|
|
1493
|
-
*
|
|
1733
|
+
* Swaps the decoded and encoded sides of a schema.
|
|
1734
|
+
*
|
|
1735
|
+
* **When to use**
|
|
1736
|
+
*
|
|
1737
|
+
* Use to invert a schema transformation direction.
|
|
1738
|
+
*
|
|
1739
|
+
* **Details**
|
|
1740
|
+
*
|
|
1741
|
+
* Calling `flip` twice returns the original schema.
|
|
1494
1742
|
*
|
|
1495
1743
|
* **Example** (Flip a number-from-string schema)
|
|
1496
1744
|
*
|
|
@@ -1651,8 +1899,17 @@ export interface TemplateLiteralParser<Parts extends TemplateLiteral.Parts> exte
|
|
|
1651
1899
|
readonly parts: Parts;
|
|
1652
1900
|
}
|
|
1653
1901
|
/**
|
|
1654
|
-
*
|
|
1655
|
-
*
|
|
1902
|
+
* Schema for parsing template literal matches into typed tuple parts.
|
|
1903
|
+
*
|
|
1904
|
+
* **When to use**
|
|
1905
|
+
*
|
|
1906
|
+
* Use to validate a template literal string and decode the matched parts into
|
|
1907
|
+
* typed values.
|
|
1908
|
+
*
|
|
1909
|
+
* **Details**
|
|
1910
|
+
*
|
|
1911
|
+
* Unlike {@link TemplateLiteral}, this schema decodes the matched string into a
|
|
1912
|
+
* readonly tuple with one element per schema part.
|
|
1656
1913
|
*
|
|
1657
1914
|
* **Example** (Parse path parameters)
|
|
1658
1915
|
*
|
|
@@ -1840,6 +2097,12 @@ export interface Boolean extends Bottom<boolean, boolean, never, never, AST.Bool
|
|
|
1840
2097
|
/**
|
|
1841
2098
|
* Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
|
|
1842
2099
|
*
|
|
2100
|
+
* **When to use**
|
|
2101
|
+
*
|
|
2102
|
+
* Use to validate values that are already JavaScript booleans.
|
|
2103
|
+
*
|
|
2104
|
+
* @see {@link BooleanFromBit} for a schema that decodes bit literals `0` or `1` into a boolean
|
|
2105
|
+
*
|
|
1843
2106
|
* @category Boolean
|
|
1844
2107
|
* @since 4.0.0
|
|
1845
2108
|
*/
|
|
@@ -1873,6 +2136,13 @@ export interface BigInt extends Bottom<bigint, bigint, never, never, AST.BigInt,
|
|
|
1873
2136
|
/**
|
|
1874
2137
|
* Schema for `bigint` values. Validates that the input is `typeof` `"bigint"`.
|
|
1875
2138
|
*
|
|
2139
|
+
* **When to use**
|
|
2140
|
+
*
|
|
2141
|
+
* Use when the input is already a bigint and the schema should validate and
|
|
2142
|
+
* preserve bigint values without parsing from another representation.
|
|
2143
|
+
*
|
|
2144
|
+
* @see {@link BigIntFromString} for parsing string input into a bigint
|
|
2145
|
+
*
|
|
1876
2146
|
* @category schemas
|
|
1877
2147
|
* @since 4.0.0
|
|
1878
2148
|
*/
|
|
@@ -2185,8 +2455,16 @@ interface fieldsAssign<NewFields extends Struct.Fields> extends Lambda {
|
|
|
2185
2455
|
readonly "~lambda.out": this["~lambda.in"] extends Struct<Struct.Fields> ? Struct<Struct_.Simplify<Struct_.Assign<this["~lambda.in"]["fields"], NewFields>>> : "Error: schema not eligible for fieldsAssign";
|
|
2186
2456
|
}
|
|
2187
2457
|
/**
|
|
2188
|
-
*
|
|
2189
|
-
*
|
|
2458
|
+
* Adds fields to a struct schema through a struct-mapping lambda.
|
|
2459
|
+
*
|
|
2460
|
+
* **When to use**
|
|
2461
|
+
*
|
|
2462
|
+
* Use to add the same fields to an existing struct or to every struct member of
|
|
2463
|
+
* a union.
|
|
2464
|
+
*
|
|
2465
|
+
* **Details**
|
|
2466
|
+
*
|
|
2467
|
+
* This is a shortcut for `MyStruct.mapFields(Struct.assign(fields))`.
|
|
2190
2468
|
*
|
|
2191
2469
|
* **Example** (Adding fields to a union of structs)
|
|
2192
2470
|
*
|
|
@@ -2440,6 +2718,14 @@ export declare namespace Record {
|
|
|
2440
2718
|
* Companion type for a key-value record (map) with a typed key and value schema.
|
|
2441
2719
|
* Produced by {@link Record}.
|
|
2442
2720
|
*
|
|
2721
|
+
* **When to use**
|
|
2722
|
+
*
|
|
2723
|
+
* Use as the concrete schema type returned by `Record` when an API needs to
|
|
2724
|
+
* accept or return a record schema with typed property keys and values.
|
|
2725
|
+
*
|
|
2726
|
+
* @see {@link Record} for constructing record schemas
|
|
2727
|
+
* @see {@link StructWithRest} for combining fixed struct fields with record index signatures
|
|
2728
|
+
*
|
|
2443
2729
|
* @category models
|
|
2444
2730
|
* @since 4.0.0
|
|
2445
2731
|
*/
|
|
@@ -2570,6 +2856,14 @@ export declare namespace StructWithRest {
|
|
|
2570
2856
|
* Companion type for a struct combined with one or more record schemas. Produced
|
|
2571
2857
|
* by {@link StructWithRest}.
|
|
2572
2858
|
*
|
|
2859
|
+
* **When to use**
|
|
2860
|
+
*
|
|
2861
|
+
* Use as the schema type when generic code needs to retain the base struct
|
|
2862
|
+
* schema and all rest record schemas.
|
|
2863
|
+
*
|
|
2864
|
+
* @see {@link StructWithRest} for constructing this schema type
|
|
2865
|
+
* @see {@link Record} for constructing record schemas used as rest index signatures
|
|
2866
|
+
*
|
|
2573
2867
|
* @category models
|
|
2574
2868
|
* @since 4.0.0
|
|
2575
2869
|
*/
|
|
@@ -2911,17 +3205,22 @@ export declare function TupleWithRest<S extends Tuple<Tuple.Elements>, const Res
|
|
|
2911
3205
|
/**
|
|
2912
3206
|
* Schema interface produced by `Schema.Array` for readonly arrays.
|
|
2913
3207
|
*
|
|
3208
|
+
* **When to use**
|
|
3209
|
+
*
|
|
3210
|
+
* Use as the public companion type returned by `Schema.Array` when you need to
|
|
3211
|
+
* refer to a readonly array schema built from an element schema.
|
|
3212
|
+
*
|
|
2914
3213
|
* **Details**
|
|
2915
3214
|
*
|
|
2916
3215
|
* The decoded type is `ReadonlyArray<S["Type"]>`, the encoded type is
|
|
2917
3216
|
* `ReadonlyArray<S["Encoded"]>`, and the element schema is available as
|
|
2918
|
-
* `
|
|
3217
|
+
* `value`.
|
|
2919
3218
|
*
|
|
2920
3219
|
* @category models
|
|
2921
3220
|
* @since 4.0.0
|
|
2922
3221
|
*/
|
|
2923
3222
|
export interface $Array<S extends Top> extends Bottom<ReadonlyArray<S["Type"]>, ReadonlyArray<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"], AST.Arrays, $Array<S>, ReadonlyArray<S["~type.make"]>, ReadonlyArray<S["Iso"]>> {
|
|
2924
|
-
readonly
|
|
3223
|
+
readonly value: S;
|
|
2925
3224
|
}
|
|
2926
3225
|
interface ArrayLambda extends Lambda {
|
|
2927
3226
|
<S extends Top>(self: S): $Array<S>;
|
|
@@ -2955,11 +3254,17 @@ ArraySchema as Array };
|
|
|
2955
3254
|
/**
|
|
2956
3255
|
* Companion type for a non-empty `ReadonlyArray`. Produced by {@link NonEmptyArray}.
|
|
2957
3256
|
*
|
|
3257
|
+
* **Details**
|
|
3258
|
+
*
|
|
3259
|
+
* The decoded type is `readonly [S["Type"], ...Array<S["Type"]>]`, the encoded type is
|
|
3260
|
+
* `readonly [S["Encoded"], ...Array<S["Encoded"]>]`, and the element schema is available as
|
|
3261
|
+
* `value`.
|
|
3262
|
+
*
|
|
2958
3263
|
* @category models
|
|
2959
3264
|
* @since 3.10.0
|
|
2960
3265
|
*/
|
|
2961
3266
|
export interface NonEmptyArray<S extends Top> extends Bottom<readonly [S["Type"], ...Array<S["Type"]>], readonly [S["Encoded"], ...Array<S["Encoded"]>], S["DecodingServices"], S["EncodingServices"], AST.Arrays, NonEmptyArray<S>, readonly [S["~type.make"], ...Array<S["~type.make"]>], readonly [S["Iso"], ...Array<S["Iso"]>]> {
|
|
2962
|
-
readonly
|
|
3267
|
+
readonly value: S;
|
|
2963
3268
|
}
|
|
2964
3269
|
interface NonEmptyArrayLambda extends Lambda {
|
|
2965
3270
|
<S extends Top>(self: S): NonEmptyArray<S>;
|
|
@@ -2988,12 +3293,19 @@ export declare const NonEmptyArray: NonEmptyArrayLambda;
|
|
|
2988
3293
|
* Schema interface returned by `ArrayEnsure`, which normalizes a single item or
|
|
2989
3294
|
* an array of items into a readonly array.
|
|
2990
3295
|
*
|
|
3296
|
+
* **When to use**
|
|
3297
|
+
*
|
|
3298
|
+
* Use as the schema type when generic code needs to retain the original item
|
|
3299
|
+
* schema.
|
|
3300
|
+
*
|
|
2991
3301
|
* **Details**
|
|
2992
3302
|
*
|
|
2993
3303
|
* The schema decodes from `S` or `Schema.Array(S)` and produces
|
|
2994
3304
|
* `ReadonlyArray<S["Type"]>`.
|
|
2995
3305
|
*
|
|
2996
|
-
* @
|
|
3306
|
+
* @see {@link ArrayEnsure} for constructing this schema type
|
|
3307
|
+
*
|
|
3308
|
+
* @category constructors
|
|
2997
3309
|
* @since 3.10.0
|
|
2998
3310
|
*/
|
|
2999
3311
|
export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>, Union<readonly [S, $Array<S>]>> {
|
|
@@ -3003,16 +3315,26 @@ export interface ArrayEnsure<S extends Top> extends decodeTo<$Array<toType<S>>,
|
|
|
3003
3315
|
* Creates a schema that accepts either a value decoded by `schema` or an array
|
|
3004
3316
|
* decoded by `Schema.Array(schema)`, then returns an array.
|
|
3005
3317
|
*
|
|
3318
|
+
* **When to use**
|
|
3319
|
+
*
|
|
3320
|
+
* Use to accept input that may be provided either as one item or as an array,
|
|
3321
|
+
* while normalizing decoded values to a readonly array.
|
|
3322
|
+
*
|
|
3006
3323
|
* **Details**
|
|
3007
3324
|
*
|
|
3325
|
+
* During encoding, one-element arrays are encoded as the single element. Empty
|
|
3326
|
+
* arrays and arrays with two or more elements are encoded as arrays.
|
|
3327
|
+
*
|
|
3328
|
+
* **Gotchas**
|
|
3329
|
+
*
|
|
3008
3330
|
* The single-value branch is tried before the array branch. If `schema` itself
|
|
3009
3331
|
* accepts arrays, an array input can be treated as one value and wrapped in a
|
|
3010
3332
|
* one-element array.
|
|
3011
3333
|
*
|
|
3012
|
-
*
|
|
3013
|
-
*
|
|
3334
|
+
* @see {@link Array} for accepting only array input
|
|
3335
|
+
* @see {@link NonEmptyArray} for requiring at least one decoded element
|
|
3014
3336
|
*
|
|
3015
|
-
* @category
|
|
3337
|
+
* @category constructors
|
|
3016
3338
|
* @since 3.10.0
|
|
3017
3339
|
*/
|
|
3018
3340
|
export declare function ArrayEnsure<S extends Top>(schema: S): ArrayEnsure<S>;
|
|
@@ -3278,8 +3600,8 @@ export interface suspend<S extends Top> extends Bottom<S["Type"], S["Encoded"],
|
|
|
3278
3600
|
*/
|
|
3279
3601
|
export declare function suspend<S extends Top>(f: () => S): suspend<S>;
|
|
3280
3602
|
/**
|
|
3281
|
-
*
|
|
3282
|
-
*
|
|
3603
|
+
* Attaches one or more filter checks to a schema without changing the
|
|
3604
|
+
* TypeScript type.
|
|
3283
3605
|
*
|
|
3284
3606
|
* **Example** (Adding checks to a schema)
|
|
3285
3607
|
*
|
|
@@ -3326,6 +3648,13 @@ type DistributeBrands<B> = UnionToIntersection<B extends infer U extends string
|
|
|
3326
3648
|
* The output type of {@link brand}, intersecting the schema's `Type` with one or
|
|
3327
3649
|
* more {@link Brand.Brand} tags.
|
|
3328
3650
|
*
|
|
3651
|
+
* **When to use**
|
|
3652
|
+
*
|
|
3653
|
+
* Use as the schema type when generic code needs to retain the wrapped schema
|
|
3654
|
+
* and nominal brand type.
|
|
3655
|
+
*
|
|
3656
|
+
* @see {@link brand} for adding the brand tag to an existing schema
|
|
3657
|
+
*
|
|
3329
3658
|
* @category branding
|
|
3330
3659
|
* @since 3.10.0
|
|
3331
3660
|
*/
|
|
@@ -3337,6 +3666,18 @@ export interface brand<S extends Top, B> extends Bottom<S["Type"] & DistributeBr
|
|
|
3337
3666
|
* Adds a nominal brand to a schema, intersecting the output type with
|
|
3338
3667
|
* `Brand.Brand<B>` to prevent accidental mixing of structurally identical types.
|
|
3339
3668
|
*
|
|
3669
|
+
* **When to use**
|
|
3670
|
+
*
|
|
3671
|
+
* Use to make values decoded by an existing schema nominally distinct when the
|
|
3672
|
+
* schema already carries the runtime validation you need.
|
|
3673
|
+
*
|
|
3674
|
+
* **Gotchas**
|
|
3675
|
+
*
|
|
3676
|
+
* `brand` adds brand metadata and narrows the TypeScript output type, but it
|
|
3677
|
+
* does not add runtime checks.
|
|
3678
|
+
*
|
|
3679
|
+
* @see {@link fromBrand} for applying a Brand constructor's checks along with the brand tag
|
|
3680
|
+
*
|
|
3340
3681
|
* @category branding
|
|
3341
3682
|
* @since 3.10.0
|
|
3342
3683
|
*/
|
|
@@ -3457,7 +3798,20 @@ export declare function middlewareEncoding<S extends Top, RE>(encode: (effect: E
|
|
|
3457
3798
|
*/
|
|
3458
3799
|
export declare function catchDecoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, Issue.Issue>): (self: S) => S["Rebuild"];
|
|
3459
3800
|
/**
|
|
3460
|
-
*
|
|
3801
|
+
* Recovers from a decoding error with a handler that may require Effect services.
|
|
3802
|
+
*
|
|
3803
|
+
* **When to use**
|
|
3804
|
+
*
|
|
3805
|
+
* Use when decoding fallback logic needs services from the Effect context.
|
|
3806
|
+
*
|
|
3807
|
+
* **Details**
|
|
3808
|
+
*
|
|
3809
|
+
* The handler receives the `Issue` and returns an `Effect` that either succeeds
|
|
3810
|
+
* with a fallback value or re-fails with a (possibly different) issue. The
|
|
3811
|
+
* handler's services are added to the schema's decoding services.
|
|
3812
|
+
*
|
|
3813
|
+
* @see {@link catchDecoding} for recovery handlers that do not require services
|
|
3814
|
+
* @see {@link middlewareDecoding} for intercepting or replacing the full decoding pipeline
|
|
3461
3815
|
*
|
|
3462
3816
|
* @category error handling
|
|
3463
3817
|
* @since 4.0.0
|
|
@@ -3477,7 +3831,20 @@ export declare function catchDecodingWithContext<S extends Top, R = never>(f: (i
|
|
|
3477
3831
|
*/
|
|
3478
3832
|
export declare function catchEncoding<S extends Top>(f: (issue: Issue.Issue) => Effect.Effect<Option_.Option<S["Encoded"]>, Issue.Issue>): (self: S) => S["Rebuild"];
|
|
3479
3833
|
/**
|
|
3480
|
-
*
|
|
3834
|
+
* Recovers from an encoding error with a handler that may require Effect services.
|
|
3835
|
+
*
|
|
3836
|
+
* **When to use**
|
|
3837
|
+
*
|
|
3838
|
+
* Use when encoding fallback logic needs services from the Effect context.
|
|
3839
|
+
*
|
|
3840
|
+
* **Details**
|
|
3841
|
+
*
|
|
3842
|
+
* The handler receives the `Issue` and returns an `Effect` that either succeeds
|
|
3843
|
+
* with a fallback encoded value or re-fails with a (possibly different) issue.
|
|
3844
|
+
* The handler's services are added to the schema's encoding services.
|
|
3845
|
+
*
|
|
3846
|
+
* @see {@link catchEncoding} for recovery handlers that do not require services
|
|
3847
|
+
* @see {@link middlewareEncoding} for intercepting or replacing the full encoding pipeline
|
|
3481
3848
|
*
|
|
3482
3849
|
* @category error handling
|
|
3483
3850
|
* @since 4.0.0
|
|
@@ -3610,13 +3977,17 @@ export declare function decode<S extends Top, RD = never, RE = never>(transforma
|
|
|
3610
3977
|
readonly encode: Getter.Getter<S["Type"], S["Type"], RE>;
|
|
3611
3978
|
}): (self: S) => decodeTo<toType<S>, S, RD, RE>;
|
|
3612
3979
|
/**
|
|
3613
|
-
*
|
|
3614
|
-
*
|
|
3980
|
+
* Reverses a schema transformation so the encoded schema is supplied first.
|
|
3981
|
+
*
|
|
3982
|
+
* **When to use**
|
|
3983
|
+
*
|
|
3984
|
+
* Use to define a transformation by naming the encoded schema before the
|
|
3985
|
+
* decoded schema.
|
|
3615
3986
|
*
|
|
3616
3987
|
* **Details**
|
|
3617
3988
|
*
|
|
3618
|
-
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))
|
|
3619
|
-
*
|
|
3989
|
+
* `encodeTo(to)(from)` is equivalent to `to.pipe(decodeTo(from))`. The `from`
|
|
3990
|
+
* schema acts as the target decoded schema and `to` acts as the encoded source.
|
|
3620
3991
|
*
|
|
3621
3992
|
* **Example** (Encode a number back to string)
|
|
3622
3993
|
*
|
|
@@ -3941,9 +4312,17 @@ export interface tag<Tag extends AST.LiteralValue> extends withConstructorDefaul
|
|
|
3941
4312
|
*/
|
|
3942
4313
|
export declare function tag<Tag extends AST.LiteralValue>(literal: Tag): tag<Tag>;
|
|
3943
4314
|
/**
|
|
3944
|
-
*
|
|
3945
|
-
*
|
|
3946
|
-
*
|
|
4315
|
+
* Creates a literal `_tag` schema that is omitted from encoded output.
|
|
4316
|
+
*
|
|
4317
|
+
* **When to use**
|
|
4318
|
+
*
|
|
4319
|
+
* Use to decode data that omits the discriminator field while still constructing
|
|
4320
|
+
* values with a `_tag` for tagged union matching.
|
|
4321
|
+
*
|
|
4322
|
+
* **Details**
|
|
4323
|
+
*
|
|
4324
|
+
* The tag is filled during decoding and construction, like {@link tag}, but is
|
|
4325
|
+
* omitted when encoding.
|
|
3947
4326
|
*
|
|
3948
4327
|
* **Example** (Tag omitted during encoding)
|
|
3949
4328
|
*
|
|
@@ -3976,9 +4355,11 @@ export type TaggedStruct<Tag extends AST.LiteralValue, Fields extends Struct.Fie
|
|
|
3976
4355
|
readonly _tag: tag<Tag>;
|
|
3977
4356
|
} & Fields>>;
|
|
3978
4357
|
/**
|
|
3979
|
-
*
|
|
3980
|
-
*
|
|
3981
|
-
*
|
|
4358
|
+
* Creates a struct schema with an automatically populated `_tag` field.
|
|
4359
|
+
*
|
|
4360
|
+
* **When to use**
|
|
4361
|
+
*
|
|
4362
|
+
* Use to define a tagged union case from a literal tag and a set of fields.
|
|
3982
4363
|
*
|
|
3983
4364
|
* **Details**
|
|
3984
4365
|
*
|
|
@@ -4625,8 +5006,8 @@ export declare function isUncapitalized(annotations?: Annotations.Filter): AST.F
|
|
|
4625
5006
|
*/
|
|
4626
5007
|
export declare function isFinite(annotations?: Annotations.Filter): AST.Filter<number>;
|
|
4627
5008
|
/**
|
|
4628
|
-
*
|
|
4629
|
-
*
|
|
5009
|
+
* Creates a greater-than (`>`) check for any ordered type from an
|
|
5010
|
+
* `Order.Order` instance.
|
|
4630
5011
|
*
|
|
4631
5012
|
* @category Order checks
|
|
4632
5013
|
* @since 4.0.0
|
|
@@ -4637,8 +5018,8 @@ export declare function makeIsGreaterThan<T>(options: {
|
|
|
4637
5018
|
readonly formatter?: Formatter<T> | undefined;
|
|
4638
5019
|
}): (exclusiveMinimum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4639
5020
|
/**
|
|
4640
|
-
*
|
|
4641
|
-
*
|
|
5021
|
+
* Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
|
|
5022
|
+
* `Order.Order` instance.
|
|
4642
5023
|
*
|
|
4643
5024
|
* @category Order checks
|
|
4644
5025
|
* @since 4.0.0
|
|
@@ -4649,8 +5030,8 @@ export declare function makeIsGreaterThanOrEqualTo<T>(options: {
|
|
|
4649
5030
|
readonly formatter?: Formatter<T> | undefined;
|
|
4650
5031
|
}): (minimum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4651
5032
|
/**
|
|
4652
|
-
*
|
|
4653
|
-
*
|
|
5033
|
+
* Creates a less-than (`<`) check for any ordered type from an `Order.Order`
|
|
5034
|
+
* instance.
|
|
4654
5035
|
*
|
|
4655
5036
|
* @category Order checks
|
|
4656
5037
|
* @since 4.0.0
|
|
@@ -4661,8 +5042,8 @@ export declare function makeIsLessThan<T>(options: {
|
|
|
4661
5042
|
readonly formatter?: Formatter<T> | undefined;
|
|
4662
5043
|
}): (exclusiveMaximum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4663
5044
|
/**
|
|
4664
|
-
*
|
|
4665
|
-
*
|
|
5045
|
+
* Creates a less-than-or-equal-to (`<=`) check for any ordered type from an
|
|
5046
|
+
* `Order.Order` instance.
|
|
4666
5047
|
*
|
|
4667
5048
|
* @category Order checks
|
|
4668
5049
|
* @since 4.0.0
|
|
@@ -4673,8 +5054,8 @@ export declare function makeIsLessThanOrEqualTo<T>(options: {
|
|
|
4673
5054
|
readonly formatter?: Formatter<T> | undefined;
|
|
4674
5055
|
}): (maximum: T, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4675
5056
|
/**
|
|
4676
|
-
*
|
|
4677
|
-
*
|
|
5057
|
+
* Creates an inclusive or exclusive range check for any ordered type from an
|
|
5058
|
+
* `Order.Order` instance.
|
|
4678
5059
|
*
|
|
4679
5060
|
* @category Order checks
|
|
4680
5061
|
* @since 4.0.0
|
|
@@ -4695,8 +5076,8 @@ export declare function makeIsBetween<T>(deriveOptions: {
|
|
|
4695
5076
|
readonly exclusiveMaximum?: boolean | undefined;
|
|
4696
5077
|
}, annotations?: Annotations.Filter) => AST.Filter<T>;
|
|
4697
5078
|
/**
|
|
4698
|
-
*
|
|
4699
|
-
*
|
|
5079
|
+
* Creates a divisibility check for any numeric type from a remainder function
|
|
5080
|
+
* and a zero value.
|
|
4700
5081
|
*
|
|
4701
5082
|
* @category Numeric checks
|
|
4702
5083
|
* @since 4.0.0
|
|
@@ -4913,9 +5294,9 @@ export declare function isDateValid(annotations?: Annotations.Filter): AST.Filte
|
|
|
4913
5294
|
*
|
|
4914
5295
|
* Arbitrary:
|
|
4915
5296
|
*
|
|
4916
|
-
* When generating test data with fast-check, this applies a `min` constraint
|
|
4917
|
-
*
|
|
4918
|
-
*
|
|
5297
|
+
* When generating test data with fast-check, this applies a `min` constraint of
|
|
5298
|
+
* one millisecond after the specified value to ensure generated Date objects are
|
|
5299
|
+
* greater than it.
|
|
4919
5300
|
*
|
|
4920
5301
|
* @category Date checks
|
|
4921
5302
|
* @since 4.0.0
|
|
@@ -4949,9 +5330,9 @@ export declare const isGreaterThanOrEqualToDate: (minimum: globalThis.Date, anno
|
|
|
4949
5330
|
*
|
|
4950
5331
|
* Arbitrary:
|
|
4951
5332
|
*
|
|
4952
|
-
* When generating test data with fast-check, this applies a `max` constraint
|
|
4953
|
-
*
|
|
4954
|
-
*
|
|
5333
|
+
* When generating test data with fast-check, this applies a `max` constraint of
|
|
5334
|
+
* one millisecond before the specified value to ensure generated Date objects
|
|
5335
|
+
* are less than it.
|
|
4955
5336
|
*
|
|
4956
5337
|
* @category Date checks
|
|
4957
5338
|
* @since 4.0.0
|
|
@@ -4992,7 +5373,8 @@ export declare const isLessThanOrEqualToDate: (maximum: globalThis.Date, annotat
|
|
|
4992
5373
|
* Arbitrary:
|
|
4993
5374
|
*
|
|
4994
5375
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
4995
|
-
* constraints to ensure generated Date objects fall within the specified range
|
|
5376
|
+
* constraints to ensure generated Date objects fall within the specified range,
|
|
5377
|
+
* shifting exclusive bounds by one millisecond.
|
|
4996
5378
|
*
|
|
4997
5379
|
* @category Date checks
|
|
4998
5380
|
* @since 4.0.0
|
|
@@ -5010,8 +5392,8 @@ export declare const isBetweenDate: (options: {
|
|
|
5010
5392
|
*
|
|
5011
5393
|
* Arbitrary:
|
|
5012
5394
|
*
|
|
5013
|
-
* When generating test data with fast-check, this applies a `min` constraint
|
|
5014
|
-
*
|
|
5395
|
+
* When generating test data with fast-check, this applies a `min` constraint of
|
|
5396
|
+
* `exclusiveMinimum + 1n` to ensure generated BigInts are greater than the
|
|
5015
5397
|
* specified value.
|
|
5016
5398
|
*
|
|
5017
5399
|
* @category BigInt checks
|
|
@@ -5041,8 +5423,8 @@ export declare const isGreaterThanOrEqualToBigInt: (minimum: bigint, annotations
|
|
|
5041
5423
|
*
|
|
5042
5424
|
* Arbitrary:
|
|
5043
5425
|
*
|
|
5044
|
-
* When generating test data with fast-check, this applies a `max` constraint
|
|
5045
|
-
*
|
|
5426
|
+
* When generating test data with fast-check, this applies a `max` constraint of
|
|
5427
|
+
* `exclusiveMaximum - 1n` to ensure generated BigInts are less than the
|
|
5046
5428
|
* specified value.
|
|
5047
5429
|
*
|
|
5048
5430
|
* @category BigInt checks
|
|
@@ -5410,7 +5792,7 @@ export interface NonEmptyString extends String {
|
|
|
5410
5792
|
readonly "Rebuild": NonEmptyString;
|
|
5411
5793
|
}
|
|
5412
5794
|
/**
|
|
5413
|
-
*
|
|
5795
|
+
* Schema for non-empty strings. Validates that a string has at least one
|
|
5414
5796
|
* character.
|
|
5415
5797
|
*
|
|
5416
5798
|
* @category String
|
|
@@ -5428,7 +5810,20 @@ export interface Char extends String {
|
|
|
5428
5810
|
readonly "Rebuild": Char;
|
|
5429
5811
|
}
|
|
5430
5812
|
/**
|
|
5431
|
-
*
|
|
5813
|
+
* Schema for strings whose JavaScript `length` is exactly `1`.
|
|
5814
|
+
*
|
|
5815
|
+
* **When to use**
|
|
5816
|
+
*
|
|
5817
|
+
* Use to validate string values that must have `length === 1`.
|
|
5818
|
+
*
|
|
5819
|
+
* **Gotchas**
|
|
5820
|
+
*
|
|
5821
|
+
* This schema uses JavaScript `String.length`, so visible characters made from
|
|
5822
|
+
* multiple UTF-16 code units do not satisfy `length === 1`.
|
|
5823
|
+
*
|
|
5824
|
+
* @see {@link String} for unconstrained string values
|
|
5825
|
+
* @see {@link NonEmptyString} for strings with length greater than zero
|
|
5826
|
+
* @see {@link isLengthBetween} for the underlying length check
|
|
5432
5827
|
*
|
|
5433
5828
|
* @category String
|
|
5434
5829
|
* @since 3.10.0
|
|
@@ -5476,7 +5871,7 @@ export type OptionIso<A extends Top> = {
|
|
|
5476
5871
|
readonly value: A["Iso"];
|
|
5477
5872
|
};
|
|
5478
5873
|
/**
|
|
5479
|
-
*
|
|
5874
|
+
* Schema for `Option<A>` values.
|
|
5480
5875
|
*
|
|
5481
5876
|
* @category Option
|
|
5482
5877
|
* @since 3.10.0
|
|
@@ -5659,7 +6054,7 @@ export declare function OptionFromOptionalNullOr<S extends Top>(schema: S, optio
|
|
|
5659
6054
|
* Schema for the `Result<A, E>` type, representing a computation that either
|
|
5660
6055
|
* succeeds with `A` or fails with `E`.
|
|
5661
6056
|
*
|
|
5662
|
-
* @category
|
|
6057
|
+
* @category schemas
|
|
5663
6058
|
* @since 4.0.0
|
|
5664
6059
|
*/
|
|
5665
6060
|
export interface Result<A extends Top, E extends Top> extends declareConstructor<Result_.Result<A["Type"], E["Type"]>, Result_.Result<A["Encoded"], E["Encoded"]>, readonly [A, E], ResultIso<A, E>> {
|
|
@@ -5675,7 +6070,7 @@ export interface Result<A extends Top, E extends Top> extends declareConstructor
|
|
|
5675
6070
|
* Successful results are represented as `{ _tag: "Success", success }`, while
|
|
5676
6071
|
* failed results are represented as `{ _tag: "Failure", failure }`.
|
|
5677
6072
|
*
|
|
5678
|
-
* @category
|
|
6073
|
+
* @category schemas
|
|
5679
6074
|
* @since 4.0.0
|
|
5680
6075
|
*/
|
|
5681
6076
|
export type ResultIso<A extends Top, E extends Top> = {
|
|
@@ -5686,9 +6081,9 @@ export type ResultIso<A extends Top, E extends Top> = {
|
|
|
5686
6081
|
readonly failure: E["Iso"];
|
|
5687
6082
|
};
|
|
5688
6083
|
/**
|
|
5689
|
-
*
|
|
6084
|
+
* Schema for `Result<A, E>` values.
|
|
5690
6085
|
*
|
|
5691
|
-
* @category
|
|
6086
|
+
* @category schemas
|
|
5692
6087
|
* @since 4.0.0
|
|
5693
6088
|
*/
|
|
5694
6089
|
export declare function Result<A extends Top, E extends Top>(success: A, failure: E): Result<A, E>;
|
|
@@ -5704,8 +6099,8 @@ export interface Redacted<S extends Top> extends declareConstructor<Redacted_.Re
|
|
|
5704
6099
|
readonly value: S;
|
|
5705
6100
|
}
|
|
5706
6101
|
/**
|
|
5707
|
-
*
|
|
5708
|
-
*
|
|
6102
|
+
* Schema for values that hide sensitive information from error output and
|
|
6103
|
+
* inspection.
|
|
5709
6104
|
*
|
|
5710
6105
|
* **Details**
|
|
5711
6106
|
*
|
|
@@ -5719,17 +6114,16 @@ export interface Redacted<S extends Top> extends declareConstructor<Redacted_.Re
|
|
|
5719
6114
|
* - The default JSON serializer will deserialize into a `Redacted` instance with the label
|
|
5720
6115
|
* - The arbitrary generator will produce a `Redacted` instance with the label
|
|
5721
6116
|
* - The formatter will return the label
|
|
5722
|
-
*
|
|
5723
|
-
*
|
|
5724
|
-
*
|
|
5725
|
-
* The default JSON serializer will fail when attempting to serialize a `Redacted` value,
|
|
5726
|
-
* but it will deserialize a value into a `Redacted` instance.
|
|
6117
|
+
* - `disallowJsonEncode`: When set to `true`, when attempting to encode a `Redacted` instance
|
|
6118
|
+
* into JSON, it will fail with an error. This is useful when the wrapped schema is
|
|
6119
|
+
* sensitive and should not be exposed in JSON.
|
|
5727
6120
|
*
|
|
5728
6121
|
* @category Redacted
|
|
5729
6122
|
* @since 3.10.0
|
|
5730
6123
|
*/
|
|
5731
6124
|
export declare function Redacted<S extends Top>(value: S, options?: {
|
|
5732
6125
|
readonly label?: string | undefined;
|
|
6126
|
+
readonly disallowJsonEncode?: boolean | undefined;
|
|
5733
6127
|
}): Redacted<S>;
|
|
5734
6128
|
/**
|
|
5735
6129
|
* Type-level representation of a schema that decodes a raw value with the
|
|
@@ -5759,17 +6153,26 @@ export declare function redact<S extends Top>(schema: S): middlewareDecoding<S,
|
|
|
5759
6153
|
*/
|
|
5760
6154
|
export declare function RedactedFromValue<S extends Top>(value: S, options?: {
|
|
5761
6155
|
readonly label?: string | undefined;
|
|
6156
|
+
readonly disallowEncode?: boolean | undefined;
|
|
5762
6157
|
}): RedactedFromValue<S>;
|
|
5763
6158
|
/**
|
|
5764
6159
|
* Schema for a single `Cause.Reason`, representing one reason a fiber may fail:
|
|
5765
6160
|
* a typed error (`Fail`), an unexpected defect (`Die`), or an interrupt
|
|
5766
6161
|
* (`Interrupt`).
|
|
5767
6162
|
*
|
|
6163
|
+
* **When to use**
|
|
6164
|
+
*
|
|
6165
|
+
* Use as the schema type when generic code needs to retain the typed failure
|
|
6166
|
+
* and defect schemas for a single cause reason.
|
|
6167
|
+
*
|
|
5768
6168
|
* **Details**
|
|
5769
6169
|
*
|
|
5770
6170
|
* The `error` schema validates typed failures and the `defect` schema validates
|
|
5771
6171
|
* unexpected defects.
|
|
5772
6172
|
*
|
|
6173
|
+
* @see {@link CauseReason} for constructing this schema type
|
|
6174
|
+
* @see {@link CauseReasonIso} for the ISO shape of each cause reason
|
|
6175
|
+
*
|
|
5773
6176
|
* @category CauseReason
|
|
5774
6177
|
* @since 4.0.0
|
|
5775
6178
|
*/
|
|
@@ -5803,6 +6206,19 @@ export type CauseReasonIso<E extends Top, D extends Top> = {
|
|
|
5803
6206
|
* Creates a schema for `Cause.Reason` values using separate schemas for typed
|
|
5804
6207
|
* failures and unexpected defects.
|
|
5805
6208
|
*
|
|
6209
|
+
* **When to use**
|
|
6210
|
+
*
|
|
6211
|
+
* Use to validate, transform, or serialize individual `Cause.Reason` values
|
|
6212
|
+
* when typed failures and unexpected defects need separate schemas.
|
|
6213
|
+
*
|
|
6214
|
+
* **Details**
|
|
6215
|
+
*
|
|
6216
|
+
* `Fail` reasons use the `error` schema, `Die` reasons use the `defect` schema,
|
|
6217
|
+
* and `Interrupt` reasons carry only an optional fiber id.
|
|
6218
|
+
*
|
|
6219
|
+
* @see {@link Cause} for constructing schemas for full Cause values
|
|
6220
|
+
* @see {@link CauseReasonIso} for the ISO shape of each cause reason
|
|
6221
|
+
*
|
|
5806
6222
|
* @category CauseReason
|
|
5807
6223
|
* @since 4.0.0
|
|
5808
6224
|
*/
|
|
@@ -5811,11 +6227,19 @@ export declare function CauseReason<E extends Top, D extends Top>(error: E, defe
|
|
|
5811
6227
|
* Schema for `Cause` values, represented as an ordered collection of failure
|
|
5812
6228
|
* reasons combining typed errors, defects, and interrupts.
|
|
5813
6229
|
*
|
|
6230
|
+
* **When to use**
|
|
6231
|
+
*
|
|
6232
|
+
* Use as the schema type when generic code needs to retain the typed failure
|
|
6233
|
+
* and defect schemas for a full cause.
|
|
6234
|
+
*
|
|
5814
6235
|
* **Details**
|
|
5815
6236
|
*
|
|
5816
6237
|
* The `error` schema validates typed failures and the `defect` schema validates
|
|
5817
6238
|
* unexpected defects.
|
|
5818
6239
|
*
|
|
6240
|
+
* @see {@link Cause} for constructing this schema type
|
|
6241
|
+
* @see {@link CauseIso} for the ordered array representation used by the schema ISO
|
|
6242
|
+
*
|
|
5819
6243
|
* @category Cause
|
|
5820
6244
|
* @since 3.10.0
|
|
5821
6245
|
*/
|
|
@@ -5828,6 +6252,14 @@ export interface Cause<E extends Top, D extends Top> extends declareConstructor<
|
|
|
5828
6252
|
* Iso representation used for `Cause` schemas: an ordered array of
|
|
5829
6253
|
* `CauseReasonIso` values.
|
|
5830
6254
|
*
|
|
6255
|
+
* **When to use**
|
|
6256
|
+
*
|
|
6257
|
+
* Use when working with the ISO shape of a `Cause` schema, such as `toIso`
|
|
6258
|
+
* optics or codecs that expose a cause as its ordered array of encoded reasons.
|
|
6259
|
+
*
|
|
6260
|
+
* @see {@link Cause} for constructing schemas for full Cause values
|
|
6261
|
+
* @see {@link CauseReasonIso} for the ISO shape of each array element
|
|
6262
|
+
*
|
|
5831
6263
|
* @category Cause
|
|
5832
6264
|
* @since 4.0.0
|
|
5833
6265
|
*/
|
|
@@ -5836,6 +6268,20 @@ export type CauseIso<E extends Top, D extends Top> = ReadonlyArray<CauseReasonIs
|
|
|
5836
6268
|
* Creates a schema for `Cause` values using separate schemas for typed failures
|
|
5837
6269
|
* and unexpected defects.
|
|
5838
6270
|
*
|
|
6271
|
+
* **When to use**
|
|
6272
|
+
*
|
|
6273
|
+
* Use to validate, transform, or serialize Effect failure causes when typed
|
|
6274
|
+
* failures and unexpected defects need separate schemas.
|
|
6275
|
+
*
|
|
6276
|
+
* **Details**
|
|
6277
|
+
*
|
|
6278
|
+
* The `error` schema is applied to `Fail` reasons and the `defect` schema is
|
|
6279
|
+
* applied to `Die` reasons. Interrupt reasons do not use either schema and
|
|
6280
|
+
* carry only an optional fiber id.
|
|
6281
|
+
*
|
|
6282
|
+
* @see {@link CauseReason} for the schema used by each individual cause reason
|
|
6283
|
+
* @see {@link CauseIso} for the ordered array representation used by the schema ISO
|
|
6284
|
+
*
|
|
5839
6285
|
* @category Cause
|
|
5840
6286
|
* @since 3.10.0
|
|
5841
6287
|
*/
|
|
@@ -5850,7 +6296,7 @@ export interface Error extends instanceOf<globalThis.Error> {
|
|
|
5850
6296
|
readonly "Rebuild": Error;
|
|
5851
6297
|
}
|
|
5852
6298
|
/**
|
|
5853
|
-
*
|
|
6299
|
+
* Schema for JavaScript `Error` objects.
|
|
5854
6300
|
*
|
|
5855
6301
|
* **Details**
|
|
5856
6302
|
*
|
|
@@ -5864,7 +6310,7 @@ export interface Error extends instanceOf<globalThis.Error> {
|
|
|
5864
6310
|
*/
|
|
5865
6311
|
export declare const Error: Error;
|
|
5866
6312
|
/**
|
|
5867
|
-
*
|
|
6313
|
+
* Schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
5868
6314
|
* encoded form.
|
|
5869
6315
|
*
|
|
5870
6316
|
* **Details**
|
|
@@ -5895,7 +6341,7 @@ export interface Defect extends Union<readonly [
|
|
|
5895
6341
|
readonly "Rebuild": Defect;
|
|
5896
6342
|
}
|
|
5897
6343
|
/**
|
|
5898
|
-
*
|
|
6344
|
+
* Schema for defect values, accepting either JavaScript `Error` values encoded
|
|
5899
6345
|
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
5900
6346
|
*
|
|
5901
6347
|
* **Details**
|
|
@@ -5909,8 +6355,7 @@ export interface Defect extends Union<readonly [
|
|
|
5909
6355
|
*/
|
|
5910
6356
|
export declare const Defect: Defect;
|
|
5911
6357
|
/**
|
|
5912
|
-
*
|
|
5913
|
-
* encoded form.
|
|
6358
|
+
* Schema for defects that also includes stack traces in the encoded form.
|
|
5914
6359
|
*
|
|
5915
6360
|
* @category Defect
|
|
5916
6361
|
* @since 4.0.0
|
|
@@ -5959,6 +6404,15 @@ export declare function Exit<A extends Top, E extends Top, D extends Top>(value:
|
|
|
5959
6404
|
* Type-level representation of a `ReadonlyMap` schema whose keys and values are
|
|
5960
6405
|
* validated by the provided schemas.
|
|
5961
6406
|
*
|
|
6407
|
+
* **When to use**
|
|
6408
|
+
*
|
|
6409
|
+
* Use as a type annotation for a `ReadonlyMap` schema when exposing or returning
|
|
6410
|
+
* the schema while preserving its key schema, value schema, and ISO
|
|
6411
|
+
* representation.
|
|
6412
|
+
*
|
|
6413
|
+
* @see {@link ReadonlyMap} for constructing this schema type from key and value schemas
|
|
6414
|
+
* @see {@link ReadonlyMapIso} for the readonly tuple-array ISO representation used by this schema
|
|
6415
|
+
*
|
|
5962
6416
|
* @category ReadonlyMap
|
|
5963
6417
|
* @since 4.0.0
|
|
5964
6418
|
*/
|
|
@@ -5976,8 +6430,8 @@ export interface $ReadonlyMap<Key extends Top, Value extends Top> extends declar
|
|
|
5976
6430
|
*/
|
|
5977
6431
|
export type ReadonlyMapIso<Key extends Top, Value extends Top> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>;
|
|
5978
6432
|
/**
|
|
5979
|
-
*
|
|
5980
|
-
*
|
|
6433
|
+
* Schema for readonly maps whose keys and values conform to the provided
|
|
6434
|
+
* schemas.
|
|
5981
6435
|
*
|
|
5982
6436
|
* @category ReadonlyMap
|
|
5983
6437
|
* @since 3.10.0
|
|
@@ -6004,8 +6458,7 @@ export interface HashMap<Key extends Top, Value extends Top> extends declareCons
|
|
|
6004
6458
|
*/
|
|
6005
6459
|
export type HashMapIso<Key extends Top, Value extends Top> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>;
|
|
6006
6460
|
/**
|
|
6007
|
-
*
|
|
6008
|
-
* conform to the provided schemas.
|
|
6461
|
+
* Schema for hash maps whose keys and values conform to the provided schemas.
|
|
6009
6462
|
*
|
|
6010
6463
|
* @category HashMap
|
|
6011
6464
|
* @since 3.10.0
|
|
@@ -6015,6 +6468,14 @@ export declare function HashMap<Key extends Top, Value extends Top>(key: Key, va
|
|
|
6015
6468
|
* Type-level representation of a `ReadonlySet` schema whose values are validated
|
|
6016
6469
|
* by the provided element schema.
|
|
6017
6470
|
*
|
|
6471
|
+
* **When to use**
|
|
6472
|
+
*
|
|
6473
|
+
* Use to name or constrain the schema type produced by `ReadonlySet` when
|
|
6474
|
+
* generic code needs to retain the element schema type.
|
|
6475
|
+
*
|
|
6476
|
+
* @see {@link ReadonlySet} for constructing this schema type
|
|
6477
|
+
* @see {@link ReadonlySetIso} for the array representation used by this schema's ISO
|
|
6478
|
+
*
|
|
6018
6479
|
* @category ReadonlySet
|
|
6019
6480
|
* @since 4.0.0
|
|
6020
6481
|
*/
|
|
@@ -6031,8 +6492,7 @@ export interface $ReadonlySet<Value extends Top> extends declareConstructor<glob
|
|
|
6031
6492
|
*/
|
|
6032
6493
|
export type ReadonlySetIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
6033
6494
|
/**
|
|
6034
|
-
*
|
|
6035
|
-
* provided element schema.
|
|
6495
|
+
* Schema for readonly sets whose values conform to the provided element schema.
|
|
6036
6496
|
*
|
|
6037
6497
|
* @category ReadonlySet
|
|
6038
6498
|
* @since 3.10.0
|
|
@@ -6058,8 +6518,7 @@ export interface HashSet<Value extends Top> extends declareConstructor<HashSet_.
|
|
|
6058
6518
|
*/
|
|
6059
6519
|
export type HashSetIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
6060
6520
|
/**
|
|
6061
|
-
*
|
|
6062
|
-
* provided schema.
|
|
6521
|
+
* Schema for hash sets whose values conform to the provided element schema.
|
|
6063
6522
|
*
|
|
6064
6523
|
* @category HashSet
|
|
6065
6524
|
* @since 3.10.0
|
|
@@ -6080,13 +6539,19 @@ export interface Chunk<Value extends Top> extends declareConstructor<Chunk_.Chun
|
|
|
6080
6539
|
* Iso representation used for `Chunk` schemas: an array of element values using
|
|
6081
6540
|
* the element schema's `Iso` type.
|
|
6082
6541
|
*
|
|
6542
|
+
* **When to use**
|
|
6543
|
+
*
|
|
6544
|
+
* Use when annotating type-level helpers that work with the readonly-array ISO
|
|
6545
|
+
* shape of a `Chunk` schema.
|
|
6546
|
+
*
|
|
6547
|
+
* @see {@link Chunk} for the schema interface and constructor that use this ISO representation
|
|
6548
|
+
*
|
|
6083
6549
|
* @category Chunk
|
|
6084
6550
|
* @since 4.0.0
|
|
6085
6551
|
*/
|
|
6086
6552
|
export type ChunkIso<Value extends Top> = ReadonlyArray<Value["Iso"]>;
|
|
6087
6553
|
/**
|
|
6088
|
-
*
|
|
6089
|
-
* provided schema.
|
|
6554
|
+
* Schema for chunks whose values conform to the provided element schema.
|
|
6090
6555
|
*
|
|
6091
6556
|
* @category Chunk
|
|
6092
6557
|
* @since 3.10.0
|
|
@@ -6122,7 +6587,7 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
6122
6587
|
readonly "Rebuild": URL;
|
|
6123
6588
|
}
|
|
6124
6589
|
/**
|
|
6125
|
-
*
|
|
6590
|
+
* Schema for JavaScript `URL` objects.
|
|
6126
6591
|
*
|
|
6127
6592
|
* **Details**
|
|
6128
6593
|
*
|
|
@@ -6145,7 +6610,7 @@ export interface URLFromString extends decodeTo<URL, String> {
|
|
|
6145
6610
|
readonly "Rebuild": URLFromString;
|
|
6146
6611
|
}
|
|
6147
6612
|
/**
|
|
6148
|
-
*
|
|
6613
|
+
* Schema that decodes a `string` into a `URL`.
|
|
6149
6614
|
*
|
|
6150
6615
|
* **Details**
|
|
6151
6616
|
*
|
|
@@ -6170,14 +6635,18 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
6170
6635
|
readonly "Rebuild": Date;
|
|
6171
6636
|
}
|
|
6172
6637
|
/**
|
|
6173
|
-
*
|
|
6638
|
+
* Schema for JavaScript `Date` objects.
|
|
6639
|
+
*
|
|
6640
|
+
* **When to use**
|
|
6641
|
+
*
|
|
6642
|
+
* Use to validate in-memory values that must already be JavaScript `Date`
|
|
6643
|
+
* instances.
|
|
6174
6644
|
*
|
|
6175
6645
|
* **Details**
|
|
6176
6646
|
*
|
|
6177
|
-
* This schema accepts any `Date` instance, including invalid dates.
|
|
6178
|
-
*
|
|
6179
|
-
*
|
|
6180
|
-
* `"Invalid Date"`.
|
|
6647
|
+
* This schema accepts any `Date` instance, including invalid dates. The default
|
|
6648
|
+
* JSON serializer encodes valid dates as ISO 8601 strings; invalid dates encode
|
|
6649
|
+
* as `"Invalid Date"`.
|
|
6181
6650
|
*
|
|
6182
6651
|
* **Example** (Date schema)
|
|
6183
6652
|
*
|
|
@@ -6188,6 +6657,8 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
6188
6657
|
* // => Date { 2024-01-01T00:00:00.000Z }
|
|
6189
6658
|
* ```
|
|
6190
6659
|
*
|
|
6660
|
+
* @see {@link DateValid} for accepting only valid Date instances
|
|
6661
|
+
*
|
|
6191
6662
|
* @category Date
|
|
6192
6663
|
* @since 4.0.0
|
|
6193
6664
|
*/
|
|
@@ -6203,18 +6674,29 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
6203
6674
|
readonly "Rebuild": DateFromString;
|
|
6204
6675
|
}
|
|
6205
6676
|
/**
|
|
6206
|
-
*
|
|
6677
|
+
* Schema that decodes a string into a JavaScript `Date`.
|
|
6678
|
+
*
|
|
6679
|
+
* **When to use**
|
|
6680
|
+
*
|
|
6681
|
+
* Use to model string-encoded dates that decode to JavaScript `Date` objects
|
|
6682
|
+
* and encode back to strings.
|
|
6207
6683
|
*
|
|
6208
6684
|
* **Details**
|
|
6209
6685
|
*
|
|
6210
6686
|
* Decoding:
|
|
6211
|
-
* The string is passed to JavaScript `Date` construction
|
|
6212
|
-
* invalid `Date`. Compose with `DateValid` when invalid dates should be rejected.
|
|
6687
|
+
* The string is passed to JavaScript `Date` construction.
|
|
6213
6688
|
*
|
|
6214
6689
|
* Encoding:
|
|
6215
6690
|
* A valid `Date` is encoded as an ISO string; an invalid `Date` is encoded as
|
|
6216
6691
|
* `"Invalid Date"`.
|
|
6217
6692
|
*
|
|
6693
|
+
* **Gotchas**
|
|
6694
|
+
*
|
|
6695
|
+
* Invalid date strings can decode to invalid `Date` instances.
|
|
6696
|
+
*
|
|
6697
|
+
* @see {@link Date} for accepting Date instances directly
|
|
6698
|
+
* @see {@link DateValid} for rejecting invalid Date instances
|
|
6699
|
+
*
|
|
6218
6700
|
* @category Date
|
|
6219
6701
|
* @since 3.10.0
|
|
6220
6702
|
*/
|
|
@@ -6230,7 +6712,7 @@ export interface DateValid extends Date {
|
|
|
6230
6712
|
readonly "Rebuild": DateValid;
|
|
6231
6713
|
}
|
|
6232
6714
|
/**
|
|
6233
|
-
*
|
|
6715
|
+
* Schema for **valid** JavaScript `Date` objects.
|
|
6234
6716
|
*
|
|
6235
6717
|
* **Details**
|
|
6236
6718
|
*
|
|
@@ -6251,7 +6733,7 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
6251
6733
|
readonly "Rebuild": Duration;
|
|
6252
6734
|
}
|
|
6253
6735
|
/**
|
|
6254
|
-
*
|
|
6736
|
+
* Schema for `Duration` values.
|
|
6255
6737
|
*
|
|
6256
6738
|
* **Details**
|
|
6257
6739
|
*
|
|
@@ -6283,7 +6765,7 @@ export interface DurationFromString extends decodeTo<Duration, String> {
|
|
|
6283
6765
|
readonly "Rebuild": DurationFromString;
|
|
6284
6766
|
}
|
|
6285
6767
|
/**
|
|
6286
|
-
*
|
|
6768
|
+
* Schema that parses a string into a `Duration`.
|
|
6287
6769
|
*
|
|
6288
6770
|
* **Details**
|
|
6289
6771
|
*
|
|
@@ -6309,7 +6791,7 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
6309
6791
|
readonly "Rebuild": DurationFromNanos;
|
|
6310
6792
|
}
|
|
6311
6793
|
/**
|
|
6312
|
-
*
|
|
6794
|
+
* Schema that decodes a non-negative `bigint` into a
|
|
6313
6795
|
* `Duration`, treating the bigint as nanoseconds.
|
|
6314
6796
|
*
|
|
6315
6797
|
* **Details**
|
|
@@ -6337,7 +6819,7 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
6337
6819
|
readonly "Rebuild": DurationFromMillis;
|
|
6338
6820
|
}
|
|
6339
6821
|
/**
|
|
6340
|
-
*
|
|
6822
|
+
* Schema that decodes a non-negative (possibly infinite)
|
|
6341
6823
|
* integer into a `Duration`, treating the integer value as the duration in
|
|
6342
6824
|
* milliseconds.
|
|
6343
6825
|
*
|
|
@@ -6365,7 +6847,12 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
6365
6847
|
readonly "Rebuild": BigDecimal;
|
|
6366
6848
|
}
|
|
6367
6849
|
/**
|
|
6368
|
-
*
|
|
6850
|
+
* Schema for `BigDecimal` values.
|
|
6851
|
+
*
|
|
6852
|
+
* **When to use**
|
|
6853
|
+
*
|
|
6854
|
+
* Use when values are already Effect decimal instances and need schema
|
|
6855
|
+
* validation, formatting, equivalence, and JSON string serialization.
|
|
6369
6856
|
*
|
|
6370
6857
|
* **Details**
|
|
6371
6858
|
*
|
|
@@ -6373,6 +6860,8 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
6373
6860
|
*
|
|
6374
6861
|
* - encodes `BigDecimal` as a `string`
|
|
6375
6862
|
*
|
|
6863
|
+
* @see {@link BigDecimalFromString} for parsing string input into a BigDecimal
|
|
6864
|
+
*
|
|
6376
6865
|
* @category BigDecimal
|
|
6377
6866
|
* @since 3.10.0
|
|
6378
6867
|
*/
|
|
@@ -6388,15 +6877,28 @@ export interface BigDecimalFromString extends decodeTo<BigDecimal, String> {
|
|
|
6388
6877
|
readonly "Rebuild": BigDecimalFromString;
|
|
6389
6878
|
}
|
|
6390
6879
|
/**
|
|
6391
|
-
*
|
|
6880
|
+
* Schema that parses a string into a `BigDecimal`.
|
|
6881
|
+
*
|
|
6882
|
+
* **When to use**
|
|
6883
|
+
*
|
|
6884
|
+
* Use to parse decimal or exponent-notation strings into arbitrary-precision
|
|
6885
|
+
* BigDecimal values while encoding them back to strings.
|
|
6392
6886
|
*
|
|
6393
6887
|
* **Details**
|
|
6394
6888
|
*
|
|
6395
6889
|
* Decoding:
|
|
6396
|
-
* - A `string` is decoded
|
|
6890
|
+
* - A `string` is decoded with `BigDecimal.fromString`.
|
|
6397
6891
|
*
|
|
6398
6892
|
* Encoding:
|
|
6399
|
-
* - A `BigDecimal` is encoded
|
|
6893
|
+
* - A `BigDecimal` is encoded with `BigDecimal.format`.
|
|
6894
|
+
*
|
|
6895
|
+
* **Gotchas**
|
|
6896
|
+
*
|
|
6897
|
+
* An empty string decodes as zero.
|
|
6898
|
+
*
|
|
6899
|
+
* @see {@link BigDecimal} for validating values that are already BigDecimal values
|
|
6900
|
+
* @see {@link BigIntFromString} for parsing base-10 integer strings into bigint values
|
|
6901
|
+
* @see {@link NumberFromString} for parsing JavaScript number strings
|
|
6400
6902
|
*
|
|
6401
6903
|
* @category BigDecimal
|
|
6402
6904
|
* @since 4.0.0
|
|
@@ -6413,7 +6915,7 @@ export interface UnknownFromJsonString extends fromJsonString<Unknown> {
|
|
|
6413
6915
|
readonly "Rebuild": UnknownFromJsonString;
|
|
6414
6916
|
}
|
|
6415
6917
|
/**
|
|
6416
|
-
*
|
|
6918
|
+
* Schema that decodes a JSON-encoded string into an `unknown` value.
|
|
6417
6919
|
*
|
|
6418
6920
|
* **Details**
|
|
6419
6921
|
*
|
|
@@ -6568,9 +7070,11 @@ export interface fromFormData<S extends Top> extends decodeTo<S, FormData> {
|
|
|
6568
7070
|
readonly "Rebuild": fromFormData<S>;
|
|
6569
7071
|
}
|
|
6570
7072
|
/**
|
|
6571
|
-
*
|
|
6572
|
-
*
|
|
6573
|
-
*
|
|
7073
|
+
* Schema for decoding `FormData` through a bracket-notation tree.
|
|
7074
|
+
*
|
|
7075
|
+
* **When to use**
|
|
7076
|
+
*
|
|
7077
|
+
* Use to decode browser or multipart form data into a structured schema value.
|
|
6574
7078
|
*
|
|
6575
7079
|
* **Details**
|
|
6576
7080
|
*
|
|
@@ -6686,9 +7190,11 @@ export interface fromURLSearchParams<S extends Top> extends decodeTo<S, URLSearc
|
|
|
6686
7190
|
readonly "Rebuild": fromURLSearchParams<S>;
|
|
6687
7191
|
}
|
|
6688
7192
|
/**
|
|
6689
|
-
*
|
|
6690
|
-
*
|
|
6691
|
-
*
|
|
7193
|
+
* Schema for decoding `URLSearchParams` through a bracket-notation tree.
|
|
7194
|
+
*
|
|
7195
|
+
* **When to use**
|
|
7196
|
+
*
|
|
7197
|
+
* Use to decode query parameters into a structured schema value.
|
|
6692
7198
|
*
|
|
6693
7199
|
* **Details**
|
|
6694
7200
|
*
|
|
@@ -6775,7 +7281,7 @@ export interface Finite extends Number {
|
|
|
6775
7281
|
readonly "Rebuild": Finite;
|
|
6776
7282
|
}
|
|
6777
7283
|
/**
|
|
6778
|
-
*
|
|
7284
|
+
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
6779
7285
|
*
|
|
6780
7286
|
* @category Number
|
|
6781
7287
|
* @since 3.10.0
|
|
@@ -6792,7 +7298,7 @@ export interface Int extends Number {
|
|
|
6792
7298
|
readonly "Rebuild": Int;
|
|
6793
7299
|
}
|
|
6794
7300
|
/**
|
|
6795
|
-
*
|
|
7301
|
+
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
6796
7302
|
*
|
|
6797
7303
|
* @category Number
|
|
6798
7304
|
* @since 3.10.0
|
|
@@ -6809,7 +7315,7 @@ export interface NumberFromString extends decodeTo<Finite, String> {
|
|
|
6809
7315
|
readonly "Rebuild": NumberFromString;
|
|
6810
7316
|
}
|
|
6811
7317
|
/**
|
|
6812
|
-
*
|
|
7318
|
+
* Schema that parses a string into a `number` using JavaScript
|
|
6813
7319
|
* number coercion.
|
|
6814
7320
|
*
|
|
6815
7321
|
* **Details**
|
|
@@ -6837,7 +7343,7 @@ export interface FiniteFromString extends decodeTo<Finite, String> {
|
|
|
6837
7343
|
readonly "Rebuild": FiniteFromString;
|
|
6838
7344
|
}
|
|
6839
7345
|
/**
|
|
6840
|
-
*
|
|
7346
|
+
* Schema that parses a string into a finite number.
|
|
6841
7347
|
*
|
|
6842
7348
|
* **Details**
|
|
6843
7349
|
*
|
|
@@ -6863,7 +7369,12 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
6863
7369
|
readonly "Rebuild": BigIntFromString;
|
|
6864
7370
|
}
|
|
6865
7371
|
/**
|
|
6866
|
-
*
|
|
7372
|
+
* Schema that parses a string into a `bigint`.
|
|
7373
|
+
*
|
|
7374
|
+
* **When to use**
|
|
7375
|
+
*
|
|
7376
|
+
* Use to parse signed base-10 integer strings into bigint values while encoding
|
|
7377
|
+
* bigint values back to decimal strings.
|
|
6867
7378
|
*
|
|
6868
7379
|
* **Details**
|
|
6869
7380
|
*
|
|
@@ -6873,6 +7384,15 @@ export interface BigIntFromString extends decodeTo<BigInt, String> {
|
|
|
6873
7384
|
* Encoding:
|
|
6874
7385
|
* - A `bigint` is encoded as a `string`.
|
|
6875
7386
|
*
|
|
7387
|
+
* **Gotchas**
|
|
7388
|
+
*
|
|
7389
|
+
* Decoding accepts only strings matching `^-?\d+$`.
|
|
7390
|
+
*
|
|
7391
|
+
* @see {@link isStringBigInt} for the string predicate used by this schema
|
|
7392
|
+
* @see {@link BigInt} for validating values that are already bigint values
|
|
7393
|
+
* @see {@link NumberFromString} for parsing JavaScript number strings, including non-finite values
|
|
7394
|
+
* @see {@link BigDecimalFromString} for parsing decimal number strings
|
|
7395
|
+
*
|
|
6876
7396
|
* @category BigInt
|
|
6877
7397
|
* @since 4.0.0
|
|
6878
7398
|
*/
|
|
@@ -6888,7 +7408,7 @@ export interface Trimmed extends String {
|
|
|
6888
7408
|
readonly "Rebuild": Trimmed;
|
|
6889
7409
|
}
|
|
6890
7410
|
/**
|
|
6891
|
-
*
|
|
7411
|
+
* Schema for strings that contains no leading or trailing whitespaces.
|
|
6892
7412
|
*
|
|
6893
7413
|
* @category String
|
|
6894
7414
|
* @since 3.10.0
|
|
@@ -6905,7 +7425,7 @@ export interface Trim extends decodeTo<Trimmed, String> {
|
|
|
6905
7425
|
readonly "Rebuild": Trim;
|
|
6906
7426
|
}
|
|
6907
7427
|
/**
|
|
6908
|
-
*
|
|
7428
|
+
* Schema that trims whitespace from a string.
|
|
6909
7429
|
*
|
|
6910
7430
|
* **Details**
|
|
6911
7431
|
*
|
|
@@ -7039,7 +7559,7 @@ export interface StringFromUriComponent extends decodeTo<String, String> {
|
|
|
7039
7559
|
*/
|
|
7040
7560
|
export declare const StringFromUriComponent: StringFromUriComponent;
|
|
7041
7561
|
/**
|
|
7042
|
-
*
|
|
7562
|
+
* Schema for property keys accepted by Effect schemas: finite `number`,
|
|
7043
7563
|
* `symbol`, or `string`.
|
|
7044
7564
|
*
|
|
7045
7565
|
* @category PropertyKey
|
|
@@ -7076,7 +7596,20 @@ export interface BooleanFromBit extends decodeTo<Boolean, Literals<readonly [0,
|
|
|
7076
7596
|
readonly "Rebuild": BooleanFromBit;
|
|
7077
7597
|
}
|
|
7078
7598
|
/**
|
|
7079
|
-
*
|
|
7599
|
+
* Schema for a boolean parsed from 0 or 1.
|
|
7600
|
+
*
|
|
7601
|
+
* **When to use**
|
|
7602
|
+
*
|
|
7603
|
+
* Use when decoding data sources that represent booleans as `0 | 1` while
|
|
7604
|
+
* keeping boolean values in the decoded model.
|
|
7605
|
+
*
|
|
7606
|
+
* **Details**
|
|
7607
|
+
*
|
|
7608
|
+
* Decoding accepts only `0 | 1`, maps `1` to `true`, and maps `0` to `false`.
|
|
7609
|
+
* Encoding maps `true` to `1` and `false` to `0`.
|
|
7610
|
+
*
|
|
7611
|
+
* @see {@link Boolean} for validating values that are already booleans
|
|
7612
|
+
* @see {@link Literals} for keeping bit literals instead of decoding them
|
|
7080
7613
|
*
|
|
7081
7614
|
* @category Boolean
|
|
7082
7615
|
* @since 4.0.0
|
|
@@ -7093,7 +7626,7 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
7093
7626
|
readonly "Rebuild": Uint8Array;
|
|
7094
7627
|
}
|
|
7095
7628
|
/**
|
|
7096
|
-
*
|
|
7629
|
+
* Schema for JavaScript `Uint8Array` objects.
|
|
7097
7630
|
*
|
|
7098
7631
|
* **Details**
|
|
7099
7632
|
*
|
|
@@ -7116,7 +7649,7 @@ export interface Uint8ArrayFromBase64 extends decodeTo<Uint8Array, String> {
|
|
|
7116
7649
|
readonly "Rebuild": Uint8ArrayFromBase64;
|
|
7117
7650
|
}
|
|
7118
7651
|
/**
|
|
7119
|
-
*
|
|
7652
|
+
* Schema that decodes a base64 encoded string into a
|
|
7120
7653
|
* `Uint8Array`.
|
|
7121
7654
|
*
|
|
7122
7655
|
* **Details**
|
|
@@ -7142,7 +7675,7 @@ export interface Uint8ArrayFromBase64Url extends decodeTo<Uint8Array, String> {
|
|
|
7142
7675
|
readonly "Rebuild": Uint8ArrayFromBase64Url;
|
|
7143
7676
|
}
|
|
7144
7677
|
/**
|
|
7145
|
-
*
|
|
7678
|
+
* Schema that decodes a base64 (URL) encoded string into a
|
|
7146
7679
|
* `Uint8Array`.
|
|
7147
7680
|
*
|
|
7148
7681
|
* **Details**
|
|
@@ -7168,7 +7701,7 @@ export interface Uint8ArrayFromHex extends decodeTo<Uint8Array, String> {
|
|
|
7168
7701
|
readonly "Rebuild": Uint8ArrayFromHex;
|
|
7169
7702
|
}
|
|
7170
7703
|
/**
|
|
7171
|
-
*
|
|
7704
|
+
* Schema that decodes a hex encoded string into a
|
|
7172
7705
|
* `Uint8Array`.
|
|
7173
7706
|
*
|
|
7174
7707
|
* **Details**
|
|
@@ -7194,13 +7727,22 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
7194
7727
|
readonly "Rebuild": DateTimeUtc;
|
|
7195
7728
|
}
|
|
7196
7729
|
/**
|
|
7197
|
-
*
|
|
7730
|
+
* Schema for `DateTime.Utc` values.
|
|
7731
|
+
*
|
|
7732
|
+
* **When to use**
|
|
7733
|
+
*
|
|
7734
|
+
* Use to validate existing `DateTime.Utc` schema values and use the default JSON
|
|
7735
|
+
* codec that represents them as UTC ISO strings.
|
|
7198
7736
|
*
|
|
7199
7737
|
* **Details**
|
|
7200
7738
|
*
|
|
7201
|
-
*
|
|
7739
|
+
* The default JSON codec decodes UTC ISO strings into `DateTime.Utc` values and
|
|
7740
|
+
* encodes `DateTime.Utc` values as UTC ISO strings.
|
|
7202
7741
|
*
|
|
7203
|
-
*
|
|
7742
|
+
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
7743
|
+
* @see {@link DateTimeUtcFromDate} for decoding JavaScript Date values into UTC values
|
|
7744
|
+
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7745
|
+
* @see {@link DateTimeZoned} for preserving zoned DateTime values
|
|
7204
7746
|
*
|
|
7205
7747
|
* @category DateTime
|
|
7206
7748
|
* @since 3.10.0
|
|
@@ -7217,7 +7759,12 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
7217
7759
|
readonly "Rebuild": DateTimeUtcFromDate;
|
|
7218
7760
|
}
|
|
7219
7761
|
/**
|
|
7220
|
-
*
|
|
7762
|
+
* Schema that decodes a `Date` into a `DateTime.Utc`.
|
|
7763
|
+
*
|
|
7764
|
+
* **When to use**
|
|
7765
|
+
*
|
|
7766
|
+
* Use when a boundary provides valid JavaScript `Date` objects but the decoded
|
|
7767
|
+
* model should use `DateTime.Utc`.
|
|
7221
7768
|
*
|
|
7222
7769
|
* **Details**
|
|
7223
7770
|
*
|
|
@@ -7227,6 +7774,11 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
7227
7774
|
* Encoding:
|
|
7228
7775
|
* - A `DateTime.Utc` is encoded as a `Date`
|
|
7229
7776
|
*
|
|
7777
|
+
* @see {@link DateTimeUtc} for validating values that are already `DateTime.Utc`
|
|
7778
|
+
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
7779
|
+
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
7780
|
+
* @see {@link DateValid} for validating Date instances without converting them
|
|
7781
|
+
*
|
|
7230
7782
|
* @category DateTime
|
|
7231
7783
|
* @since 3.12.0
|
|
7232
7784
|
*/
|
|
@@ -7242,7 +7794,7 @@ export interface DateTimeUtcFromString extends decodeTo<DateTimeUtc, String> {
|
|
|
7242
7794
|
readonly "Rebuild": DateTimeUtcFromString;
|
|
7243
7795
|
}
|
|
7244
7796
|
/**
|
|
7245
|
-
*
|
|
7797
|
+
* Schema that decodes a date-time string into a `DateTime.Utc`.
|
|
7246
7798
|
*
|
|
7247
7799
|
* **Details**
|
|
7248
7800
|
*
|
|
@@ -7270,7 +7822,7 @@ export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>
|
|
|
7270
7822
|
readonly "Rebuild": DateTimeUtcFromMillis;
|
|
7271
7823
|
}
|
|
7272
7824
|
/**
|
|
7273
|
-
*
|
|
7825
|
+
* Schema that decodes a number into a `DateTime.Utc`.
|
|
7274
7826
|
*
|
|
7275
7827
|
* **Details**
|
|
7276
7828
|
*
|
|
@@ -7295,7 +7847,7 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
7295
7847
|
readonly "Rebuild": TimeZoneOffset;
|
|
7296
7848
|
}
|
|
7297
7849
|
/**
|
|
7298
|
-
*
|
|
7850
|
+
* Schema for `DateTime.TimeZone.Offset` values.
|
|
7299
7851
|
*
|
|
7300
7852
|
* **Details**
|
|
7301
7853
|
*
|
|
@@ -7318,7 +7870,7 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
7318
7870
|
readonly "Rebuild": TimeZoneNamed;
|
|
7319
7871
|
}
|
|
7320
7872
|
/**
|
|
7321
|
-
*
|
|
7873
|
+
* Schema for `DateTime.TimeZone.Named` values.
|
|
7322
7874
|
*
|
|
7323
7875
|
* **Details**
|
|
7324
7876
|
*
|
|
@@ -7341,7 +7893,7 @@ export interface TimeZoneNamedFromString extends decodeTo<TimeZoneNamed, String>
|
|
|
7341
7893
|
readonly "Rebuild": TimeZoneNamedFromString;
|
|
7342
7894
|
}
|
|
7343
7895
|
/**
|
|
7344
|
-
*
|
|
7896
|
+
* Schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
7345
7897
|
*
|
|
7346
7898
|
* **Details**
|
|
7347
7899
|
*
|
|
@@ -7366,7 +7918,7 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
7366
7918
|
readonly "Rebuild": TimeZone;
|
|
7367
7919
|
}
|
|
7368
7920
|
/**
|
|
7369
|
-
*
|
|
7921
|
+
* Schema for `DateTime.TimeZone` values.
|
|
7370
7922
|
*
|
|
7371
7923
|
* **Details**
|
|
7372
7924
|
*
|
|
@@ -7390,7 +7942,7 @@ export interface TimeZoneFromString extends decodeTo<TimeZone, String> {
|
|
|
7390
7942
|
readonly "Rebuild": TimeZoneFromString;
|
|
7391
7943
|
}
|
|
7392
7944
|
/**
|
|
7393
|
-
*
|
|
7945
|
+
* Schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
7394
7946
|
*
|
|
7395
7947
|
* **Details**
|
|
7396
7948
|
*
|
|
@@ -7415,7 +7967,7 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
7415
7967
|
readonly "Rebuild": DateTimeZoned;
|
|
7416
7968
|
}
|
|
7417
7969
|
/**
|
|
7418
|
-
*
|
|
7970
|
+
* Schema for `DateTime.Zoned` values.
|
|
7419
7971
|
*
|
|
7420
7972
|
* **Details**
|
|
7421
7973
|
*
|
|
@@ -7441,7 +7993,7 @@ export interface DateTimeZonedFromString extends decodeTo<DateTimeZoned, String>
|
|
|
7441
7993
|
readonly "Rebuild": DateTimeZonedFromString;
|
|
7442
7994
|
}
|
|
7443
7995
|
/**
|
|
7444
|
-
*
|
|
7996
|
+
* Schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
7445
7997
|
*
|
|
7446
7998
|
* **Details**
|
|
7447
7999
|
*
|
|
@@ -7501,13 +8053,23 @@ type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use
|
|
|
7501
8053
|
/**
|
|
7502
8054
|
* Creates a schema-backed class whose constructor validates input against a
|
|
7503
8055
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7504
|
-
* input
|
|
8056
|
+
* input.
|
|
8057
|
+
*
|
|
8058
|
+
* **When to use**
|
|
8059
|
+
*
|
|
8060
|
+
* Use to define a schema-backed data class when you want validated
|
|
8061
|
+
* construction, schema-derived decoding/encoding, and class-style methods or
|
|
8062
|
+
* inheritance.
|
|
7505
8063
|
*
|
|
7506
8064
|
* **Details**
|
|
7507
8065
|
*
|
|
7508
8066
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7509
8067
|
* type parameter can be used to add nominal brands.
|
|
7510
8068
|
*
|
|
8069
|
+
* **Gotchas**
|
|
8070
|
+
*
|
|
8071
|
+
* Passing `disableChecks` in the options skips constructor validation.
|
|
8072
|
+
*
|
|
7511
8073
|
* **Example** (Basic class)
|
|
7512
8074
|
*
|
|
7513
8075
|
* ```ts
|
|
@@ -7541,6 +8103,10 @@ type MissingSelfGeneric<Usage extends string> = `Missing \`Self\` generic - use
|
|
|
7541
8103
|
* console.log(dog.breed) // "Labrador"
|
|
7542
8104
|
* ```
|
|
7543
8105
|
*
|
|
8106
|
+
* @see {@link TaggedClass} for adding a `_tag` literal field to the class schema
|
|
8107
|
+
* @see {@link ErrorClass} for defining schema-backed error classes
|
|
8108
|
+
* @see {@link TaggedErrorClass} for defining tagged schema-backed error classes
|
|
8109
|
+
*
|
|
7544
8110
|
* @category constructors
|
|
7545
8111
|
* @since 3.10.0
|
|
7546
8112
|
*/
|
|
@@ -7548,13 +8114,23 @@ export declare const Class: {
|
|
|
7548
8114
|
/**
|
|
7549
8115
|
* Creates a schema-backed class whose constructor validates input against a
|
|
7550
8116
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7551
|
-
* input
|
|
8117
|
+
* input.
|
|
8118
|
+
*
|
|
8119
|
+
* **When to use**
|
|
8120
|
+
*
|
|
8121
|
+
* Use to define a schema-backed data class when you want validated
|
|
8122
|
+
* construction, schema-derived decoding/encoding, and class-style methods or
|
|
8123
|
+
* inheritance.
|
|
7552
8124
|
*
|
|
7553
8125
|
* **Details**
|
|
7554
8126
|
*
|
|
7555
8127
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7556
8128
|
* type parameter can be used to add nominal brands.
|
|
7557
8129
|
*
|
|
8130
|
+
* **Gotchas**
|
|
8131
|
+
*
|
|
8132
|
+
* Passing `disableChecks` in the options skips constructor validation.
|
|
8133
|
+
*
|
|
7558
8134
|
* **Example** (Basic class)
|
|
7559
8135
|
*
|
|
7560
8136
|
* ```ts
|
|
@@ -7588,6 +8164,10 @@ export declare const Class: {
|
|
|
7588
8164
|
* console.log(dog.breed) // "Labrador"
|
|
7589
8165
|
* ```
|
|
7590
8166
|
*
|
|
8167
|
+
* @see {@link TaggedClass} for adding a `_tag` literal field to the class schema
|
|
8168
|
+
* @see {@link ErrorClass} for defining schema-backed error classes
|
|
8169
|
+
* @see {@link TaggedErrorClass} for defining tagged schema-backed error classes
|
|
8170
|
+
*
|
|
7591
8171
|
* @category constructors
|
|
7592
8172
|
* @since 3.10.0
|
|
7593
8173
|
*/
|
|
@@ -7595,13 +8175,23 @@ export declare const Class: {
|
|
|
7595
8175
|
/**
|
|
7596
8176
|
* Creates a schema-backed class whose constructor validates input against a
|
|
7597
8177
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7598
|
-
* input
|
|
8178
|
+
* input.
|
|
8179
|
+
*
|
|
8180
|
+
* **When to use**
|
|
8181
|
+
*
|
|
8182
|
+
* Use to define a schema-backed data class when you want validated
|
|
8183
|
+
* construction, schema-derived decoding/encoding, and class-style methods or
|
|
8184
|
+
* inheritance.
|
|
7599
8185
|
*
|
|
7600
8186
|
* **Details**
|
|
7601
8187
|
*
|
|
7602
8188
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7603
8189
|
* type parameter can be used to add nominal brands.
|
|
7604
8190
|
*
|
|
8191
|
+
* **Gotchas**
|
|
8192
|
+
*
|
|
8193
|
+
* Passing `disableChecks` in the options skips constructor validation.
|
|
8194
|
+
*
|
|
7605
8195
|
* **Example** (Basic class)
|
|
7606
8196
|
*
|
|
7607
8197
|
* ```ts
|
|
@@ -7635,6 +8225,10 @@ export declare const Class: {
|
|
|
7635
8225
|
* console.log(dog.breed) // "Labrador"
|
|
7636
8226
|
* ```
|
|
7637
8227
|
*
|
|
8228
|
+
* @see {@link TaggedClass} for adding a `_tag` literal field to the class schema
|
|
8229
|
+
* @see {@link ErrorClass} for defining schema-backed error classes
|
|
8230
|
+
* @see {@link TaggedErrorClass} for defining tagged schema-backed error classes
|
|
8231
|
+
*
|
|
7638
8232
|
* @category constructors
|
|
7639
8233
|
* @since 3.10.0
|
|
7640
8234
|
*/
|
|
@@ -7642,13 +8236,23 @@ export declare const Class: {
|
|
|
7642
8236
|
/**
|
|
7643
8237
|
* Creates a schema-backed class whose constructor validates input against a
|
|
7644
8238
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
7645
|
-
* input
|
|
8239
|
+
* input.
|
|
8240
|
+
*
|
|
8241
|
+
* **When to use**
|
|
8242
|
+
*
|
|
8243
|
+
* Use to define a schema-backed data class when you want validated
|
|
8244
|
+
* construction, schema-derived decoding/encoding, and class-style methods or
|
|
8245
|
+
* inheritance.
|
|
7646
8246
|
*
|
|
7647
8247
|
* **Details**
|
|
7648
8248
|
*
|
|
7649
8249
|
* Pass the desired class type as the first type parameter. The second optional
|
|
7650
8250
|
* type parameter can be used to add nominal brands.
|
|
7651
8251
|
*
|
|
8252
|
+
* **Gotchas**
|
|
8253
|
+
*
|
|
8254
|
+
* Passing `disableChecks` in the options skips constructor validation.
|
|
8255
|
+
*
|
|
7652
8256
|
* **Example** (Basic class)
|
|
7653
8257
|
*
|
|
7654
8258
|
* ```ts
|
|
@@ -7682,6 +8286,10 @@ export declare const Class: {
|
|
|
7682
8286
|
* console.log(dog.breed) // "Labrador"
|
|
7683
8287
|
* ```
|
|
7684
8288
|
*
|
|
8289
|
+
* @see {@link TaggedClass} for adding a `_tag` literal field to the class schema
|
|
8290
|
+
* @see {@link ErrorClass} for defining schema-backed error classes
|
|
8291
|
+
* @see {@link TaggedErrorClass} for defining tagged schema-backed error classes
|
|
8292
|
+
*
|
|
7685
8293
|
* @category constructors
|
|
7686
8294
|
* @since 3.10.0
|
|
7687
8295
|
*/
|
|
@@ -7689,9 +8297,12 @@ export declare const Class: {
|
|
|
7689
8297
|
};
|
|
7690
8298
|
};
|
|
7691
8299
|
/**
|
|
7692
|
-
*
|
|
7693
|
-
*
|
|
7694
|
-
*
|
|
8300
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8301
|
+
*
|
|
8302
|
+
* **When to use**
|
|
8303
|
+
*
|
|
8304
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8305
|
+
* in tagged union matching.
|
|
7695
8306
|
*
|
|
7696
8307
|
* **Details**
|
|
7697
8308
|
*
|
|
@@ -7717,9 +8328,12 @@ export declare const Class: {
|
|
|
7717
8328
|
*/
|
|
7718
8329
|
export declare const TaggedClass: {
|
|
7719
8330
|
/**
|
|
7720
|
-
*
|
|
7721
|
-
*
|
|
7722
|
-
*
|
|
8331
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8332
|
+
*
|
|
8333
|
+
* **When to use**
|
|
8334
|
+
*
|
|
8335
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8336
|
+
* in tagged union matching.
|
|
7723
8337
|
*
|
|
7724
8338
|
* **Details**
|
|
7725
8339
|
*
|
|
@@ -7745,9 +8359,12 @@ export declare const TaggedClass: {
|
|
|
7745
8359
|
*/
|
|
7746
8360
|
<Self = never, Brand = {}>(identifier?: string): {
|
|
7747
8361
|
/**
|
|
7748
|
-
*
|
|
7749
|
-
*
|
|
7750
|
-
*
|
|
8362
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8363
|
+
*
|
|
8364
|
+
* **When to use**
|
|
8365
|
+
*
|
|
8366
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8367
|
+
* in tagged union matching.
|
|
7751
8368
|
*
|
|
7752
8369
|
* **Details**
|
|
7753
8370
|
*
|
|
@@ -7773,9 +8390,12 @@ export declare const TaggedClass: {
|
|
|
7773
8390
|
*/
|
|
7774
8391
|
<Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedClass"> : Class<Self, TaggedStruct<Tag, Fields>, Brand>;
|
|
7775
8392
|
/**
|
|
7776
|
-
*
|
|
7777
|
-
*
|
|
7778
|
-
*
|
|
8393
|
+
* Defines a schema-backed class with an automatically populated `_tag` field.
|
|
8394
|
+
*
|
|
8395
|
+
* **When to use**
|
|
8396
|
+
*
|
|
8397
|
+
* Use to define class instances that are validated by a schema and participate
|
|
8398
|
+
* in tagged union matching.
|
|
7779
8399
|
*
|
|
7780
8400
|
* **Details**
|
|
7781
8401
|
*
|
|
@@ -7905,9 +8525,13 @@ export declare const ErrorClass: {
|
|
|
7905
8525
|
};
|
|
7906
8526
|
};
|
|
7907
8527
|
/**
|
|
7908
|
-
*
|
|
7909
|
-
*
|
|
7910
|
-
*
|
|
8528
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8529
|
+
* `_tag` field.
|
|
8530
|
+
*
|
|
8531
|
+
* **When to use**
|
|
8532
|
+
*
|
|
8533
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8534
|
+
* and matched as tagged union members.
|
|
7911
8535
|
*
|
|
7912
8536
|
* **Example** (Tagged error class)
|
|
7913
8537
|
*
|
|
@@ -7928,9 +8552,13 @@ export declare const ErrorClass: {
|
|
|
7928
8552
|
*/
|
|
7929
8553
|
export declare const TaggedErrorClass: {
|
|
7930
8554
|
/**
|
|
7931
|
-
*
|
|
7932
|
-
*
|
|
7933
|
-
*
|
|
8555
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8556
|
+
* `_tag` field.
|
|
8557
|
+
*
|
|
8558
|
+
* **When to use**
|
|
8559
|
+
*
|
|
8560
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8561
|
+
* and matched as tagged union members.
|
|
7934
8562
|
*
|
|
7935
8563
|
* **Example** (Tagged error class)
|
|
7936
8564
|
*
|
|
@@ -7951,9 +8579,13 @@ export declare const TaggedErrorClass: {
|
|
|
7951
8579
|
*/
|
|
7952
8580
|
<Self = never, Brand = {}>(identifier?: string): {
|
|
7953
8581
|
/**
|
|
7954
|
-
*
|
|
7955
|
-
*
|
|
7956
|
-
*
|
|
8582
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8583
|
+
* `_tag` field.
|
|
8584
|
+
*
|
|
8585
|
+
* **When to use**
|
|
8586
|
+
*
|
|
8587
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8588
|
+
* and matched as tagged union members.
|
|
7957
8589
|
*
|
|
7958
8590
|
* **Example** (Tagged error class)
|
|
7959
8591
|
*
|
|
@@ -7974,9 +8606,13 @@ export declare const TaggedErrorClass: {
|
|
|
7974
8606
|
*/
|
|
7975
8607
|
<Tag extends string, const Fields extends Struct.Fields>(tag: Tag, fields: Fields, annotations?: Annotations.Declaration<Self, readonly [TaggedStruct<Tag, Fields>]>): [Self] extends [never] ? MissingSelfGeneric<"Schema.TaggedErrorClass"> : Class<Self, TaggedStruct<Tag, Fields>, Cause_.YieldableError & Brand>;
|
|
7976
8608
|
/**
|
|
7977
|
-
*
|
|
7978
|
-
*
|
|
7979
|
-
*
|
|
8609
|
+
* Defines a schema-backed yieldable error class with an automatically populated
|
|
8610
|
+
* `_tag` field.
|
|
8611
|
+
*
|
|
8612
|
+
* **When to use**
|
|
8613
|
+
*
|
|
8614
|
+
* Use to define typed errors that are schema validated, yielded in `Effect.gen`,
|
|
8615
|
+
* and matched as tagged union members.
|
|
7980
8616
|
*
|
|
7981
8617
|
* **Example** (Tagged error class)
|
|
7982
8618
|
*
|
|
@@ -8047,7 +8683,7 @@ export declare function toArbitraryLazy<S extends Top>(schema: S): LazyArbitrary
|
|
|
8047
8683
|
*/
|
|
8048
8684
|
export declare function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitrary<S["Type"]>;
|
|
8049
8685
|
/**
|
|
8050
|
-
*
|
|
8686
|
+
* Attaches a custom formatter used by `toFormatter`.
|
|
8051
8687
|
*
|
|
8052
8688
|
* **Details**
|
|
8053
8689
|
*
|
|
@@ -8077,8 +8713,12 @@ export declare function toFormatter<T>(schema: Schema<T>, options?: {
|
|
|
8077
8713
|
}): Formatter<T>;
|
|
8078
8714
|
/**
|
|
8079
8715
|
* Overrides the equivalence derivation for a schema by supplying a custom
|
|
8080
|
-
* `Equivalence`.
|
|
8081
|
-
*
|
|
8716
|
+
* `Equivalence`.
|
|
8717
|
+
*
|
|
8718
|
+
* **When to use**
|
|
8719
|
+
*
|
|
8720
|
+
* Use when the default structural equivalence derived by {@link toEquivalence}
|
|
8721
|
+
* is not appropriate for a type.
|
|
8082
8722
|
*
|
|
8083
8723
|
* @category Equivalence
|
|
8084
8724
|
* @since 4.0.0
|
|
@@ -8116,7 +8756,7 @@ export declare function toRepresentation(schema: Top): SchemaRepresentation.Docu
|
|
|
8116
8756
|
/**
|
|
8117
8757
|
* Options for {@link toJsonSchemaDocument}.
|
|
8118
8758
|
*
|
|
8119
|
-
* @category
|
|
8759
|
+
* @category JsonSchema
|
|
8120
8760
|
* @since 4.0.0
|
|
8121
8761
|
*/
|
|
8122
8762
|
export interface ToJsonSchemaOptions {
|
|
@@ -8137,6 +8777,54 @@ export interface ToJsonSchemaOptions {
|
|
|
8137
8777
|
* provided them) based on the `expected` annotation of the check.
|
|
8138
8778
|
*/
|
|
8139
8779
|
readonly generateDescriptions?: boolean | undefined;
|
|
8780
|
+
/**
|
|
8781
|
+
* A predicate that controls which additional annotation keys (beyond the
|
|
8782
|
+
* standard JSON Schema keys) are included in the generated output.
|
|
8783
|
+
*
|
|
8784
|
+
* **When to use**
|
|
8785
|
+
*
|
|
8786
|
+
* Use when you need to include non-standard annotation keys in the generated
|
|
8787
|
+
* JSON Schema, such as Monaco Editor properties (`markdownDescription`,
|
|
8788
|
+
* `defaultSnippets`) or vendor extensions (`x-*`).
|
|
8789
|
+
*
|
|
8790
|
+
* **Details**
|
|
8791
|
+
*
|
|
8792
|
+
* Standard JSON Schema keys (`title`, `description`, `default`, `examples`,
|
|
8793
|
+
* `readOnly`, `writeOnly`, `format`, `contentEncoding`, `contentMediaType`,
|
|
8794
|
+
* `contentSchema`) are always included. This predicate is checked for any
|
|
8795
|
+
* *other* annotation key.
|
|
8796
|
+
*
|
|
8797
|
+
* **Gotchas**
|
|
8798
|
+
*
|
|
8799
|
+
* Prefer whitelisting the custom annotation keys you want to emit instead of
|
|
8800
|
+
* using a broad predicate such as `() => true`, because broad predicates can
|
|
8801
|
+
* include Effect-specific annotations that are preserved for internal schema
|
|
8802
|
+
* generation.
|
|
8803
|
+
*
|
|
8804
|
+
* **Example** (Including custom annotations)
|
|
8805
|
+
*
|
|
8806
|
+
* ```ts
|
|
8807
|
+
* import { Schema } from "effect"
|
|
8808
|
+
*
|
|
8809
|
+
* const schema = Schema.String.annotate({
|
|
8810
|
+
* description: "A name",
|
|
8811
|
+
* markdownDescription: "The **name** field"
|
|
8812
|
+
* })
|
|
8813
|
+
*
|
|
8814
|
+
* const doc = Schema.toJsonSchemaDocument(schema, {
|
|
8815
|
+
* includeAnnotationKey: (key) =>
|
|
8816
|
+
* key === "markdownDescription" || key.startsWith("x-")
|
|
8817
|
+
* })
|
|
8818
|
+
*
|
|
8819
|
+
* console.log(doc.schema)
|
|
8820
|
+
* // {
|
|
8821
|
+
* // type: "string",
|
|
8822
|
+
* // description: "A name",
|
|
8823
|
+
* // markdownDescription: "The **name** field"
|
|
8824
|
+
* // }
|
|
8825
|
+
* ```
|
|
8826
|
+
*/
|
|
8827
|
+
readonly includeAnnotationKey?: ((key: string) => boolean) | undefined;
|
|
8140
8828
|
}
|
|
8141
8829
|
/**
|
|
8142
8830
|
* Returns a JSON Schema document using draft 2020-12.
|
|
@@ -8176,8 +8864,8 @@ export declare function toCodecIso<S extends Top>(schema: S): Codec<S["Type"], S
|
|
|
8176
8864
|
*/
|
|
8177
8865
|
export type StringTree = Tree<string | undefined>;
|
|
8178
8866
|
/**
|
|
8179
|
-
*
|
|
8180
|
-
* preserving the original structure.
|
|
8867
|
+
* Converts a schema to the StringTree canonical codec, where every leaf value
|
|
8868
|
+
* becomes a string while preserving the original structure.
|
|
8181
8869
|
*
|
|
8182
8870
|
* **Details**
|
|
8183
8871
|
*
|
|
@@ -8257,12 +8945,19 @@ export interface overrideToCodecIso<S extends Top, Iso> extends Bottom<S["Type"]
|
|
|
8257
8945
|
readonly schema: S;
|
|
8258
8946
|
}
|
|
8259
8947
|
/**
|
|
8260
|
-
* Overrides
|
|
8261
|
-
*
|
|
8262
|
-
*
|
|
8263
|
-
*
|
|
8948
|
+
* Overrides a schema's derived ISO codec with an explicit target codec.
|
|
8949
|
+
*
|
|
8950
|
+
* **When to use**
|
|
8951
|
+
*
|
|
8952
|
+
* Use to provide a custom ISO transformation when the default derivation is not
|
|
8264
8953
|
* appropriate.
|
|
8265
8954
|
*
|
|
8955
|
+
* **Details**
|
|
8956
|
+
*
|
|
8957
|
+
* The resulting schema carries a custom `Iso` type parameter and uses the
|
|
8958
|
+
* provided `decode` and `encode` getters to transform between the schema type
|
|
8959
|
+
* and the target codec.
|
|
8960
|
+
*
|
|
8266
8961
|
* @category Optic
|
|
8267
8962
|
* @since 4.0.0
|
|
8268
8963
|
*/
|