effect 4.0.0-beta.78 → 4.0.0-beta.79
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.map +1 -1
- package/dist/Array.js +6 -81
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +5 -55
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +5 -55
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +5 -64
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +5 -64
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +5 -52
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +5 -52
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +0 -44
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +5 -44
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +6 -72
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +6 -72
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +6 -67
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +6 -67
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +5 -41
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +6 -67
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +6 -67
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +4 -56
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +6 -57
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +5 -69
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +6 -75
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +6 -75
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +6 -70
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +8 -47
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +5 -41
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +6 -50
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +6 -50
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +5 -72
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +8 -48
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +5 -58
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +4 -35
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +4 -35
- package/dist/Duration.d.ts +6 -46
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +6 -46
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +227 -103
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +172 -18
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +4 -34
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +5 -46
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +6 -66
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +6 -48
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +8 -47
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +6 -79
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +6 -53
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +5 -52
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +8 -38
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +7 -34
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +6 -36
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +8 -51
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +8 -33
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +6 -49
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +5 -43
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +5 -48
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +69 -61
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +6 -48
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +7 -49
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +6 -69
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +6 -69
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +6 -56
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +7 -36
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +7 -36
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +6 -60
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +5 -50
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +5 -50
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +0 -53
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +4 -49
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +4 -49
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +6 -82
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +5 -31
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +6 -38
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +7 -32
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +7 -32
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +4 -35
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +6 -80
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +6 -36
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +8 -42
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +8 -81
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +8 -81
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +6 -35
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +5 -63
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +6 -46
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +7 -30
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +8 -61
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +0 -135
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +0 -135
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +4 -55
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +4 -55
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +9 -91
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +9 -91
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +8 -69
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +8 -69
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +8 -76
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +5 -31
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +0 -28
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +0 -28
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +7 -29
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +6 -28
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +0 -11
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +0 -11
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +7 -29
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +7 -29
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +6 -61
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +0 -40
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +0 -40
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +8 -56
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +8 -56
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +8 -25
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +8 -25
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +5 -62
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +5 -62
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +5 -39
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +6 -74
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +9 -17
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +9 -17
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +6 -36
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +6 -71
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +6 -71
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +0 -58
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +8 -41
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +8 -41
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +5 -64
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +5 -64
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +8 -49
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +8 -49
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +0 -49
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +0 -26
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +6 -41
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +6 -41
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +5 -30
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +6 -64
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +6 -64
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +7 -55
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +5 -61
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +6 -17
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +6 -17
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +257 -166
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +347 -361
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +18 -73
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +83 -89
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +9 -83
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +9 -83
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +8 -76
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +23 -43
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +10 -84
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +9 -82
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +9 -82
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +5 -33
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +6 -41
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +6 -41
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +8 -23
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +6 -18
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +6 -18
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +8 -30
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +6 -29
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +7 -26
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +7 -26
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +8 -79
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +8 -79
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +5 -63
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +5 -63
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +8 -71
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +9 -71
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +6 -53
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +6 -53
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +0 -17
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +0 -17
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +8 -21
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +8 -21
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +0 -24
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +7 -28
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +6 -36
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +6 -36
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +6 -49
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +8 -66
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +8 -66
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +8 -40
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +8 -40
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +0 -18
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +0 -18
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +6 -23
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +6 -23
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +10 -19
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +10 -19
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +9 -29
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +9 -29
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +6 -44
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +6 -44
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +8 -48
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +8 -40
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +8 -40
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +9 -59
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +9 -59
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +6 -34
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +6 -34
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +7 -35
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +7 -35
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +6 -48
- package/dist/Types.d.ts.map +1 -1
- package/dist/Types.js +5 -47
- package/dist/UndefinedOr.d.ts +8 -55
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +8 -55
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +8 -29
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +8 -29
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +8 -55
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +20 -14
- package/dist/Utils.js.map +1 -1
- package/dist/internal/effect.js +5 -3
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/option.js +5 -3
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/schema/arbitrary.d.ts +4 -1
- package/dist/internal/schema/arbitrary.d.ts.map +1 -1
- package/dist/internal/schema/arbitrary.js +655 -170
- package/dist/internal/schema/arbitrary.js.map +1 -1
- package/dist/internal/schema/representation.js +1 -1
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +5 -6
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +5 -6
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +8 -23
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +7 -36
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +6 -63
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +9 -78
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +9 -78
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +7 -32
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +0 -46
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +8 -45
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +8 -45
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +6 -44
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +6 -44
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +8 -27
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +8 -27
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +8 -22
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +8 -49
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +8 -49
- 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 +9 -50
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +6 -50
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +8 -49
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +0 -26
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +0 -26
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +6 -30
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +6 -30
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +8 -46
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +8 -46
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +9 -54
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +9 -54
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +6 -20
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +8 -23
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +6 -19
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +6 -19
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +8 -27
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts.map +1 -1
- package/dist/unstable/cli/Completions.js +0 -24
- package/dist/unstable/cli/Completions.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +8 -18
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +8 -22
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +9 -23
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +6 -19
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/HelpDoc.js +6 -19
- package/dist/unstable/cli/Param.d.ts +8 -25
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +8 -25
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +8 -58
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +7 -22
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +6 -26
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +6 -26
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +5 -40
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +5 -40
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +6 -20
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +6 -20
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +0 -38
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +0 -38
- 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 +0 -16
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +0 -17
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +8 -31
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +0 -13
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +0 -13
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +0 -24
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +0 -24
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +7 -21
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +6 -20
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +7 -19
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +8 -22
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +0 -13
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +0 -13
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +7 -22
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +5 -32
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +5 -32
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +0 -32
- 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 +0 -20
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +0 -20
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +7 -23
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +7 -23
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +8 -37
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +7 -36
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +7 -19
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +3 -35
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +3 -35
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +4 -32
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +4 -32
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +6 -35
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +6 -35
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +8 -23
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +6 -21
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +6 -21
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +8 -29
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +7 -28
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +0 -17
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +0 -17
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +7 -39
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +7 -34
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +8 -35
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +0 -22
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +0 -22
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +8 -21
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +8 -21
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +0 -23
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +0 -23
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +0 -22
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +0 -22
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +8 -17
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +6 -19
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +7 -36
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +6 -27
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +0 -21
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +0 -21
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +18 -6
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +0 -17
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +0 -17
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +0 -24
- 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 +0 -17
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +0 -13
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +0 -13
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +5 -28
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +4 -28
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +4 -28
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +6 -37
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +3 -25
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +6 -21
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +6 -21
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +9 -32
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +6 -28
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +6 -28
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +5 -18
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +5 -18
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +4 -20
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +7 -17
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +8 -19
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +7 -35
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +6 -35
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +0 -26
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +6 -39
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +6 -39
- 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 +0 -29
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +7 -59
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +7 -59
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +0 -22
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +0 -22
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +0 -23
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +0 -23
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay.d.ts +6 -0
- package/dist/unstable/http/FindMyWay.d.ts.map +1 -1
- package/dist/unstable/http/FindMyWay.js +6 -0
- package/dist/unstable/http/FindMyWay.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +6 -52
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +9 -53
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +9 -53
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +9 -34
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +0 -20
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +4 -35
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +4 -35
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +6 -34
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +6 -34
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +6 -22
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +6 -22
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +5 -29
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +5 -29
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +6 -19
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +0 -13
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +0 -13
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +7 -39
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +6 -29
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +6 -29
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +6 -30
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +6 -30
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +8 -33
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- 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 +5 -29
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +8 -41
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +8 -41
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +6 -31
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +6 -31
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +0 -24
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +0 -24
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +6 -35
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +6 -35
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +5 -0
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts.map +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +5 -0
- package/dist/unstable/http/Multipasta/HeadersParser.js.map +1 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +5 -0
- package/dist/unstable/http/Multipasta/Node.d.ts.map +1 -1
- package/dist/unstable/http/Multipasta/Node.js +5 -0
- package/dist/unstable/http/Multipasta/Node.js.map +1 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +5 -0
- package/dist/unstable/http/Multipasta/Search.d.ts.map +1 -1
- package/dist/unstable/http/Multipasta/Search.js +5 -0
- package/dist/unstable/http/Multipasta/Search.js.map +1 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +5 -0
- package/dist/unstable/http/Multipasta/Web.d.ts.map +1 -1
- package/dist/unstable/http/Multipasta/Web.js +5 -0
- package/dist/unstable/http/Multipasta/Web.js.map +1 -1
- package/dist/unstable/http/Multipasta.d.ts +6 -0
- package/dist/unstable/http/Multipasta.d.ts.map +1 -1
- package/dist/unstable/http/Multipasta.js +6 -0
- package/dist/unstable/http/Multipasta.js.map +1 -1
- package/dist/unstable/http/Template.d.ts +5 -26
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +5 -26
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +5 -28
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +5 -28
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +4 -32
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +4 -32
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +5 -45
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +5 -39
- 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 +20 -43
- 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 +9 -51
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +1 -32
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +8 -34
- 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 +9 -48
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +9 -48
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +0 -24
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +0 -32
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +0 -32
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +0 -29
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +0 -29
- 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 +0 -24
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +5 -18
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +5 -39
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +5 -32
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +5 -22
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +5 -31
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +8 -20
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +5 -35
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +4 -26
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +4 -26
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +7 -20
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -41
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +8 -20
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +7 -19
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +5 -19
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +5 -28
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +5 -28
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +6 -22
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +5 -21
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +8 -24
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +17 -35
- 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 +6 -32
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +6 -38
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +7 -15
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +7 -15
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +8 -40
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +8 -40
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +8 -36
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +8 -36
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +6 -25
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +6 -25
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +4 -29
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +4 -29
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +7 -74
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +6 -73
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +6 -20
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +6 -20
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +8 -31
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +6 -37
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +6 -37
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +8 -40
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +0 -23
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +0 -23
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +5 -30
- 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 +0 -26
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +0 -28
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +0 -28
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +0 -25
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +0 -25
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +7 -33
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +6 -32
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +0 -24
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +0 -24
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +6 -30
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +20 -3
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +18 -17
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +5 -17
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +6 -21
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +6 -20
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +6 -20
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +5 -40
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +5 -19
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +6 -18
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +6 -18
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +7 -32
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +6 -14
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +6 -23
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +6 -23
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +3 -27
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +3 -27
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.js +0 -10
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +6 -34
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +0 -21
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +0 -21
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +6 -34
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +6 -34
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +4 -33
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +5 -30
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +5 -30
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +5 -18
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +5 -24
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +6 -18
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +0 -25
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +0 -25
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +1 -1
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +7 -19
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +8 -20
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +7 -23
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts +6 -23
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +6 -81
- package/src/BigDecimal.ts +5 -55
- package/src/BigInt.ts +5 -64
- package/src/Boolean.ts +5 -52
- package/src/Brand.ts +0 -44
- package/src/Cache.ts +5 -44
- package/src/Cause.ts +6 -72
- package/src/Channel.ts +6 -67
- package/src/ChannelSchema.ts +5 -41
- package/src/Chunk.ts +6 -67
- package/src/Clock.ts +4 -56
- package/src/Combiner.ts +6 -57
- package/src/Config.ts +5 -69
- package/src/ConfigProvider.ts +6 -75
- package/src/Console.ts +6 -70
- package/src/Context.ts +8 -47
- package/src/Cron.ts +5 -41
- package/src/Crypto.ts +6 -50
- package/src/Data.ts +5 -72
- package/src/DateTime.ts +8 -48
- package/src/Deferred.ts +5 -58
- package/src/Differ.ts +4 -35
- package/src/Duration.ts +6 -46
- package/src/Effect.ts +227 -103
- package/src/Effectable.ts +4 -34
- package/src/Encoding.ts +5 -46
- package/src/Equal.ts +6 -66
- package/src/Equivalence.ts +6 -48
- package/src/ErrorReporter.ts +8 -47
- package/src/ExecutionPlan.ts +6 -79
- package/src/Exit.ts +6 -53
- package/src/Fiber.ts +5 -52
- package/src/FiberHandle.ts +8 -38
- package/src/FiberMap.ts +7 -34
- package/src/FiberSet.ts +6 -36
- package/src/FileSystem.ts +8 -51
- package/src/Filter.ts +8 -33
- package/src/Formatter.ts +6 -49
- package/src/Function.ts +5 -43
- package/src/Graph.ts +79 -61
- package/src/HKT.ts +6 -48
- package/src/Hash.ts +7 -49
- package/src/HashMap.ts +6 -69
- package/src/HashRing.ts +6 -56
- package/src/HashSet.ts +7 -36
- package/src/Inspectable.ts +6 -60
- package/src/Iterable.ts +5 -50
- package/src/JsonPatch.ts +0 -53
- package/src/JsonPointer.ts +4 -49
- package/src/JsonSchema.ts +6 -82
- package/src/Latch.ts +5 -31
- package/src/Layer.ts +6 -38
- package/src/LayerMap.ts +7 -32
- package/src/LogLevel.ts +4 -35
- package/src/Logger.ts +6 -80
- package/src/ManagedRuntime.ts +6 -36
- package/src/Match.ts +8 -42
- package/src/Metric.ts +8 -81
- package/src/MutableHashMap.ts +6 -35
- package/src/MutableHashSet.ts +5 -63
- package/src/MutableList.ts +6 -46
- package/src/MutableRef.ts +7 -30
- package/src/Newtype.ts +8 -61
- package/src/NonEmptyIterable.ts +0 -135
- package/src/Number.ts +4 -55
- package/src/Optic.ts +9 -91
- package/src/Option.ts +8 -69
- package/src/Order.ts +8 -76
- package/src/Ordering.ts +5 -31
- package/src/PartitionedSemaphore.ts +0 -28
- package/src/Path.ts +7 -29
- package/src/Pipeable.ts +0 -11
- package/src/PlatformError.ts +7 -29
- package/src/Pool.ts +6 -42
- package/src/Predicate.ts +6 -61
- package/src/PrimaryKey.ts +0 -40
- package/src/PubSub.ts +8 -56
- package/src/Pull.ts +8 -25
- package/src/Queue.ts +5 -62
- package/src/Random.ts +18 -114
- package/src/RcMap.ts +9 -17
- package/src/RcRef.ts +6 -36
- package/src/Record.ts +6 -71
- package/src/Redactable.ts +0 -58
- package/src/Redacted.ts +8 -41
- package/src/Reducer.ts +5 -64
- package/src/Ref.ts +8 -49
- package/src/References.ts +0 -49
- package/src/RegExp.ts +0 -26
- package/src/Request.ts +6 -41
- package/src/RequestResolver.ts +6 -41
- package/src/Resource.ts +5 -30
- package/src/Result.ts +6 -64
- package/src/Runtime.ts +7 -55
- package/src/Schedule.ts +5 -61
- package/src/Scheduler.ts +6 -17
- package/src/Schema.ts +697 -397
- package/src/SchemaAST.ts +115 -91
- package/src/SchemaGetter.ts +9 -83
- package/src/SchemaIssue.ts +8 -76
- package/src/SchemaParser.ts +27 -43
- package/src/SchemaRepresentation.ts +10 -84
- package/src/SchemaTransformation.ts +9 -82
- package/src/SchemaUtils.ts +5 -33
- package/src/Scope.ts +6 -41
- package/src/ScopedCache.ts +8 -23
- package/src/ScopedRef.ts +6 -18
- package/src/Semaphore.ts +8 -30
- package/src/Sink.ts +6 -29
- package/src/Stdio.ts +7 -26
- package/src/Stream.ts +8 -79
- package/src/String.ts +5 -63
- package/src/Struct.ts +9 -71
- package/src/SubscriptionRef.ts +6 -53
- package/src/Symbol.ts +0 -17
- package/src/SynchronizedRef.ts +8 -21
- package/src/Take.ts +0 -24
- package/src/Terminal.ts +7 -28
- package/src/Tracer.ts +6 -36
- package/src/Trie.ts +6 -49
- package/src/Tuple.ts +8 -66
- package/src/TxChunk.ts +8 -40
- package/src/TxDeferred.ts +0 -18
- package/src/TxHashMap.ts +6 -23
- package/src/TxHashSet.ts +10 -19
- package/src/TxPriorityQueue.ts +9 -29
- package/src/TxPubSub.ts +6 -44
- package/src/TxQueue.ts +8 -48
- package/src/TxReentrantLock.ts +8 -40
- package/src/TxRef.ts +9 -59
- package/src/TxSemaphore.ts +6 -34
- package/src/TxSubscriptionRef.ts +7 -35
- package/src/Types.ts +6 -48
- package/src/UndefinedOr.ts +8 -55
- package/src/Unify.ts +8 -29
- package/src/Utils.ts +28 -68
- package/src/internal/effect.ts +9 -8
- package/src/internal/option.ts +31 -26
- package/src/internal/schema/arbitrary.ts +740 -173
- package/src/internal/schema/representation.ts +1 -1
- package/src/testing/FastCheck.ts +5 -6
- package/src/testing/TestClock.ts +8 -23
- package/src/testing/TestConsole.ts +7 -36
- package/src/testing/TestSchema.ts +6 -63
- package/src/unstable/ai/AiError.ts +9 -78
- package/src/unstable/ai/AnthropicStructuredOutput.ts +7 -32
- package/src/unstable/ai/Chat.ts +0 -46
- package/src/unstable/ai/EmbeddingModel.ts +8 -45
- package/src/unstable/ai/IdGenerator.ts +6 -44
- package/src/unstable/ai/LanguageModel.ts +9 -48
- package/src/unstable/ai/McpSchema.ts +8 -27
- package/src/unstable/ai/McpServer.ts +7 -21
- package/src/unstable/ai/Model.ts +8 -49
- package/src/unstable/ai/OpenAiStructuredOutput.ts +9 -49
- package/src/unstable/ai/Prompt.ts +6 -50
- package/src/unstable/ai/Response.ts +8 -49
- package/src/unstable/ai/ResponseIdTracker.ts +0 -26
- package/src/unstable/ai/Telemetry.ts +6 -30
- package/src/unstable/ai/Tokenizer.ts +8 -46
- package/src/unstable/ai/Tool.ts +9 -54
- package/src/unstable/ai/Toolkit.ts +6 -75
- package/src/unstable/cli/Argument.ts +6 -20
- package/src/unstable/cli/CliError.ts +8 -23
- package/src/unstable/cli/CliOutput.ts +6 -19
- package/src/unstable/cli/Command.ts +8 -27
- package/src/unstable/cli/Completions.ts +0 -24
- package/src/unstable/cli/Flag.ts +8 -18
- package/src/unstable/cli/GlobalFlag.ts +10 -22
- package/src/unstable/cli/HelpDoc.ts +6 -19
- package/src/unstable/cli/Param.ts +8 -25
- package/src/unstable/cli/Primitive.ts +8 -58
- package/src/unstable/cli/Prompt.ts +8 -23
- package/src/unstable/cluster/ClusterCron.ts +6 -26
- package/src/unstable/cluster/ClusterError.ts +5 -40
- package/src/unstable/cluster/ClusterMetrics.ts +6 -20
- package/src/unstable/cluster/ClusterSchema.ts +0 -38
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +0 -16
- package/src/unstable/cluster/DeliverAt.ts +0 -17
- package/src/unstable/cluster/Entity.ts +8 -31
- package/src/unstable/cluster/EntityAddress.ts +0 -13
- package/src/unstable/cluster/EntityId.ts +0 -24
- package/src/unstable/cluster/EntityProxy.ts +6 -20
- package/src/unstable/cluster/EntityProxyServer.ts +7 -19
- package/src/unstable/cluster/EntityResource.ts +8 -22
- package/src/unstable/cluster/EntityType.ts +0 -13
- package/src/unstable/cluster/Envelope.ts +7 -22
- package/src/unstable/cluster/HttpRunner.ts +5 -32
- package/src/unstable/cluster/K8sHttpClient.ts +0 -32
- package/src/unstable/cluster/MachineId.ts +0 -20
- package/src/unstable/cluster/Message.ts +7 -23
- package/src/unstable/cluster/MessageStorage.ts +7 -36
- package/src/unstable/cluster/Reply.ts +7 -19
- package/src/unstable/cluster/Runner.ts +3 -35
- package/src/unstable/cluster/RunnerAddress.ts +4 -32
- package/src/unstable/cluster/RunnerHealth.ts +6 -35
- package/src/unstable/cluster/RunnerServer.ts +8 -23
- package/src/unstable/cluster/RunnerStorage.ts +6 -21
- package/src/unstable/cluster/Runners.ts +7 -28
- package/src/unstable/cluster/ShardId.ts +0 -17
- package/src/unstable/cluster/Sharding.ts +7 -39
- package/src/unstable/cluster/ShardingConfig.ts +7 -34
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +0 -22
- package/src/unstable/cluster/SingleRunner.ts +7 -20
- package/src/unstable/cluster/Singleton.ts +0 -23
- package/src/unstable/cluster/SingletonAddress.ts +0 -22
- package/src/unstable/cluster/Snowflake.ts +7 -16
- package/src/unstable/cluster/SocketRunner.ts +6 -19
- package/src/unstable/cluster/SqlMessageStorage.ts +7 -36
- package/src/unstable/cluster/SqlRunnerStorage.ts +6 -27
- package/src/unstable/cluster/TestRunner.ts +0 -21
- package/src/unstable/cluster/internal/entityManager.ts +23 -5
- package/src/unstable/devtools/DevTools.ts +0 -17
- package/src/unstable/devtools/DevToolsClient.ts +0 -24
- package/src/unstable/devtools/DevToolsSchema.ts +0 -17
- package/src/unstable/devtools/DevToolsServer.ts +0 -13
- package/src/unstable/encoding/Msgpack.ts +5 -28
- package/src/unstable/encoding/Ndjson.ts +4 -28
- package/src/unstable/encoding/Sse.ts +6 -37
- package/src/unstable/eventlog/Event.ts +3 -25
- package/src/unstable/eventlog/EventGroup.ts +6 -21
- package/src/unstable/eventlog/EventJournal.ts +9 -32
- package/src/unstable/eventlog/EventLog.ts +6 -28
- package/src/unstable/eventlog/EventLogEncryption.ts +5 -18
- package/src/unstable/eventlog/EventLogMessage.ts +4 -20
- package/src/unstable/eventlog/EventLogRemote.ts +7 -17
- package/src/unstable/eventlog/EventLogServer.ts +3 -26
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +7 -18
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +7 -35
- package/src/unstable/eventlog/EventLogSessionAuth.ts +6 -35
- package/src/unstable/eventlog/SqlEventJournal.ts +0 -26
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +6 -39
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +0 -29
- package/src/unstable/http/Cookies.ts +6 -58
- package/src/unstable/http/Etag.ts +0 -22
- package/src/unstable/http/FetchHttpClient.ts +0 -23
- package/src/unstable/http/FindMyWay.ts +6 -0
- package/src/unstable/http/Headers.ts +9 -54
- package/src/unstable/http/HttpBody.ts +9 -53
- package/src/unstable/http/HttpClient.ts +9 -34
- package/src/unstable/http/HttpClientError.ts +0 -20
- package/src/unstable/http/HttpClientRequest.ts +4 -35
- package/src/unstable/http/HttpClientResponse.ts +6 -34
- package/src/unstable/http/HttpEffect.ts +5 -33
- package/src/unstable/http/HttpIncomingMessage.ts +6 -22
- package/src/unstable/http/HttpMethod.ts +5 -29
- package/src/unstable/http/HttpMiddleware.ts +6 -19
- package/src/unstable/http/HttpPlatform.ts +0 -13
- package/src/unstable/http/HttpRouter.ts +7 -39
- package/src/unstable/http/HttpServer.ts +6 -29
- package/src/unstable/http/HttpServerError.ts +6 -30
- package/src/unstable/http/HttpServerRequest.ts +7 -32
- package/src/unstable/http/HttpServerRespondable.ts +5 -29
- package/src/unstable/http/HttpServerResponse.ts +8 -41
- package/src/unstable/http/HttpStaticServer.ts +6 -31
- package/src/unstable/http/HttpTraceContext.ts +0 -24
- package/src/unstable/http/Multipart.ts +6 -35
- package/src/unstable/http/Multipasta/HeadersParser.ts +5 -0
- package/src/unstable/http/Multipasta/Node.ts +5 -0
- package/src/unstable/http/Multipasta/Search.ts +5 -0
- package/src/unstable/http/Multipasta/Web.ts +5 -0
- package/src/unstable/http/Multipasta.ts +6 -0
- package/src/unstable/http/Template.ts +5 -26
- package/src/unstable/http/Url.ts +5 -28
- package/src/unstable/http/UrlParams.ts +4 -32
- package/src/unstable/httpapi/HttpApi.ts +5 -45
- package/src/unstable/httpapi/HttpApiBuilder.ts +5 -39
- package/src/unstable/httpapi/HttpApiClient.ts +20 -43
- package/src/unstable/httpapi/HttpApiEndpoint.ts +9 -51
- package/src/unstable/httpapi/HttpApiError.ts +1 -32
- package/src/unstable/httpapi/HttpApiGroup.ts +8 -34
- package/src/unstable/httpapi/HttpApiMiddleware.ts +9 -48
- package/src/unstable/httpapi/HttpApiScalar.ts +0 -24
- package/src/unstable/httpapi/HttpApiSchema.ts +0 -32
- package/src/unstable/httpapi/HttpApiSecurity.ts +0 -29
- package/src/unstable/httpapi/HttpApiSwagger.ts +0 -24
- package/src/unstable/httpapi/HttpApiTest.ts +5 -18
- package/src/unstable/httpapi/OpenApi.ts +6 -40
- package/src/unstable/observability/Otlp.ts +5 -32
- package/src/unstable/observability/OtlpExporter.ts +5 -22
- package/src/unstable/observability/OtlpLogger.ts +5 -31
- package/src/unstable/observability/OtlpMetrics.ts +8 -20
- package/src/unstable/observability/OtlpResource.ts +5 -35
- package/src/unstable/observability/OtlpSerialization.ts +4 -26
- package/src/unstable/observability/OtlpTracer.ts +7 -20
- package/src/unstable/observability/PrometheusMetrics.ts +4 -41
- package/src/unstable/persistence/KeyValueStore.ts +8 -20
- package/src/unstable/persistence/Persistable.ts +4 -18
- package/src/unstable/persistence/PersistedCache.ts +5 -28
- package/src/unstable/persistence/PersistedQueue.ts +6 -22
- package/src/unstable/persistence/Persistence.ts +5 -21
- package/src/unstable/persistence/RateLimiter.ts +17 -35
- package/src/unstable/persistence/Redis.ts +6 -32
- package/src/unstable/process/ChildProcess.ts +6 -38
- package/src/unstable/process/ChildProcessSpawner.ts +7 -15
- package/src/unstable/reactivity/AsyncResult.ts +7 -39
- package/src/unstable/reactivity/Atom.ts +8 -36
- package/src/unstable/reactivity/AtomHttpApi.ts +6 -25
- package/src/unstable/reactivity/AtomRef.ts +4 -29
- package/src/unstable/reactivity/AtomRegistry.ts +6 -73
- package/src/unstable/reactivity/AtomRpc.ts +6 -20
- package/src/unstable/reactivity/Hydration.ts +8 -31
- package/src/unstable/reactivity/Reactivity.ts +6 -37
- package/src/unstable/rpc/Rpc.ts +8 -40
- package/src/unstable/rpc/RpcClient.ts +6 -32
- package/src/unstable/rpc/RpcClientError.ts +0 -23
- package/src/unstable/rpc/RpcGroup.ts +5 -30
- package/src/unstable/rpc/RpcMessage.ts +0 -26
- package/src/unstable/rpc/RpcMiddleware.ts +0 -28
- package/src/unstable/rpc/RpcSchema.ts +0 -25
- package/src/unstable/rpc/RpcSerialization.ts +6 -32
- package/src/unstable/rpc/RpcServer.ts +7 -40
- package/src/unstable/rpc/RpcTest.ts +0 -24
- package/src/unstable/rpc/RpcWorker.ts +6 -30
- package/src/unstable/rpc/Utils.ts +5 -21
- package/src/unstable/schema/Model.ts +28 -19
- package/src/unstable/schema/VariantSchema.ts +5 -17
- package/src/unstable/socket/Socket.ts +6 -21
- package/src/unstable/socket/SocketServer.ts +6 -20
- package/src/unstable/sql/Migrator.ts +5 -40
- package/src/unstable/sql/SqlClient.ts +5 -19
- package/src/unstable/sql/SqlConnection.ts +6 -18
- package/src/unstable/sql/SqlError.ts +7 -32
- package/src/unstable/sql/SqlModel.ts +6 -14
- package/src/unstable/sql/SqlResolver.ts +6 -23
- package/src/unstable/sql/SqlSchema.ts +3 -27
- package/src/unstable/sql/SqlStream.ts +0 -10
- package/src/unstable/sql/Statement.ts +6 -34
- package/src/unstable/workers/Transferable.ts +0 -21
- package/src/unstable/workers/Worker.ts +6 -34
- package/src/unstable/workers/WorkerError.ts +4 -33
- package/src/unstable/workers/WorkerRunner.ts +5 -30
- package/src/unstable/workflow/Activity.ts +5 -18
- package/src/unstable/workflow/DurableClock.ts +5 -24
- package/src/unstable/workflow/DurableDeferred.ts +6 -18
- package/src/unstable/workflow/DurableQueue.ts +0 -25
- package/src/unstable/workflow/Workflow.ts +9 -21
- package/src/unstable/workflow/WorkflowEngine.ts +7 -19
- package/src/unstable/workflow/WorkflowProxy.ts +7 -23
- package/src/unstable/workflow/WorkflowProxyServer.ts +6 -23
package/src/Schema.ts
CHANGED
|
@@ -1,85 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* ## Mental model
|
|
5
|
-
*
|
|
6
|
-
* - **Schema** — a description of a data shape. Every schema carries a decoded
|
|
7
|
-
* *Type* (the value you work with) and an *Encoded* representation (the
|
|
8
|
-
* serialized form, e.g. JSON).
|
|
9
|
-
* - **Decoding** — turning unknown external data (API responses, form
|
|
10
|
-
* submissions, config files) into typed, validated values.
|
|
11
|
-
* - **Encoding** — turning typed values back into a serializable format.
|
|
12
|
-
* - **Codec** — a schema that tracks both Type and Encoded, so it can decode
|
|
13
|
-
* *and* encode. Most concrete schemas are Codecs.
|
|
14
|
-
* - **Check / Filter** — a constraint attached to a schema (e.g. `isMinLength`,
|
|
15
|
-
* `isGreaterThan`). Attach them with `.check(...)`.
|
|
16
|
-
* - **Transformation** — a pair of functions (decode + encode) that convert
|
|
17
|
-
* values between two schemas. Created with {@link decodeTo} / {@link encodeTo}.
|
|
18
|
-
* - **Annotation** — metadata attached to a schema (title, description, custom
|
|
19
|
-
* keys). Attach with `.annotate(...)`.
|
|
20
|
-
*
|
|
21
|
-
* ## Common tasks
|
|
22
|
-
*
|
|
23
|
-
* - Define a struct: {@link Struct}
|
|
24
|
-
* - Define a union: {@link Union}, {@link TaggedUnion}, {@link Literals}
|
|
25
|
-
* - Define an array: {@link ArraySchema}, {@link NonEmptyArray}
|
|
26
|
-
* - Define a record: {@link Record}
|
|
27
|
-
* - Define a tuple: {@link Tuple}, {@link TupleWithRest}
|
|
28
|
-
* - Validate unknown data synchronously: {@link decodeUnknownSync}
|
|
29
|
-
* - Validate unknown data (Effect): {@link decodeUnknownEffect}
|
|
30
|
-
* - Encode a value: {@link encodeUnknownSync}, {@link encodeUnknownEffect}
|
|
31
|
-
* - Type guard: {@link is}
|
|
32
|
-
* - Assertion: {@link asserts}
|
|
33
|
-
* - Add constraints: `.check(...)` with filters like {@link isMinLength},
|
|
34
|
-
* {@link isGreaterThan}, {@link isPattern}, {@link isUUID}, {@link isGUID}
|
|
35
|
-
* - Transform between schemas: {@link decodeTo}, {@link encodeTo}
|
|
36
|
-
* - Add a default for missing keys: {@link withDecodingDefault}, {@link withDecodingDefaultKey}
|
|
37
|
-
* - Create branded types: {@link brand}
|
|
38
|
-
* - Define classes with validation: {@link Class}, {@link TaggedClass}
|
|
39
|
-
* - Define error classes: {@link ErrorClass}, {@link TaggedErrorClass}
|
|
40
|
-
* - Generate JSON Schema: {@link toJsonSchemaDocument}
|
|
41
|
-
* - Generate test data: {@link toArbitrary}
|
|
42
|
-
* - Derive equivalence: {@link toEquivalence}
|
|
43
|
-
*
|
|
44
|
-
* ## Gotchas
|
|
45
|
-
*
|
|
46
|
-
* - `Schema.optional` creates `T | undefined` (key can be missing *or*
|
|
47
|
-
* `undefined`). Use `Schema.optionalKey` for exact optional properties.
|
|
48
|
-
* - `decodeTo` is curried: use `from.pipe(Schema.decodeTo(to, ...))`.
|
|
49
|
-
* - `decodeUnknownSync` throws on failure. Use `decodeUnknownExit` or
|
|
50
|
-
* `decodeUnknownOption` for non-throwing alternatives.
|
|
51
|
-
* - Filters do not change the TypeScript type. Use {@link refine} or
|
|
52
|
-
* {@link brand} to narrow the type.
|
|
53
|
-
* - Recursive schemas require {@link suspend} to avoid infinite loops.
|
|
54
|
-
*
|
|
55
|
-
* ## Quickstart
|
|
56
|
-
*
|
|
57
|
-
* **Example** (Validate a user object)
|
|
2
|
+
* Describes data shapes and how unknown input becomes trusted values.
|
|
58
3
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* })
|
|
67
|
-
*
|
|
68
|
-
* // Decode unknown input — throws on failure
|
|
69
|
-
* const user = Schema.decodeUnknownSync(User)({
|
|
70
|
-
* name: "Alice",
|
|
71
|
-
* age: 30
|
|
72
|
-
* })
|
|
73
|
-
*
|
|
74
|
-
* console.log(user)
|
|
75
|
-
* // { name: "Alice", age: 30 }
|
|
76
|
-
* ```
|
|
77
|
-
*
|
|
78
|
-
* @see {@link Schema} — type-level view tracking only the decoded Type
|
|
79
|
-
* @see {@link Codec} — type-level view tracking both Type and Encoded
|
|
80
|
-
* @see {@link Struct} — define object shapes
|
|
81
|
-
* @see {@link decodeUnknownSync} — synchronous validation
|
|
82
|
-
* @see {@link decodeTo} — schema transformations
|
|
4
|
+
* A schema can validate input, decode it into an application type, and encode
|
|
5
|
+
* that value back to another representation. This module contains the main
|
|
6
|
+
* schema, codec, decoder, and encoder APIs, together with schemas for common
|
|
7
|
+
* JavaScript values and Effect data types. It also supports refinements,
|
|
8
|
+
* transformations, defaults, classes, JSON Schema generation, test data
|
|
9
|
+
* generation, formatting, equivalence, optics, and differs derived from schema
|
|
10
|
+
* definitions.
|
|
83
11
|
*
|
|
84
12
|
* @since 4.0.0
|
|
85
13
|
*/
|
|
@@ -3197,6 +3125,9 @@ export interface encodeKeys<
|
|
|
3197
3125
|
>
|
|
3198
3126
|
{}
|
|
3199
3127
|
|
|
3128
|
+
const canonicalPropertyKey = (key: PropertyKey): string | symbol =>
|
|
3129
|
+
typeof key === "symbol" ? key : globalThis.String(key)
|
|
3130
|
+
|
|
3200
3131
|
/**
|
|
3201
3132
|
* Renames struct keys in the encoded form without changing the decoded type.
|
|
3202
3133
|
*
|
|
@@ -3205,6 +3136,8 @@ export interface encodeKeys<
|
|
|
3205
3136
|
* Takes a partial mapping `{ decodedKey: encodedKey }` and produces a
|
|
3206
3137
|
* transformation schema that decodes from the renamed keys and encodes back to
|
|
3207
3138
|
* the renamed keys. Keys not present in the mapping are left unchanged.
|
|
3139
|
+
* If two existing fields would produce the same encoded key, construction
|
|
3140
|
+
* fails.
|
|
3208
3141
|
*
|
|
3209
3142
|
* **Example** (Rename `name` to `full_name` in the encoded form)
|
|
3210
3143
|
*
|
|
@@ -3229,21 +3162,29 @@ export function encodeKeys<
|
|
|
3229
3162
|
>(mapping: M) {
|
|
3230
3163
|
return function(self: S): encodeKeys<S, M> {
|
|
3231
3164
|
const fields: any = {}
|
|
3165
|
+
const appliedMapping: any = {}
|
|
3232
3166
|
const reverseMapping: any = {}
|
|
3233
|
-
|
|
3167
|
+
const seenEncodedKeys = new Set<string | symbol>()
|
|
3168
|
+
for (const k of Reflect.ownKeys(self.fields)) {
|
|
3234
3169
|
const encoded = toEncoded(self.fields[k])
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3170
|
+
const hasMapping = Object.hasOwn(mapping, k)
|
|
3171
|
+
const encodedKey = hasMapping ? (mapping as any)[k] as PropertyKey : k
|
|
3172
|
+
const canonical = canonicalPropertyKey(encodedKey)
|
|
3173
|
+
if (seenEncodedKeys.has(canonical)) {
|
|
3174
|
+
throw new globalThis.Error(`Duplicate encoded keys: ${formatPropertyKey(encodedKey)}`)
|
|
3175
|
+
}
|
|
3176
|
+
seenEncodedKeys.add(canonical)
|
|
3177
|
+
fields[encodedKey] = encoded
|
|
3178
|
+
if (hasMapping) {
|
|
3179
|
+
appliedMapping[k] = encodedKey
|
|
3180
|
+
reverseMapping[encodedKey] = k
|
|
3240
3181
|
}
|
|
3241
3182
|
}
|
|
3242
3183
|
return Struct(fields).pipe(decodeTo(
|
|
3243
3184
|
self,
|
|
3244
3185
|
SchemaTransformation.transform<any, any>({
|
|
3245
3186
|
decode: Struct_.renameKeys(reverseMapping),
|
|
3246
|
-
encode: Struct_.renameKeys(
|
|
3187
|
+
encode: Struct_.renameKeys(appliedMapping)
|
|
3247
3188
|
})
|
|
3248
3189
|
)) as any
|
|
3249
3190
|
}
|
|
@@ -6151,8 +6092,8 @@ export function isTrimmed(annotations?: Annotations.Filter) {
|
|
|
6151
6092
|
_tag: "isTrimmed",
|
|
6152
6093
|
regExp: new globalThis.RegExp(TRIMMED_PATTERN)
|
|
6153
6094
|
},
|
|
6154
|
-
|
|
6155
|
-
|
|
6095
|
+
arbitrary: {
|
|
6096
|
+
constraint: {
|
|
6156
6097
|
patterns: [TRIMMED_PATTERN]
|
|
6157
6098
|
}
|
|
6158
6099
|
},
|
|
@@ -6458,8 +6399,8 @@ export function isStartsWith(startsWith: string, annotations?: Annotations.Filte
|
|
|
6458
6399
|
startsWith,
|
|
6459
6400
|
regExp: new globalThis.RegExp(`^${startsWith}`)
|
|
6460
6401
|
},
|
|
6461
|
-
|
|
6462
|
-
|
|
6402
|
+
arbitrary: {
|
|
6403
|
+
constraint: {
|
|
6463
6404
|
patterns: [`^${startsWith}`]
|
|
6464
6405
|
}
|
|
6465
6406
|
},
|
|
@@ -6492,8 +6433,8 @@ export function isEndsWith(endsWith: string, annotations?: Annotations.Filter) {
|
|
|
6492
6433
|
endsWith,
|
|
6493
6434
|
regExp: new globalThis.RegExp(`${endsWith}$`)
|
|
6494
6435
|
},
|
|
6495
|
-
|
|
6496
|
-
|
|
6436
|
+
arbitrary: {
|
|
6437
|
+
constraint: {
|
|
6497
6438
|
patterns: [`${endsWith}$`]
|
|
6498
6439
|
}
|
|
6499
6440
|
},
|
|
@@ -6526,8 +6467,8 @@ export function isIncludes(includes: string, annotations?: Annotations.Filter) {
|
|
|
6526
6467
|
includes,
|
|
6527
6468
|
regExp: new globalThis.RegExp(includes)
|
|
6528
6469
|
},
|
|
6529
|
-
|
|
6530
|
-
|
|
6470
|
+
arbitrary: {
|
|
6471
|
+
constraint: {
|
|
6531
6472
|
patterns: [includes]
|
|
6532
6473
|
}
|
|
6533
6474
|
},
|
|
@@ -6559,8 +6500,8 @@ export function isUppercased(annotations?: Annotations.Filter) {
|
|
|
6559
6500
|
_tag: "isUppercased",
|
|
6560
6501
|
regExp: new globalThis.RegExp(UPPERCASED_PATTERN)
|
|
6561
6502
|
},
|
|
6562
|
-
|
|
6563
|
-
|
|
6503
|
+
arbitrary: {
|
|
6504
|
+
constraint: {
|
|
6564
6505
|
patterns: [UPPERCASED_PATTERN]
|
|
6565
6506
|
}
|
|
6566
6507
|
},
|
|
@@ -6592,8 +6533,8 @@ export function isLowercased(annotations?: Annotations.Filter) {
|
|
|
6592
6533
|
_tag: "isLowercased",
|
|
6593
6534
|
regExp: new globalThis.RegExp(LOWERCASED_PATTERN)
|
|
6594
6535
|
},
|
|
6595
|
-
|
|
6596
|
-
|
|
6536
|
+
arbitrary: {
|
|
6537
|
+
constraint: {
|
|
6597
6538
|
patterns: [LOWERCASED_PATTERN]
|
|
6598
6539
|
}
|
|
6599
6540
|
},
|
|
@@ -6625,8 +6566,8 @@ export function isCapitalized(annotations?: Annotations.Filter) {
|
|
|
6625
6566
|
_tag: "isCapitalized",
|
|
6626
6567
|
regExp: new globalThis.RegExp(CAPITALIZED_PATTERN)
|
|
6627
6568
|
},
|
|
6628
|
-
|
|
6629
|
-
|
|
6569
|
+
arbitrary: {
|
|
6570
|
+
constraint: {
|
|
6630
6571
|
patterns: [CAPITALIZED_PATTERN]
|
|
6631
6572
|
}
|
|
6632
6573
|
},
|
|
@@ -6658,8 +6599,8 @@ export function isUncapitalized(annotations?: Annotations.Filter) {
|
|
|
6658
6599
|
_tag: "isUncapitalized",
|
|
6659
6600
|
regExp: new globalThis.RegExp(UNCAPITALIZED_PATTERN)
|
|
6660
6601
|
},
|
|
6661
|
-
|
|
6662
|
-
|
|
6602
|
+
arbitrary: {
|
|
6603
|
+
constraint: {
|
|
6663
6604
|
patterns: [UNCAPITALIZED_PATTERN]
|
|
6664
6605
|
}
|
|
6665
6606
|
},
|
|
@@ -6680,8 +6621,8 @@ export function isUncapitalized(annotations?: Annotations.Filter) {
|
|
|
6680
6621
|
*
|
|
6681
6622
|
* Arbitrary:
|
|
6682
6623
|
*
|
|
6683
|
-
* When generating test data with fast-check, this applies `
|
|
6684
|
-
*
|
|
6624
|
+
* When generating test data with fast-check, this applies `noNaN: true` and
|
|
6625
|
+
* `noInfinity: true` constraints to ensure generated numbers are finite.
|
|
6685
6626
|
*
|
|
6686
6627
|
* @category Number checks
|
|
6687
6628
|
* @since 4.0.0
|
|
@@ -6694,9 +6635,9 @@ export function isFinite(annotations?: Annotations.Filter) {
|
|
|
6694
6635
|
meta: {
|
|
6695
6636
|
_tag: "isFinite"
|
|
6696
6637
|
},
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6638
|
+
arbitrary: {
|
|
6639
|
+
constraint: {
|
|
6640
|
+
noInfinity: true,
|
|
6700
6641
|
noNaN: true
|
|
6701
6642
|
}
|
|
6702
6643
|
},
|
|
@@ -6724,6 +6665,15 @@ export function makeIsGreaterThan<T>(options: {
|
|
|
6724
6665
|
(input) => gt(input, exclusiveMinimum),
|
|
6725
6666
|
{
|
|
6726
6667
|
expected: `a value greater than ${formatter(exclusiveMinimum)}`,
|
|
6668
|
+
arbitrary: {
|
|
6669
|
+
constraint: {
|
|
6670
|
+
ordered: {
|
|
6671
|
+
order: options.order,
|
|
6672
|
+
minimum: exclusiveMinimum,
|
|
6673
|
+
exclusiveMinimum: true
|
|
6674
|
+
}
|
|
6675
|
+
}
|
|
6676
|
+
},
|
|
6727
6677
|
...options.annotate?.(exclusiveMinimum),
|
|
6728
6678
|
...annotations
|
|
6729
6679
|
}
|
|
@@ -6750,6 +6700,14 @@ export function makeIsGreaterThanOrEqualTo<T>(options: {
|
|
|
6750
6700
|
(input) => gte(input, minimum),
|
|
6751
6701
|
{
|
|
6752
6702
|
expected: `a value greater than or equal to ${formatter(minimum)}`,
|
|
6703
|
+
arbitrary: {
|
|
6704
|
+
constraint: {
|
|
6705
|
+
ordered: {
|
|
6706
|
+
order: options.order,
|
|
6707
|
+
minimum
|
|
6708
|
+
}
|
|
6709
|
+
}
|
|
6710
|
+
},
|
|
6753
6711
|
...options.annotate?.(minimum),
|
|
6754
6712
|
...annotations
|
|
6755
6713
|
}
|
|
@@ -6776,6 +6734,15 @@ export function makeIsLessThan<T>(options: {
|
|
|
6776
6734
|
(input) => lt(input, exclusiveMaximum),
|
|
6777
6735
|
{
|
|
6778
6736
|
expected: `a value less than ${formatter(exclusiveMaximum)}`,
|
|
6737
|
+
arbitrary: {
|
|
6738
|
+
constraint: {
|
|
6739
|
+
ordered: {
|
|
6740
|
+
order: options.order,
|
|
6741
|
+
maximum: exclusiveMaximum,
|
|
6742
|
+
exclusiveMaximum: true
|
|
6743
|
+
}
|
|
6744
|
+
}
|
|
6745
|
+
},
|
|
6779
6746
|
...options.annotate?.(exclusiveMaximum),
|
|
6780
6747
|
...annotations
|
|
6781
6748
|
}
|
|
@@ -6802,6 +6769,14 @@ export function makeIsLessThanOrEqualTo<T>(options: {
|
|
|
6802
6769
|
(input) => lte(input, maximum),
|
|
6803
6770
|
{
|
|
6804
6771
|
expected: `a value less than or equal to ${formatter(maximum)}`,
|
|
6772
|
+
arbitrary: {
|
|
6773
|
+
constraint: {
|
|
6774
|
+
ordered: {
|
|
6775
|
+
order: options.order,
|
|
6776
|
+
maximum
|
|
6777
|
+
}
|
|
6778
|
+
}
|
|
6779
|
+
},
|
|
6805
6780
|
...options.annotate?.(maximum),
|
|
6806
6781
|
...annotations
|
|
6807
6782
|
}
|
|
@@ -6847,6 +6822,17 @@ export function makeIsBetween<T>(deriveOptions: {
|
|
|
6847
6822
|
expected: `a value between ${formatter(options.minimum)}${options.exclusiveMinimum ? " (excluded)" : ""} and ${
|
|
6848
6823
|
formatter(options.maximum)
|
|
6849
6824
|
}${options.exclusiveMaximum ? " (excluded)" : ""}`,
|
|
6825
|
+
arbitrary: {
|
|
6826
|
+
constraint: {
|
|
6827
|
+
ordered: {
|
|
6828
|
+
order: deriveOptions.order,
|
|
6829
|
+
minimum: options.minimum,
|
|
6830
|
+
maximum: options.maximum,
|
|
6831
|
+
...(options.exclusiveMinimum && { exclusiveMinimum: true }),
|
|
6832
|
+
...(options.exclusiveMaximum && { exclusiveMaximum: true })
|
|
6833
|
+
}
|
|
6834
|
+
}
|
|
6835
|
+
},
|
|
6850
6836
|
...deriveOptions.annotate?.(options),
|
|
6851
6837
|
...annotations
|
|
6852
6838
|
}
|
|
@@ -6891,9 +6877,9 @@ export function makeIsMultipleOf<T>(options: {
|
|
|
6891
6877
|
*
|
|
6892
6878
|
* Arbitrary:
|
|
6893
6879
|
*
|
|
6894
|
-
* When generating test data with fast-check, this applies
|
|
6895
|
-
*
|
|
6896
|
-
* specified value.
|
|
6880
|
+
* When generating test data with fast-check, this applies an
|
|
6881
|
+
* `exclusiveMinimum` constraint to ensure generated numbers are greater than
|
|
6882
|
+
* the specified value.
|
|
6897
6883
|
*
|
|
6898
6884
|
* @category Number checks
|
|
6899
6885
|
* @since 4.0.0
|
|
@@ -6904,12 +6890,6 @@ export const isGreaterThan = makeIsGreaterThan({
|
|
|
6904
6890
|
meta: {
|
|
6905
6891
|
_tag: "isGreaterThan",
|
|
6906
6892
|
exclusiveMinimum
|
|
6907
|
-
},
|
|
6908
|
-
toArbitraryConstraint: {
|
|
6909
|
-
number: {
|
|
6910
|
-
min: exclusiveMinimum,
|
|
6911
|
-
minExcluded: true
|
|
6912
|
-
}
|
|
6913
6893
|
}
|
|
6914
6894
|
})
|
|
6915
6895
|
})
|
|
@@ -6926,7 +6906,7 @@ export const isGreaterThan = makeIsGreaterThan({
|
|
|
6926
6906
|
*
|
|
6927
6907
|
* Arbitrary:
|
|
6928
6908
|
*
|
|
6929
|
-
* When generating test data with fast-check, this applies a `
|
|
6909
|
+
* When generating test data with fast-check, this applies a `minimum` constraint
|
|
6930
6910
|
* to ensure generated numbers are greater than or equal to the specified value.
|
|
6931
6911
|
*
|
|
6932
6912
|
* @category Number checks
|
|
@@ -6938,11 +6918,6 @@ export const isGreaterThanOrEqualTo = makeIsGreaterThanOrEqualTo({
|
|
|
6938
6918
|
meta: {
|
|
6939
6919
|
_tag: "isGreaterThanOrEqualTo",
|
|
6940
6920
|
minimum
|
|
6941
|
-
},
|
|
6942
|
-
toArbitraryConstraint: {
|
|
6943
|
-
number: {
|
|
6944
|
-
min: minimum
|
|
6945
|
-
}
|
|
6946
6921
|
}
|
|
6947
6922
|
})
|
|
6948
6923
|
})
|
|
@@ -6958,8 +6933,8 @@ export const isGreaterThanOrEqualTo = makeIsGreaterThanOrEqualTo({
|
|
|
6958
6933
|
*
|
|
6959
6934
|
* Arbitrary:
|
|
6960
6935
|
*
|
|
6961
|
-
* When generating test data with fast-check, this applies
|
|
6962
|
-
*
|
|
6936
|
+
* When generating test data with fast-check, this applies an
|
|
6937
|
+
* `exclusiveMaximum` constraint to ensure generated numbers are less than the
|
|
6963
6938
|
* specified value.
|
|
6964
6939
|
*
|
|
6965
6940
|
* @category Number checks
|
|
@@ -6971,12 +6946,6 @@ export const isLessThan = makeIsLessThan({
|
|
|
6971
6946
|
meta: {
|
|
6972
6947
|
_tag: "isLessThan",
|
|
6973
6948
|
exclusiveMaximum
|
|
6974
|
-
},
|
|
6975
|
-
toArbitraryConstraint: {
|
|
6976
|
-
number: {
|
|
6977
|
-
max: exclusiveMaximum,
|
|
6978
|
-
maxExcluded: true
|
|
6979
|
-
}
|
|
6980
6949
|
}
|
|
6981
6950
|
})
|
|
6982
6951
|
})
|
|
@@ -6993,7 +6962,7 @@ export const isLessThan = makeIsLessThan({
|
|
|
6993
6962
|
*
|
|
6994
6963
|
* Arbitrary:
|
|
6995
6964
|
*
|
|
6996
|
-
* When generating test data with fast-check, this applies a `
|
|
6965
|
+
* When generating test data with fast-check, this applies a `maximum` constraint
|
|
6997
6966
|
* to ensure generated numbers are less than or equal to the specified value.
|
|
6998
6967
|
*
|
|
6999
6968
|
* @category Number checks
|
|
@@ -7005,11 +6974,6 @@ export const isLessThanOrEqualTo = makeIsLessThanOrEqualTo({
|
|
|
7005
6974
|
meta: {
|
|
7006
6975
|
_tag: "isLessThanOrEqualTo",
|
|
7007
6976
|
maximum
|
|
7008
|
-
},
|
|
7009
|
-
toArbitraryConstraint: {
|
|
7010
|
-
number: {
|
|
7011
|
-
max: maximum
|
|
7012
|
-
}
|
|
7013
6977
|
}
|
|
7014
6978
|
})
|
|
7015
6979
|
})
|
|
@@ -7027,9 +6991,10 @@ export const isLessThanOrEqualTo = makeIsLessThanOrEqualTo({
|
|
|
7027
6991
|
*
|
|
7028
6992
|
* Arbitrary:
|
|
7029
6993
|
*
|
|
7030
|
-
* When generating test data with fast-check, this applies `
|
|
7031
|
-
* constraints with optional `
|
|
7032
|
-
* generated numbers fall within the
|
|
6994
|
+
* When generating test data with fast-check, this applies `minimum` and
|
|
6995
|
+
* `maximum` constraints with optional `exclusiveMinimum` and
|
|
6996
|
+
* `exclusiveMaximum` flags to ensure generated numbers fall within the
|
|
6997
|
+
* specified range.
|
|
7033
6998
|
*
|
|
7034
6999
|
* @category Number checks
|
|
7035
7000
|
* @since 4.0.0
|
|
@@ -7041,14 +7006,6 @@ export const isBetween = makeIsBetween({
|
|
|
7041
7006
|
meta: {
|
|
7042
7007
|
_tag: "isBetween",
|
|
7043
7008
|
...options
|
|
7044
|
-
},
|
|
7045
|
-
toArbitraryConstraint: {
|
|
7046
|
-
number: {
|
|
7047
|
-
min: options.minimum,
|
|
7048
|
-
max: options.maximum,
|
|
7049
|
-
...(options.exclusiveMinimum && { minExcluded: true }),
|
|
7050
|
-
...(options.exclusiveMaximum && { maxExcluded: true })
|
|
7051
|
-
}
|
|
7052
7009
|
}
|
|
7053
7010
|
}
|
|
7054
7011
|
}
|
|
@@ -7095,7 +7052,7 @@ export const isMultipleOf = makeIsMultipleOf({
|
|
|
7095
7052
|
*
|
|
7096
7053
|
* Arbitrary:
|
|
7097
7054
|
*
|
|
7098
|
-
* When generating test data with fast-check, this applies an `
|
|
7055
|
+
* When generating test data with fast-check, this applies an `integer: true`
|
|
7099
7056
|
* constraint to ensure generated numbers are integers.
|
|
7100
7057
|
*
|
|
7101
7058
|
* @category Integer checks
|
|
@@ -7109,9 +7066,9 @@ export function isInt(annotations?: Annotations.Filter) {
|
|
|
7109
7066
|
meta: {
|
|
7110
7067
|
_tag: "isInt"
|
|
7111
7068
|
},
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7069
|
+
arbitrary: {
|
|
7070
|
+
constraint: {
|
|
7071
|
+
integer: true
|
|
7115
7072
|
}
|
|
7116
7073
|
},
|
|
7117
7074
|
...annotations
|
|
@@ -7196,7 +7153,7 @@ export function isUint32(annotations?: Annotations.Filter) {
|
|
|
7196
7153
|
*
|
|
7197
7154
|
* Arbitrary:
|
|
7198
7155
|
*
|
|
7199
|
-
* When generating test data with fast-check, this applies a `
|
|
7156
|
+
* When generating test data with fast-check, this applies a `valid: true`
|
|
7200
7157
|
* constraint to ensure generated Date objects are valid.
|
|
7201
7158
|
*
|
|
7202
7159
|
* @category Date checks
|
|
@@ -7210,9 +7167,9 @@ export function isDateValid(annotations?: Annotations.Filter) {
|
|
|
7210
7167
|
meta: {
|
|
7211
7168
|
_tag: "isDateValid"
|
|
7212
7169
|
},
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7170
|
+
arbitrary: {
|
|
7171
|
+
constraint: {
|
|
7172
|
+
valid: true
|
|
7216
7173
|
}
|
|
7217
7174
|
},
|
|
7218
7175
|
...annotations
|
|
@@ -7220,10 +7177,6 @@ export function isDateValid(annotations?: Annotations.Filter) {
|
|
|
7220
7177
|
)
|
|
7221
7178
|
}
|
|
7222
7179
|
|
|
7223
|
-
const nextDate = (date: globalThis.Date) => new globalThis.Date(date.getTime() + 1)
|
|
7224
|
-
|
|
7225
|
-
const previousDate = (date: globalThis.Date) => new globalThis.Date(date.getTime() - 1)
|
|
7226
|
-
|
|
7227
7180
|
/**
|
|
7228
7181
|
* Validates that a Date is greater than the specified value (exclusive).
|
|
7229
7182
|
*
|
|
@@ -7244,11 +7197,6 @@ export const isGreaterThanDate = makeIsGreaterThan({
|
|
|
7244
7197
|
meta: {
|
|
7245
7198
|
_tag: "isGreaterThanDate",
|
|
7246
7199
|
exclusiveMinimum
|
|
7247
|
-
},
|
|
7248
|
-
toArbitraryConstraint: {
|
|
7249
|
-
date: {
|
|
7250
|
-
min: nextDate(exclusiveMinimum)
|
|
7251
|
-
}
|
|
7252
7200
|
}
|
|
7253
7201
|
})
|
|
7254
7202
|
})
|
|
@@ -7279,11 +7227,6 @@ export const isGreaterThanOrEqualToDate = makeIsGreaterThanOrEqualTo({
|
|
|
7279
7227
|
meta: {
|
|
7280
7228
|
_tag: "isGreaterThanOrEqualToDate",
|
|
7281
7229
|
minimum
|
|
7282
|
-
},
|
|
7283
|
-
toArbitraryConstraint: {
|
|
7284
|
-
date: {
|
|
7285
|
-
min: minimum
|
|
7286
|
-
}
|
|
7287
7230
|
}
|
|
7288
7231
|
})
|
|
7289
7232
|
})
|
|
@@ -7308,11 +7251,6 @@ export const isLessThanDate = makeIsLessThan({
|
|
|
7308
7251
|
meta: {
|
|
7309
7252
|
_tag: "isLessThanDate",
|
|
7310
7253
|
exclusiveMaximum
|
|
7311
|
-
},
|
|
7312
|
-
toArbitraryConstraint: {
|
|
7313
|
-
date: {
|
|
7314
|
-
max: previousDate(exclusiveMaximum)
|
|
7315
|
-
}
|
|
7316
7254
|
}
|
|
7317
7255
|
})
|
|
7318
7256
|
})
|
|
@@ -7343,11 +7281,6 @@ export const isLessThanOrEqualToDate = makeIsLessThanOrEqualTo({
|
|
|
7343
7281
|
meta: {
|
|
7344
7282
|
_tag: "isLessThanOrEqualToDate",
|
|
7345
7283
|
maximum
|
|
7346
|
-
},
|
|
7347
|
-
toArbitraryConstraint: {
|
|
7348
|
-
date: {
|
|
7349
|
-
max: maximum
|
|
7350
|
-
}
|
|
7351
7284
|
}
|
|
7352
7285
|
})
|
|
7353
7286
|
})
|
|
@@ -7378,20 +7311,10 @@ export const isBetweenDate = makeIsBetween({
|
|
|
7378
7311
|
meta: {
|
|
7379
7312
|
_tag: "isBetweenDate",
|
|
7380
7313
|
...options
|
|
7381
|
-
},
|
|
7382
|
-
toArbitraryConstraint: {
|
|
7383
|
-
date: {
|
|
7384
|
-
min: options.exclusiveMinimum ? nextDate(options.minimum) : options.minimum,
|
|
7385
|
-
max: options.exclusiveMaximum ? previousDate(options.maximum) : options.maximum
|
|
7386
|
-
}
|
|
7387
7314
|
}
|
|
7388
7315
|
})
|
|
7389
7316
|
})
|
|
7390
7317
|
|
|
7391
|
-
const nextBigInt = (n: bigint) => n + globalThis.BigInt(1)
|
|
7392
|
-
|
|
7393
|
-
const previousBigInt = (n: bigint) => n - globalThis.BigInt(1)
|
|
7394
|
-
|
|
7395
7318
|
/**
|
|
7396
7319
|
* Validates that a BigInt is greater than the specified value (exclusive).
|
|
7397
7320
|
*
|
|
@@ -7412,11 +7335,6 @@ export const isGreaterThanBigInt = makeIsGreaterThan({
|
|
|
7412
7335
|
meta: {
|
|
7413
7336
|
_tag: "isGreaterThanBigInt",
|
|
7414
7337
|
exclusiveMinimum
|
|
7415
|
-
},
|
|
7416
|
-
toArbitraryConstraint: {
|
|
7417
|
-
bigint: {
|
|
7418
|
-
min: nextBigInt(exclusiveMinimum)
|
|
7419
|
-
}
|
|
7420
7338
|
}
|
|
7421
7339
|
})
|
|
7422
7340
|
})
|
|
@@ -7442,11 +7360,6 @@ export const isGreaterThanOrEqualToBigInt = makeIsGreaterThanOrEqualTo({
|
|
|
7442
7360
|
meta: {
|
|
7443
7361
|
_tag: "isGreaterThanOrEqualToBigInt",
|
|
7444
7362
|
minimum
|
|
7445
|
-
},
|
|
7446
|
-
toArbitraryConstraint: {
|
|
7447
|
-
bigint: {
|
|
7448
|
-
min: minimum
|
|
7449
|
-
}
|
|
7450
7363
|
}
|
|
7451
7364
|
})
|
|
7452
7365
|
})
|
|
@@ -7471,11 +7384,6 @@ export const isLessThanBigInt = makeIsLessThan({
|
|
|
7471
7384
|
meta: {
|
|
7472
7385
|
_tag: "isLessThanBigInt",
|
|
7473
7386
|
exclusiveMaximum
|
|
7474
|
-
},
|
|
7475
|
-
toArbitraryConstraint: {
|
|
7476
|
-
bigint: {
|
|
7477
|
-
max: previousBigInt(exclusiveMaximum)
|
|
7478
|
-
}
|
|
7479
7387
|
}
|
|
7480
7388
|
})
|
|
7481
7389
|
})
|
|
@@ -7501,11 +7409,6 @@ export const isLessThanOrEqualToBigInt = makeIsLessThanOrEqualTo({
|
|
|
7501
7409
|
meta: {
|
|
7502
7410
|
_tag: "isLessThanOrEqualToBigInt",
|
|
7503
7411
|
maximum
|
|
7504
|
-
},
|
|
7505
|
-
toArbitraryConstraint: {
|
|
7506
|
-
bigint: {
|
|
7507
|
-
max: maximum
|
|
7508
|
-
}
|
|
7509
7412
|
}
|
|
7510
7413
|
})
|
|
7511
7414
|
})
|
|
@@ -7531,12 +7434,6 @@ export const isBetweenBigInt = makeIsBetween({
|
|
|
7531
7434
|
meta: {
|
|
7532
7435
|
_tag: "isBetweenBigInt",
|
|
7533
7436
|
...options
|
|
7534
|
-
},
|
|
7535
|
-
toArbitraryConstraint: {
|
|
7536
|
-
bigint: {
|
|
7537
|
-
min: options.exclusiveMinimum ? nextBigInt(options.minimum) : options.minimum,
|
|
7538
|
-
max: options.exclusiveMaximum ? previousBigInt(options.maximum) : options.maximum
|
|
7539
|
-
}
|
|
7540
7437
|
}
|
|
7541
7438
|
})
|
|
7542
7439
|
})
|
|
@@ -7643,11 +7540,8 @@ export function isMinLength(minLength: number, annotations?: Annotations.Filter)
|
|
|
7643
7540
|
minLength
|
|
7644
7541
|
},
|
|
7645
7542
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
minLength
|
|
7649
|
-
},
|
|
7650
|
-
array: {
|
|
7543
|
+
arbitrary: {
|
|
7544
|
+
constraint: {
|
|
7651
7545
|
minLength
|
|
7652
7546
|
}
|
|
7653
7547
|
},
|
|
@@ -7710,11 +7604,8 @@ export function isMaxLength(maxLength: number, annotations?: Annotations.Filter)
|
|
|
7710
7604
|
maxLength
|
|
7711
7605
|
},
|
|
7712
7606
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
maxLength
|
|
7716
|
-
},
|
|
7717
|
-
array: {
|
|
7607
|
+
arbitrary: {
|
|
7608
|
+
constraint: {
|
|
7718
7609
|
maxLength
|
|
7719
7610
|
}
|
|
7720
7611
|
},
|
|
@@ -7758,12 +7649,8 @@ export function isLengthBetween(minimum: number, maximum: number, annotations?:
|
|
|
7758
7649
|
maximum
|
|
7759
7650
|
},
|
|
7760
7651
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
minLength: minimum,
|
|
7764
|
-
maxLength: maximum
|
|
7765
|
-
},
|
|
7766
|
-
array: {
|
|
7652
|
+
arbitrary: {
|
|
7653
|
+
constraint: {
|
|
7767
7654
|
minLength: minimum,
|
|
7768
7655
|
maxLength: maximum
|
|
7769
7656
|
}
|
|
@@ -7786,9 +7673,9 @@ export function isLengthBetween(minimum: number, maximum: number, annotations?:
|
|
|
7786
7673
|
*
|
|
7787
7674
|
* Arbitrary:
|
|
7788
7675
|
*
|
|
7789
|
-
* When generating test data with fast-check, this applies a
|
|
7790
|
-
* constraint
|
|
7791
|
-
*
|
|
7676
|
+
* When generating test data with fast-check, this applies a node-local
|
|
7677
|
+
* `minLength` constraint. Generators for values with a final `.size`, such as
|
|
7678
|
+
* sets and maps, interpret it as final cardinality.
|
|
7792
7679
|
*
|
|
7793
7680
|
* @category Size checks
|
|
7794
7681
|
* @since 4.0.0
|
|
@@ -7804,8 +7691,8 @@ export function isMinSize(minSize: number, annotations?: Annotations.Filter) {
|
|
|
7804
7691
|
minSize
|
|
7805
7692
|
},
|
|
7806
7693
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7807
|
-
|
|
7808
|
-
|
|
7694
|
+
arbitrary: {
|
|
7695
|
+
constraint: {
|
|
7809
7696
|
minLength: minSize
|
|
7810
7697
|
}
|
|
7811
7698
|
},
|
|
@@ -7827,9 +7714,9 @@ export function isMinSize(minSize: number, annotations?: Annotations.Filter) {
|
|
|
7827
7714
|
*
|
|
7828
7715
|
* Arbitrary:
|
|
7829
7716
|
*
|
|
7830
|
-
* When generating test data with fast-check, this applies a
|
|
7831
|
-
* constraint
|
|
7832
|
-
*
|
|
7717
|
+
* When generating test data with fast-check, this applies a node-local
|
|
7718
|
+
* `maxLength` constraint. Generators for values with a final `.size`, such as
|
|
7719
|
+
* sets and maps, interpret it as final cardinality.
|
|
7833
7720
|
*
|
|
7834
7721
|
* @category Size checks
|
|
7835
7722
|
* @since 4.0.0
|
|
@@ -7845,8 +7732,8 @@ export function isMaxSize(maxSize: number, annotations?: Annotations.Filter) {
|
|
|
7845
7732
|
maxSize
|
|
7846
7733
|
},
|
|
7847
7734
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7848
|
-
|
|
7849
|
-
|
|
7735
|
+
arbitrary: {
|
|
7736
|
+
constraint: {
|
|
7850
7737
|
maxLength: maxSize
|
|
7851
7738
|
}
|
|
7852
7739
|
},
|
|
@@ -7868,9 +7755,9 @@ export function isMaxSize(maxSize: number, annotations?: Annotations.Filter) {
|
|
|
7868
7755
|
*
|
|
7869
7756
|
* Arbitrary:
|
|
7870
7757
|
*
|
|
7871
|
-
* When generating test data with fast-check, this applies
|
|
7872
|
-
* `maxLength` constraints
|
|
7873
|
-
*
|
|
7758
|
+
* When generating test data with fast-check, this applies node-local
|
|
7759
|
+
* `minLength` and `maxLength` constraints. Generators for values with a final
|
|
7760
|
+
* `.size`, such as sets and maps, interpret them as final cardinality.
|
|
7874
7761
|
*
|
|
7875
7762
|
* @category Size checks
|
|
7876
7763
|
* @since 4.0.0
|
|
@@ -7890,8 +7777,8 @@ export function isSizeBetween(minimum: number, maximum: number, annotations?: An
|
|
|
7890
7777
|
maximum
|
|
7891
7778
|
},
|
|
7892
7779
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7893
|
-
|
|
7894
|
-
|
|
7780
|
+
arbitrary: {
|
|
7781
|
+
constraint: {
|
|
7895
7782
|
minLength: minimum,
|
|
7896
7783
|
maxLength: maximum
|
|
7897
7784
|
}
|
|
@@ -7914,10 +7801,9 @@ export function isSizeBetween(minimum: number, maximum: number, annotations?: An
|
|
|
7914
7801
|
*
|
|
7915
7802
|
* Arbitrary:
|
|
7916
7803
|
*
|
|
7917
|
-
* When generating test data with fast-check, this applies a
|
|
7918
|
-
* constraint
|
|
7919
|
-
*
|
|
7920
|
-
* of properties.
|
|
7804
|
+
* When generating test data with fast-check, this applies a node-local
|
|
7805
|
+
* `minLength` constraint. Object generators interpret it as the final number
|
|
7806
|
+
* of own properties.
|
|
7921
7807
|
*
|
|
7922
7808
|
* @category Object checks
|
|
7923
7809
|
* @since 4.0.0
|
|
@@ -7933,8 +7819,8 @@ export function isMinProperties(minProperties: number, annotations?: Annotations
|
|
|
7933
7819
|
minProperties
|
|
7934
7820
|
},
|
|
7935
7821
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7936
|
-
|
|
7937
|
-
|
|
7822
|
+
arbitrary: {
|
|
7823
|
+
constraint: {
|
|
7938
7824
|
minLength: minProperties
|
|
7939
7825
|
}
|
|
7940
7826
|
},
|
|
@@ -7955,10 +7841,9 @@ export function isMinProperties(minProperties: number, annotations?: Annotations
|
|
|
7955
7841
|
*
|
|
7956
7842
|
* Arbitrary:
|
|
7957
7843
|
*
|
|
7958
|
-
* When generating test data with fast-check, this applies a
|
|
7959
|
-
* constraint
|
|
7960
|
-
*
|
|
7961
|
-
* of properties.
|
|
7844
|
+
* When generating test data with fast-check, this applies a node-local
|
|
7845
|
+
* `maxLength` constraint. Object generators interpret it as the final number
|
|
7846
|
+
* of own properties.
|
|
7962
7847
|
*
|
|
7963
7848
|
* @category Object checks
|
|
7964
7849
|
* @since 4.0.0
|
|
@@ -7974,8 +7859,8 @@ export function isMaxProperties(maxProperties: number, annotations?: Annotations
|
|
|
7974
7859
|
maxProperties
|
|
7975
7860
|
},
|
|
7976
7861
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
7977
|
-
|
|
7978
|
-
|
|
7862
|
+
arbitrary: {
|
|
7863
|
+
constraint: {
|
|
7979
7864
|
maxLength: maxProperties
|
|
7980
7865
|
}
|
|
7981
7866
|
},
|
|
@@ -7997,9 +7882,9 @@ export function isMaxProperties(maxProperties: number, annotations?: Annotations
|
|
|
7997
7882
|
*
|
|
7998
7883
|
* Arbitrary:
|
|
7999
7884
|
*
|
|
8000
|
-
* When generating test data with fast-check, this applies
|
|
8001
|
-
* `maxLength` constraints
|
|
8002
|
-
*
|
|
7885
|
+
* When generating test data with fast-check, this applies node-local
|
|
7886
|
+
* `minLength` and `maxLength` constraints. Object generators interpret them as
|
|
7887
|
+
* the final number of own properties.
|
|
8003
7888
|
*
|
|
8004
7889
|
* @category Object checks
|
|
8005
7890
|
* @since 4.0.0
|
|
@@ -8019,8 +7904,8 @@ export function isPropertiesLengthBetween(minimum: number, maximum: number, anno
|
|
|
8019
7904
|
maximum
|
|
8020
7905
|
},
|
|
8021
7906
|
[SchemaAST.STRUCTURAL_ANNOTATION_KEY]: true,
|
|
8022
|
-
|
|
8023
|
-
|
|
7907
|
+
arbitrary: {
|
|
7908
|
+
constraint: {
|
|
8024
7909
|
minLength: minimum,
|
|
8025
7910
|
maxLength: maximum
|
|
8026
7911
|
}
|
|
@@ -8086,8 +7971,9 @@ export function isPropertyNames(keySchema: Top, annotations?: Annotations.Filter
|
|
|
8086
7971
|
* This check corresponds to the `uniqueItems: true` constraint in JSON Schema.
|
|
8087
7972
|
*
|
|
8088
7973
|
* Arbitrary:
|
|
8089
|
-
* When generating test data with fast-check, this applies a
|
|
8090
|
-
*
|
|
7974
|
+
* When generating test data with fast-check, this applies a node-local
|
|
7975
|
+
* `unique: true` constraint. Array generators translate it to `fast-check`
|
|
7976
|
+
* `uniqueArray` using Effect equality.
|
|
8091
7977
|
*
|
|
8092
7978
|
* @category Array checks
|
|
8093
7979
|
* @since 4.0.0
|
|
@@ -8101,9 +7987,9 @@ export function isUnique<T>(annotations?: Annotations.Filter) {
|
|
|
8101
7987
|
meta: {
|
|
8102
7988
|
_tag: "isUnique"
|
|
8103
7989
|
},
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
7990
|
+
arbitrary: {
|
|
7991
|
+
constraint: {
|
|
7992
|
+
unique: true
|
|
8107
7993
|
}
|
|
8108
7994
|
},
|
|
8109
7995
|
...annotations
|
|
@@ -8249,11 +8135,12 @@ export function Option<A extends Top>(value: A): Option<A> {
|
|
|
8249
8135
|
})
|
|
8250
8136
|
),
|
|
8251
8137
|
toArbitrary: ([value]) => (fc, ctx) => {
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
value.map(Option_.some)
|
|
8138
|
+
const terminal = fc.constant(Option_.none())
|
|
8139
|
+
const arbitrary = fc.oneof(
|
|
8140
|
+
terminal,
|
|
8141
|
+
value.arbitrary.map(Option_.some)
|
|
8256
8142
|
)
|
|
8143
|
+
return withRecursion(fc, ctx, terminal, arbitrary)
|
|
8257
8144
|
},
|
|
8258
8145
|
toEquivalence: ([value]) => Option_.makeEquivalence(value),
|
|
8259
8146
|
toFormatter: ([value]) =>
|
|
@@ -8556,11 +8443,16 @@ export function Result<A extends Top, E extends Top>(
|
|
|
8556
8443
|
})
|
|
8557
8444
|
),
|
|
8558
8445
|
toArbitrary: ([success, failure]) => (fc, ctx) => {
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
success.map(Result_.succeed),
|
|
8562
|
-
failure.map(Result_.fail)
|
|
8446
|
+
const terminal = oneOfArbitraries(
|
|
8447
|
+
fc,
|
|
8448
|
+
success.terminal?.map((a): Result_.Result<A["Type"], E["Type"]> => Result_.succeed(a)),
|
|
8449
|
+
failure.terminal?.map((e): Result_.Result<A["Type"], E["Type"]> => Result_.fail(e))
|
|
8563
8450
|
)
|
|
8451
|
+
const arbitrary = fc.oneof(
|
|
8452
|
+
success.arbitrary.map((a): Result_.Result<A["Type"], E["Type"]> => Result_.succeed(a)),
|
|
8453
|
+
failure.arbitrary.map((e): Result_.Result<A["Type"], E["Type"]> => Result_.fail(e))
|
|
8454
|
+
)
|
|
8455
|
+
return withRecursion(fc, ctx, terminal, arbitrary)
|
|
8564
8456
|
},
|
|
8565
8457
|
toEquivalence: ([success, failure]) => Result_.makeEquivalence(success, failure),
|
|
8566
8458
|
toFormatter: ([success, failure]) =>
|
|
@@ -8673,7 +8565,10 @@ export function Redacted<S extends Top>(value: S, options?: {
|
|
|
8673
8565
|
SchemaGetter.transform(Redacted_.value)
|
|
8674
8566
|
}
|
|
8675
8567
|
),
|
|
8676
|
-
toArbitrary: ([value]) => () =>
|
|
8568
|
+
toArbitrary: ([value]) => () => ({
|
|
8569
|
+
arbitrary: value.arbitrary.map((a) => Redacted_.make(a, { label: options?.label })),
|
|
8570
|
+
terminal: value.terminal?.map((a) => Redacted_.make(a, { label: options?.label }))
|
|
8571
|
+
}),
|
|
8677
8572
|
toFormatter: () => globalThis.String,
|
|
8678
8573
|
toEquivalence: ([value]) => Redacted_.makeEquivalence(value)
|
|
8679
8574
|
}
|
|
@@ -8865,15 +8760,19 @@ export function CauseReason<E extends Top, D extends Top>(error: E, defect: D):
|
|
|
8865
8760
|
return make(schema.ast, { error, defect })
|
|
8866
8761
|
}
|
|
8867
8762
|
|
|
8868
|
-
function causeReasonToArbitrary<E, D>(
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8763
|
+
function causeReasonToArbitrary<E, D>(
|
|
8764
|
+
error: Annotations.ToArbitrary.TypeParameter<E>,
|
|
8765
|
+
defect: Annotations.ToArbitrary.TypeParameter<D>
|
|
8766
|
+
) {
|
|
8767
|
+
return (fc: typeof FastCheck, ctx: Annotations.ToArbitrary.Context) => {
|
|
8768
|
+
const terminal = fc.constant(Cause_.makeInterruptReason())
|
|
8769
|
+
const arbitrary = fc.oneof(
|
|
8770
|
+
terminal,
|
|
8873
8771
|
fc.integer({ min: 1 }).map(Cause_.makeInterruptReason),
|
|
8874
|
-
error.map((e) => Cause_.makeFailReason(e)),
|
|
8875
|
-
defect.map((d) => Cause_.makeDieReason(d))
|
|
8772
|
+
error.arbitrary.map((e) => Cause_.makeFailReason(e)),
|
|
8773
|
+
defect.arbitrary.map((d) => Cause_.makeDieReason(d))
|
|
8876
8774
|
)
|
|
8775
|
+
return withRecursion(fc, ctx, terminal, arbitrary)
|
|
8877
8776
|
}
|
|
8878
8777
|
}
|
|
8879
8778
|
|
|
@@ -9003,9 +8902,15 @@ export function Cause<E extends Top, D extends Top>(error: E, defect: D): Cause<
|
|
|
9003
8902
|
return make(schema.ast, { error, defect })
|
|
9004
8903
|
}
|
|
9005
8904
|
|
|
9006
|
-
function causeToArbitrary<E, D>(
|
|
9007
|
-
|
|
9008
|
-
|
|
8905
|
+
function causeToArbitrary<E, D>(
|
|
8906
|
+
error: Annotations.ToArbitrary.TypeParameter<E>,
|
|
8907
|
+
defect: Annotations.ToArbitrary.TypeParameter<D>
|
|
8908
|
+
) {
|
|
8909
|
+
return (fc: typeof FastCheck, ctx: Annotations.ToArbitrary.Context) => {
|
|
8910
|
+
const reason = causeReasonToArbitrary(error, defect)(fc, ctx)
|
|
8911
|
+
const terminal = fc.constant(Cause_.empty)
|
|
8912
|
+
const arbitrary = fc.array(reason.arbitrary).map(Cause_.fromReasons)
|
|
8913
|
+
return withRecursion(fc, ctx, terminal, arbitrary)
|
|
9009
8914
|
}
|
|
9010
8915
|
}
|
|
9011
8916
|
|
|
@@ -9286,12 +9191,19 @@ export function Exit<A extends Top, E extends Top, D extends Top>(value: A, erro
|
|
|
9286
9191
|
: { _tag: "Failure", cause: exit.cause } as const
|
|
9287
9192
|
})
|
|
9288
9193
|
),
|
|
9289
|
-
toArbitrary: ([value, error, defect]) => (fc, ctx) =>
|
|
9290
|
-
fc
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9194
|
+
toArbitrary: ([value, error, defect]) => (fc, ctx) => {
|
|
9195
|
+
const cause = causeToArbitrary(error, defect)(fc, ctx)
|
|
9196
|
+
const terminal = oneOfArbitraries(
|
|
9197
|
+
fc,
|
|
9198
|
+
value.terminal?.map((v): Exit_.Exit<A["Type"], E["Type"]> => Exit_.succeed(v)),
|
|
9199
|
+
cause.terminal?.map((cause): Exit_.Exit<A["Type"], E["Type"]> => Exit_.failCause(cause))
|
|
9200
|
+
)
|
|
9201
|
+
const arbitrary = fc.oneof(
|
|
9202
|
+
value.arbitrary.map((v): Exit_.Exit<A["Type"], E["Type"]> => Exit_.succeed(v)),
|
|
9203
|
+
cause.arbitrary.map((cause): Exit_.Exit<A["Type"], E["Type"]> => Exit_.failCause(cause))
|
|
9204
|
+
)
|
|
9205
|
+
return withRecursion(fc, ctx, terminal, arbitrary)
|
|
9206
|
+
},
|
|
9295
9207
|
toEquivalence: ([value, error, defect]) => {
|
|
9296
9208
|
const cause = causeToEquivalence(error, defect)
|
|
9297
9209
|
return (a, b) => {
|
|
@@ -9348,6 +9260,96 @@ export interface $ReadonlyMap<Key extends Top, Value extends Top> extends
|
|
|
9348
9260
|
*/
|
|
9349
9261
|
export type ReadonlyMapIso<Key extends Top, Value extends Top> = ReadonlyArray<readonly [Key["Iso"], Value["Iso"]]>
|
|
9350
9262
|
|
|
9263
|
+
function oneOfArbitraries<T>(
|
|
9264
|
+
fc: typeof FastCheck,
|
|
9265
|
+
a: FastCheck.Arbitrary<T> | undefined,
|
|
9266
|
+
b: FastCheck.Arbitrary<T> | undefined
|
|
9267
|
+
) {
|
|
9268
|
+
return a === undefined ? b : b === undefined ? a : fc.oneof(a, b)
|
|
9269
|
+
}
|
|
9270
|
+
|
|
9271
|
+
function withRecursion<T>(
|
|
9272
|
+
fc: typeof FastCheck,
|
|
9273
|
+
ctx: Annotations.ToArbitrary.Context,
|
|
9274
|
+
terminal: FastCheck.Arbitrary<T> | undefined,
|
|
9275
|
+
arbitrary: FastCheck.Arbitrary<T>
|
|
9276
|
+
) {
|
|
9277
|
+
return {
|
|
9278
|
+
arbitrary: terminal === undefined || ctx.recursion === undefined
|
|
9279
|
+
? arbitrary
|
|
9280
|
+
: fc.oneof(ctx.recursion, terminal, arbitrary),
|
|
9281
|
+
terminal
|
|
9282
|
+
}
|
|
9283
|
+
}
|
|
9284
|
+
|
|
9285
|
+
function arrayFromItems<T>(
|
|
9286
|
+
fc: typeof FastCheck,
|
|
9287
|
+
item: FastCheck.Arbitrary<T>,
|
|
9288
|
+
constraints: FastCheck.ArrayConstraints | undefined,
|
|
9289
|
+
comparator?: ((a: T, b: T) => boolean) | undefined
|
|
9290
|
+
) {
|
|
9291
|
+
return comparator === undefined
|
|
9292
|
+
? fc.array(item, constraints)
|
|
9293
|
+
: fc.uniqueArray(item, { ...constraints, comparator })
|
|
9294
|
+
}
|
|
9295
|
+
|
|
9296
|
+
function collectionArbitrary<T, Out>(
|
|
9297
|
+
fc: typeof FastCheck,
|
|
9298
|
+
ctx: Annotations.ToArbitrary.Context,
|
|
9299
|
+
item: FastCheck.Arbitrary<T>,
|
|
9300
|
+
terminalItem: FastCheck.Arbitrary<T> | undefined,
|
|
9301
|
+
fromIterable: (items: Array<T>) => Out,
|
|
9302
|
+
comparator?: ((a: T, b: T) => boolean) | undefined
|
|
9303
|
+
) {
|
|
9304
|
+
const constraint = ctx.constraint
|
|
9305
|
+
const constraints = constraint === undefined ||
|
|
9306
|
+
(constraint.minLength === undefined && constraint.maxLength === undefined)
|
|
9307
|
+
? undefined
|
|
9308
|
+
: {
|
|
9309
|
+
...(constraint.minLength !== undefined ? { minLength: constraint.minLength } : {}),
|
|
9310
|
+
...(constraint.maxLength !== undefined ? { maxLength: constraint.maxLength } : {})
|
|
9311
|
+
}
|
|
9312
|
+
if (
|
|
9313
|
+
constraints?.minLength !== undefined && constraints.maxLength !== undefined &&
|
|
9314
|
+
constraints.minLength > constraints.maxLength
|
|
9315
|
+
) {
|
|
9316
|
+
throw new globalThis.Error("Unable to derive an arbitrary for size constraints")
|
|
9317
|
+
}
|
|
9318
|
+
const minLength = constraints?.minLength ?? 0
|
|
9319
|
+
const terminal = minLength === 0
|
|
9320
|
+
? fc.constant<Array<T>>([])
|
|
9321
|
+
: terminalItem === undefined
|
|
9322
|
+
? undefined
|
|
9323
|
+
: arrayFromItems(fc, terminalItem, { ...constraints, maxLength: minLength }, comparator)
|
|
9324
|
+
const arrays = withRecursion(
|
|
9325
|
+
fc,
|
|
9326
|
+
ctx,
|
|
9327
|
+
terminal,
|
|
9328
|
+
arrayFromItems(fc, item, constraints, comparator)
|
|
9329
|
+
)
|
|
9330
|
+
return {
|
|
9331
|
+
arbitrary: arrays.arbitrary.map(fromIterable),
|
|
9332
|
+
terminal: arrays.terminal?.map(fromIterable)
|
|
9333
|
+
}
|
|
9334
|
+
}
|
|
9335
|
+
|
|
9336
|
+
function entriesArbitrary<K, V, Out>(
|
|
9337
|
+
fc: typeof FastCheck,
|
|
9338
|
+
ctx: Annotations.ToArbitrary.Context,
|
|
9339
|
+
key: Annotations.ToArbitrary.TypeParameter<K>,
|
|
9340
|
+
value: Annotations.ToArbitrary.TypeParameter<V>,
|
|
9341
|
+
fromIterable: (items: Array<[K, V]>) => Out
|
|
9342
|
+
) {
|
|
9343
|
+
return collectionArbitrary(
|
|
9344
|
+
fc,
|
|
9345
|
+
ctx,
|
|
9346
|
+
fc.tuple(key.arbitrary, value.arbitrary),
|
|
9347
|
+
key.terminal === undefined || value.terminal === undefined ? undefined : fc.tuple(key.terminal, value.terminal),
|
|
9348
|
+
fromIterable,
|
|
9349
|
+
([a], [b]) => Equal.equals(a, b)
|
|
9350
|
+
)
|
|
9351
|
+
}
|
|
9352
|
+
|
|
9351
9353
|
/**
|
|
9352
9354
|
* Schema for readonly maps whose keys and values conform to the provided
|
|
9353
9355
|
* schemas.
|
|
@@ -9395,13 +9397,7 @@ export function ReadonlyMap<Key extends Top, Value extends Top>(key: Key, value:
|
|
|
9395
9397
|
encode: (map) => [...map.entries()]
|
|
9396
9398
|
})
|
|
9397
9399
|
),
|
|
9398
|
-
toArbitrary: ([key, value]) => (fc, ctx) =>
|
|
9399
|
-
return fc.oneof(
|
|
9400
|
-
ctx?.isSuspend ? { maxDepth: 2, depthIdentifier: "ReadonlyMap" } : {},
|
|
9401
|
-
fc.constant([]),
|
|
9402
|
-
fc.array(fc.tuple(key, value), ctx?.constraints?.array)
|
|
9403
|
-
).map((as) => new globalThis.Map(as))
|
|
9404
|
-
},
|
|
9400
|
+
toArbitrary: ([key, value]) => (fc, ctx) => entriesArbitrary(fc, ctx, key, value, (as) => new globalThis.Map(as)),
|
|
9405
9401
|
toEquivalence: ([key, value]) => Equal.makeCompareMap(key, value),
|
|
9406
9402
|
toFormatter: ([key, value]) => (t) => {
|
|
9407
9403
|
const size = t.size
|
|
@@ -9491,13 +9487,7 @@ export function HashMap<Key extends Top, Value extends Top>(key: Key, value: Val
|
|
|
9491
9487
|
encode: HashMap_.toEntries
|
|
9492
9488
|
})
|
|
9493
9489
|
),
|
|
9494
|
-
toArbitrary: ([key, value]) => (fc, ctx) =>
|
|
9495
|
-
return fc.oneof(
|
|
9496
|
-
ctx?.isSuspend ? { maxDepth: 2, depthIdentifier: "HashMap" } : {},
|
|
9497
|
-
fc.constant([]),
|
|
9498
|
-
fc.array(fc.tuple(key, value), ctx?.constraints?.array)
|
|
9499
|
-
).map(HashMap_.fromIterable)
|
|
9500
|
-
},
|
|
9490
|
+
toArbitrary: ([key, value]) => (fc, ctx) => entriesArbitrary(fc, ctx, key, value, HashMap_.fromIterable),
|
|
9501
9491
|
toEquivalence: ([key, value]) => Equal.makeCompareMap(key, value),
|
|
9502
9492
|
toFormatter: ([key, value]) => (t) => {
|
|
9503
9493
|
const size = HashMap_.size(t)
|
|
@@ -9585,13 +9575,8 @@ export function ReadonlySet<Value extends Top>(value: Value): $ReadonlySet<Value
|
|
|
9585
9575
|
encode: (set) => [...set.values()]
|
|
9586
9576
|
})
|
|
9587
9577
|
),
|
|
9588
|
-
toArbitrary: ([value]) => (fc, ctx) =>
|
|
9589
|
-
|
|
9590
|
-
ctx?.isSuspend ? { maxDepth: 2, depthIdentifier: "ReadonlySet" } : {},
|
|
9591
|
-
fc.constant([]),
|
|
9592
|
-
fc.array(value, ctx?.constraints?.array)
|
|
9593
|
-
).map((as) => new globalThis.Set(as))
|
|
9594
|
-
},
|
|
9578
|
+
toArbitrary: ([value]) => (fc, ctx) =>
|
|
9579
|
+
collectionArbitrary(fc, ctx, value.arbitrary, value.terminal, (as) => new globalThis.Set(as), Equal.equals),
|
|
9595
9580
|
toEquivalence: ([value]) => Equal.makeCompareSet(value),
|
|
9596
9581
|
toFormatter: ([value]) => (t) => {
|
|
9597
9582
|
const size = t.size
|
|
@@ -9679,13 +9664,8 @@ export function HashSet<Value extends Top>(value: Value): HashSet<Value> {
|
|
|
9679
9664
|
encode: Arr.fromIterable
|
|
9680
9665
|
})
|
|
9681
9666
|
),
|
|
9682
|
-
toArbitrary: ([value]) => (fc, ctx) =>
|
|
9683
|
-
|
|
9684
|
-
ctx?.isSuspend ? { maxDepth: 2, depthIdentifier: "HashSet" } : {},
|
|
9685
|
-
fc.constant([]),
|
|
9686
|
-
fc.array(value, ctx?.constraints?.array)
|
|
9687
|
-
).map(HashSet_.fromIterable)
|
|
9688
|
-
},
|
|
9667
|
+
toArbitrary: ([value]) => (fc, ctx) =>
|
|
9668
|
+
collectionArbitrary(fc, ctx, value.arbitrary, value.terminal, HashSet_.fromIterable, Equal.equals),
|
|
9689
9669
|
toEquivalence: ([value]) => Equal.makeCompareSet(value),
|
|
9690
9670
|
toFormatter: ([value]) => (t) => {
|
|
9691
9671
|
const size = HashSet_.size(t)
|
|
@@ -9780,13 +9760,8 @@ export function Chunk<Value extends Top>(value: Value): Chunk<Value> {
|
|
|
9780
9760
|
encode: Arr.fromIterable
|
|
9781
9761
|
})
|
|
9782
9762
|
),
|
|
9783
|
-
toArbitrary: ([value]) => (fc, ctx) =>
|
|
9784
|
-
|
|
9785
|
-
ctx?.isSuspend ? { maxDepth: 2, depthIdentifier: "Chunk" } : {},
|
|
9786
|
-
fc.constant([]),
|
|
9787
|
-
fc.array(value, ctx?.constraints?.array)
|
|
9788
|
-
).map(Chunk_.fromIterable)
|
|
9789
|
-
},
|
|
9763
|
+
toArbitrary: ([value]) => (fc, ctx) =>
|
|
9764
|
+
collectionArbitrary(fc, ctx, value.arbitrary, value.terminal, Chunk_.fromIterable),
|
|
9790
9765
|
toEquivalence: ([value]) => Chunk_.makeEquivalence(value),
|
|
9791
9766
|
toFormatter: ([value]) => (t) => {
|
|
9792
9767
|
const size = Chunk_.size(t)
|
|
@@ -9958,6 +9933,38 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
9958
9933
|
readonly "Rebuild": Date
|
|
9959
9934
|
}
|
|
9960
9935
|
|
|
9936
|
+
type DateArbitraryConstraints = FastCheck.DateConstraints & {
|
|
9937
|
+
readonly valid?: boolean | undefined
|
|
9938
|
+
}
|
|
9939
|
+
|
|
9940
|
+
function dateArbitraryConstraints<T = globalThis.Date>(
|
|
9941
|
+
constraint: Annotations.ToArbitrary.Constraint | undefined,
|
|
9942
|
+
ordered: Annotations.ToArbitrary.OrderedConstraint<T> | undefined,
|
|
9943
|
+
base?: DateArbitraryConstraints | undefined,
|
|
9944
|
+
toDate?: (value: T) => globalThis.Date
|
|
9945
|
+
): FastCheck.DateConstraints {
|
|
9946
|
+
const out: FastCheck.DateConstraints = { ...base }
|
|
9947
|
+
delete (out as any).valid
|
|
9948
|
+
if (base?.valid || constraint?.valid) {
|
|
9949
|
+
out.noInvalidDate = true
|
|
9950
|
+
}
|
|
9951
|
+
if (ordered?.minimum !== undefined) {
|
|
9952
|
+
const minimum = toDate === undefined ? ordered.minimum as globalThis.Date : toDate(ordered.minimum)
|
|
9953
|
+
const nextMin = ordered.exclusiveMinimum ? new globalThis.Date(minimum.getTime() + 1) : minimum
|
|
9954
|
+
if (out.min === undefined || nextMin.getTime() > out.min.getTime()) {
|
|
9955
|
+
out.min = nextMin
|
|
9956
|
+
}
|
|
9957
|
+
}
|
|
9958
|
+
if (ordered?.maximum !== undefined) {
|
|
9959
|
+
const maximum = toDate === undefined ? ordered.maximum as globalThis.Date : toDate(ordered.maximum)
|
|
9960
|
+
const nextMax = ordered.exclusiveMaximum ? new globalThis.Date(maximum.getTime() - 1) : maximum
|
|
9961
|
+
if (out.max === undefined || nextMax.getTime() < out.max.getTime()) {
|
|
9962
|
+
out.max = nextMax
|
|
9963
|
+
}
|
|
9964
|
+
}
|
|
9965
|
+
return out
|
|
9966
|
+
}
|
|
9967
|
+
|
|
9961
9968
|
const DateString = String.annotate({ expected: "a string in ISO 8601 format that will be decoded as a Date" })
|
|
9962
9969
|
|
|
9963
9970
|
/**
|
|
@@ -10004,7 +10011,11 @@ export const Date: Date = instanceOf(
|
|
|
10004
10011
|
DateString,
|
|
10005
10012
|
SchemaTransformation.dateFromString
|
|
10006
10013
|
),
|
|
10007
|
-
toArbitrary: () => (fc, ctx) =>
|
|
10014
|
+
toArbitrary: () => (fc, ctx) =>
|
|
10015
|
+
fc.date(dateArbitraryConstraints(
|
|
10016
|
+
ctx?.constraint,
|
|
10017
|
+
ctx?.constraint?.ordered?.order === Order.Date ? ctx.constraint.ordered : undefined
|
|
10018
|
+
))
|
|
10008
10019
|
}
|
|
10009
10020
|
)
|
|
10010
10021
|
|
|
@@ -10268,6 +10279,81 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
10268
10279
|
|
|
10269
10280
|
const BigDecimalString = String.annotate({ expected: "a string that will be decoded as a BigDecimal" })
|
|
10270
10281
|
|
|
10282
|
+
const bigDecimalDefaultMaxScale = 20
|
|
10283
|
+
const bigDecimalInvalidOrderedConstraintsError = "Unable to derive an arbitrary for the ordered BigDecimal constraints"
|
|
10284
|
+
|
|
10285
|
+
function bigDecimalScaleValueAtScale(bd: BigDecimal_.BigDecimal, scale: number): bigint {
|
|
10286
|
+
return BigDecimal_.scale(bd, scale).value
|
|
10287
|
+
}
|
|
10288
|
+
|
|
10289
|
+
function bigDecimalMinValueAtScale(
|
|
10290
|
+
minimum: BigDecimal_.BigDecimal,
|
|
10291
|
+
scale: number,
|
|
10292
|
+
excluded: boolean
|
|
10293
|
+
): bigint {
|
|
10294
|
+
return excluded
|
|
10295
|
+
? bigDecimalScaleValueAtScale(BigDecimal_.floor(minimum, scale), scale) + globalThis.BigInt(1)
|
|
10296
|
+
: bigDecimalScaleValueAtScale(BigDecimal_.ceil(minimum, scale), scale)
|
|
10297
|
+
}
|
|
10298
|
+
|
|
10299
|
+
function bigDecimalMaxValueAtScale(
|
|
10300
|
+
maximum: BigDecimal_.BigDecimal,
|
|
10301
|
+
scale: number,
|
|
10302
|
+
excluded: boolean
|
|
10303
|
+
): bigint {
|
|
10304
|
+
return excluded
|
|
10305
|
+
? bigDecimalScaleValueAtScale(BigDecimal_.ceil(maximum, scale), scale) - globalThis.BigInt(1)
|
|
10306
|
+
: bigDecimalScaleValueAtScale(BigDecimal_.floor(maximum, scale), scale)
|
|
10307
|
+
}
|
|
10308
|
+
|
|
10309
|
+
function bigDecimalMaxScale(ordered: Annotations.ToArbitrary.OrderedConstraint<BigDecimal_.BigDecimal>): number {
|
|
10310
|
+
return Math.max(
|
|
10311
|
+
bigDecimalDefaultMaxScale,
|
|
10312
|
+
ordered.minimum?.scale ?? 0,
|
|
10313
|
+
ordered.maximum?.scale ?? 0,
|
|
10314
|
+
ordered.exclusiveMinimum && ordered.minimum !== undefined ? ordered.minimum.scale + 1 : 0,
|
|
10315
|
+
ordered.exclusiveMaximum && ordered.maximum !== undefined ? ordered.maximum.scale + 1 : 0
|
|
10316
|
+
)
|
|
10317
|
+
}
|
|
10318
|
+
|
|
10319
|
+
function bigDecimalValueConstraintsAtScale(
|
|
10320
|
+
ordered: Annotations.ToArbitrary.OrderedConstraint<BigDecimal_.BigDecimal>,
|
|
10321
|
+
scale: number
|
|
10322
|
+
): FastCheck.BigIntConstraints | undefined {
|
|
10323
|
+
const constraints: FastCheck.BigIntConstraints = {}
|
|
10324
|
+
if (ordered.minimum !== undefined) {
|
|
10325
|
+
constraints.min = bigDecimalMinValueAtScale(ordered.minimum, scale, ordered.exclusiveMinimum === true)
|
|
10326
|
+
}
|
|
10327
|
+
if (ordered.maximum !== undefined) {
|
|
10328
|
+
constraints.max = bigDecimalMaxValueAtScale(ordered.maximum, scale, ordered.exclusiveMaximum === true)
|
|
10329
|
+
}
|
|
10330
|
+
if (constraints.min !== undefined && constraints.max !== undefined && constraints.min > constraints.max) {
|
|
10331
|
+
return undefined
|
|
10332
|
+
}
|
|
10333
|
+
return constraints
|
|
10334
|
+
}
|
|
10335
|
+
|
|
10336
|
+
function bigDecimalScaleConstraints(
|
|
10337
|
+
ordered: Annotations.ToArbitrary.OrderedConstraint<BigDecimal_.BigDecimal>
|
|
10338
|
+
): FastCheck.IntegerConstraints {
|
|
10339
|
+
const max = bigDecimalMaxScale(ordered)
|
|
10340
|
+
if (bigDecimalValueConstraintsAtScale(ordered, max) === undefined) {
|
|
10341
|
+
throw new globalThis.Error(bigDecimalInvalidOrderedConstraintsError)
|
|
10342
|
+
}
|
|
10343
|
+
|
|
10344
|
+
let min = 0
|
|
10345
|
+
let high = max
|
|
10346
|
+
while (min < high) {
|
|
10347
|
+
const scale = min + Math.floor((high - min) / 2)
|
|
10348
|
+
if (bigDecimalValueConstraintsAtScale(ordered, scale) === undefined) {
|
|
10349
|
+
min = scale + 1
|
|
10350
|
+
} else {
|
|
10351
|
+
high = scale
|
|
10352
|
+
}
|
|
10353
|
+
}
|
|
10354
|
+
return { min, max }
|
|
10355
|
+
}
|
|
10356
|
+
|
|
10271
10357
|
/**
|
|
10272
10358
|
* Schema for `BigDecimal` values.
|
|
10273
10359
|
*
|
|
@@ -10304,9 +10390,23 @@ export const BigDecimal: BigDecimal = declare(
|
|
|
10304
10390
|
BigDecimalString,
|
|
10305
10391
|
SchemaTransformation.bigDecimalFromString
|
|
10306
10392
|
),
|
|
10307
|
-
toArbitrary: () => (fc) =>
|
|
10308
|
-
|
|
10309
|
-
.
|
|
10393
|
+
toArbitrary: () => (fc, ctx) => {
|
|
10394
|
+
const ordered = ctx.constraint?.ordered?.order === BigDecimal_.Order
|
|
10395
|
+
? ctx.constraint.ordered as Annotations.ToArbitrary.OrderedConstraint<BigDecimal_.BigDecimal>
|
|
10396
|
+
: undefined
|
|
10397
|
+
if (ordered === undefined) {
|
|
10398
|
+
return fc.tuple(fc.bigInt(), fc.integer({ min: 0, max: bigDecimalDefaultMaxScale }))
|
|
10399
|
+
.map(([value, scale]) => BigDecimal_.make(value, scale))
|
|
10400
|
+
}
|
|
10401
|
+
|
|
10402
|
+
return fc.integer(bigDecimalScaleConstraints(ordered)).chain((scale) => {
|
|
10403
|
+
const constraints = bigDecimalValueConstraintsAtScale(ordered, scale)
|
|
10404
|
+
if (constraints === undefined) {
|
|
10405
|
+
throw new globalThis.Error(bigDecimalInvalidOrderedConstraintsError)
|
|
10406
|
+
}
|
|
10407
|
+
return fc.bigInt(constraints).map((value) => BigDecimal_.make(value, scale))
|
|
10408
|
+
})
|
|
10409
|
+
},
|
|
10310
10410
|
toFormatter: () => (bd) => BigDecimal_.format(bd),
|
|
10311
10411
|
toEquivalence: () => BigDecimal_.Equivalence
|
|
10312
10412
|
}
|
|
@@ -11427,7 +11527,13 @@ export const DateTimeUtc: DateTimeUtc = declare(
|
|
|
11427
11527
|
SchemaTransformation.dateTimeUtcFromString
|
|
11428
11528
|
),
|
|
11429
11529
|
toArbitrary: () => (fc, ctx) =>
|
|
11430
|
-
fc.date(
|
|
11530
|
+
fc.date(dateArbitraryConstraints(
|
|
11531
|
+
ctx?.constraint,
|
|
11532
|
+
ctx?.constraint?.ordered?.order === DateTime.Order ? ctx.constraint.ordered : undefined,
|
|
11533
|
+
{ valid: true },
|
|
11534
|
+
DateTime.toDateUtc
|
|
11535
|
+
))
|
|
11536
|
+
.map((date) => DateTime.fromDateUnsafe(date)),
|
|
11431
11537
|
toFormatter: () => (utc) => utc.toString(),
|
|
11432
11538
|
toEquivalence: () => DateTime.Equivalence
|
|
11433
11539
|
}
|
|
@@ -11801,12 +11907,16 @@ export const DateTimeZoned: DateTimeZoned = declare(
|
|
|
11801
11907
|
),
|
|
11802
11908
|
toArbitrary: () => (fc, ctx) =>
|
|
11803
11909
|
fc.tuple(
|
|
11804
|
-
fc.date(
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11910
|
+
fc.date(dateArbitraryConstraints(
|
|
11911
|
+
ctx?.constraint,
|
|
11912
|
+
ctx?.constraint?.ordered?.order === DateTime.Order ? ctx.constraint.ordered : undefined,
|
|
11913
|
+
{
|
|
11914
|
+
max: new globalThis.Date(8640000000000000 - 14 * 60 * 60 * 1000),
|
|
11915
|
+
min: new globalThis.Date(-8640000000000000 + 14 * 60 * 60 * 1000),
|
|
11916
|
+
valid: true
|
|
11917
|
+
},
|
|
11918
|
+
DateTime.toDateUtc
|
|
11919
|
+
)),
|
|
11810
11920
|
fc.constantFrom("UTC", "Europe/London", "America/New_York", "Asia/Tokyo", "Australia/Sydney")
|
|
11811
11921
|
).map(([date, zone]) => DateTime.makeZonedUnsafe(date, { timeZone: zone })),
|
|
11812
11922
|
toFormatter: () => (zoned) => DateTime.formatIsoZoned(zoned),
|
|
@@ -12046,8 +12156,10 @@ function getClassSchemaFactory<S extends Top>(
|
|
|
12046
12156
|
identifier,
|
|
12047
12157
|
[SchemaAST.ClassTypeId]: ([from]: readonly [SchemaAST.AST]) => new SchemaAST.Link(from, transformation),
|
|
12048
12158
|
toCodec: ([from]: readonly [Codec<S["Encoded"]>]) => new SchemaAST.Link(from.ast, transformation),
|
|
12049
|
-
toArbitrary: ([from]: readonly [
|
|
12050
|
-
from.map((args) => new self(args)),
|
|
12159
|
+
toArbitrary: ([from]: readonly [Annotations.ToArbitrary.TypeParameter<S["Type"]>]) => () => ({
|
|
12160
|
+
arbitrary: from.arbitrary.map((args: S["Type"]) => new self(args)),
|
|
12161
|
+
terminal: from.terminal?.map((args: S["Type"]) => new self(args))
|
|
12162
|
+
}),
|
|
12051
12163
|
toFormatter: ([from]: readonly [Formatter<S["Type"]>]) => (t: Self) => `${self.identifier}(${from(t)})`,
|
|
12052
12164
|
"~sentinels": SchemaAST.collectSentinels(from.ast),
|
|
12053
12165
|
...annotations
|
|
@@ -12766,7 +12878,10 @@ export type LazyArbitrary<T> = (fc: typeof FastCheck) => FastCheck.Arbitrary<T>
|
|
|
12766
12878
|
*
|
|
12767
12879
|
* **Details**
|
|
12768
12880
|
*
|
|
12769
|
-
* Prefer {@link toArbitrary} when you
|
|
12881
|
+
* Prefer {@link toArbitrary} when you need the arbitrary directly, or when you
|
|
12882
|
+
* want derivation diagnostics via `{ report: true }`. Unsupported schema
|
|
12883
|
+
* nodes, impossible constraints, invalid candidates, and recursive schemas
|
|
12884
|
+
* without a finite terminal path fail immediately.
|
|
12770
12885
|
*
|
|
12771
12886
|
* @category Arbitrary
|
|
12772
12887
|
* @since 4.0.0
|
|
@@ -12780,6 +12895,13 @@ export function toArbitraryLazy<S extends Top>(schema: S): LazyArbitrary<S["Type
|
|
|
12780
12895
|
* Derives a `fast-check` `Arbitrary` from a schema for property-based
|
|
12781
12896
|
* testing. The derived arbitrary generates values that satisfy the schema.
|
|
12782
12897
|
*
|
|
12898
|
+
* **Details**
|
|
12899
|
+
*
|
|
12900
|
+
* Constraints refine base generators; candidates add weighted sources while
|
|
12901
|
+
* filters still validate every value. `{ report: true }` returns warnings such
|
|
12902
|
+
* as `OpaqueFilter`, while derivation errors remain fail-fast. Recursive
|
|
12903
|
+
* schemas use terminal branches and fail when no finite terminal path exists.
|
|
12904
|
+
*
|
|
12783
12905
|
* **Example** (Generating arbitrary values)
|
|
12784
12906
|
*
|
|
12785
12907
|
* ```ts
|
|
@@ -12798,7 +12920,24 @@ export function toArbitraryLazy<S extends Top>(schema: S): LazyArbitrary<S["Type
|
|
|
12798
12920
|
* @category Arbitrary
|
|
12799
12921
|
* @since 4.0.0
|
|
12800
12922
|
*/
|
|
12801
|
-
export function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitrary<S["Type"]>
|
|
12923
|
+
export function toArbitrary<S extends Top>(schema: S): FastCheck.Arbitrary<S["Type"]>
|
|
12924
|
+
export function toArbitrary<S extends Top>(
|
|
12925
|
+
schema: S,
|
|
12926
|
+
options: { readonly report: true }
|
|
12927
|
+
): Annotations.ToArbitrary.WithReport<FastCheck.Arbitrary<S["Type"]>>
|
|
12928
|
+
export function toArbitrary<S extends Top>(
|
|
12929
|
+
schema: S,
|
|
12930
|
+
options?: { readonly report?: boolean }
|
|
12931
|
+
): FastCheck.Arbitrary<S["Type"]> | Annotations.ToArbitrary.WithReport<FastCheck.Arbitrary<S["Type"]>> {
|
|
12932
|
+
if (options?.report === true) {
|
|
12933
|
+
const lawc = InternalArbitrary.memoized(schema.ast)
|
|
12934
|
+
const report = InternalArbitrary.makeReport()
|
|
12935
|
+
InternalArbitrary.collectReport(schema.ast, report)
|
|
12936
|
+
return {
|
|
12937
|
+
value: lawc(FastCheck, {}),
|
|
12938
|
+
report: InternalArbitrary.toReport(report)
|
|
12939
|
+
}
|
|
12940
|
+
}
|
|
12802
12941
|
return toArbitraryLazy(schema)(FastCheck)
|
|
12803
12942
|
}
|
|
12804
12943
|
|
|
@@ -13193,7 +13332,8 @@ function toCodecJsonBase(ast: SchemaAST.AST, recur: (ast: SchemaAST.AST) => Sche
|
|
|
13193
13332
|
ast.annotations,
|
|
13194
13333
|
ast.checks,
|
|
13195
13334
|
ast.encoding,
|
|
13196
|
-
ast.context
|
|
13335
|
+
ast.context,
|
|
13336
|
+
ast.encodingChecks
|
|
13197
13337
|
).recur(recur)
|
|
13198
13338
|
}
|
|
13199
13339
|
return ast.recur(recur)
|
|
@@ -13472,7 +13612,8 @@ function serializerTree(
|
|
|
13472
13612
|
ast.annotations,
|
|
13473
13613
|
ast.checks,
|
|
13474
13614
|
ast.encoding,
|
|
13475
|
-
ast.context
|
|
13615
|
+
ast.context,
|
|
13616
|
+
ast.encodingChecks
|
|
13476
13617
|
).recur(recur)
|
|
13477
13618
|
}
|
|
13478
13619
|
return ast.recur(recur)
|
|
@@ -13865,7 +14006,7 @@ export function resolveAnnotationsKey<S extends Top>(schema: S): Annotations.Key
|
|
|
13865
14006
|
* Use {@link resolveAnnotations} to read the annotations attached to a schema at
|
|
13866
14007
|
* runtime.
|
|
13867
14008
|
*
|
|
13868
|
-
* @since
|
|
14009
|
+
* @since 4.0.0
|
|
13869
14010
|
*/
|
|
13870
14011
|
export declare namespace Annotations {
|
|
13871
14012
|
/**
|
|
@@ -13909,7 +14050,7 @@ export declare namespace Annotations {
|
|
|
13909
14050
|
* ```
|
|
13910
14051
|
*
|
|
13911
14052
|
* @category models
|
|
13912
|
-
* @since
|
|
14053
|
+
* @since 4.0.0
|
|
13913
14054
|
*/
|
|
13914
14055
|
export interface Annotations {
|
|
13915
14056
|
readonly [x: string]: unknown
|
|
@@ -14038,7 +14179,7 @@ export declare namespace Annotations {
|
|
|
14038
14179
|
* values.
|
|
14039
14180
|
*
|
|
14040
14181
|
* @category utility types
|
|
14041
|
-
* @since
|
|
14182
|
+
* @since 4.0.0
|
|
14042
14183
|
*/
|
|
14043
14184
|
export type Type<TypeParameters extends ReadonlyArray<Top>> = {
|
|
14044
14185
|
readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Type"]>
|
|
@@ -14047,7 +14188,7 @@ export declare namespace Annotations {
|
|
|
14047
14188
|
* Maps declaration type-parameter schemas to codecs for their `Encoded` values.
|
|
14048
14189
|
*
|
|
14049
14190
|
* @category utility types
|
|
14050
|
-
* @since
|
|
14191
|
+
* @since 4.0.0
|
|
14051
14192
|
*/
|
|
14052
14193
|
export type Encoded<TypeParameters extends ReadonlyArray<Top>> = {
|
|
14053
14194
|
readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Encoded"]>
|
|
@@ -14103,7 +14244,7 @@ export declare namespace Annotations {
|
|
|
14103
14244
|
* Filters are intentionally non-parametric to keep them covariant.
|
|
14104
14245
|
*
|
|
14105
14246
|
* @category models
|
|
14106
|
-
* @since
|
|
14247
|
+
* @since 4.0.0
|
|
14107
14248
|
*/
|
|
14108
14249
|
export interface Filter extends Augment {
|
|
14109
14250
|
/**
|
|
@@ -14130,8 +14271,17 @@ export declare namespace Annotations {
|
|
|
14130
14271
|
* Optional metadata used to identify or extend the filter with custom data.
|
|
14131
14272
|
*/
|
|
14132
14273
|
readonly meta?: Meta | undefined
|
|
14133
|
-
|
|
14134
|
-
|
|
14274
|
+
/**
|
|
14275
|
+
* Optional hints used by arbitrary derivation for this filter.
|
|
14276
|
+
*
|
|
14277
|
+
* **Details**
|
|
14278
|
+
*
|
|
14279
|
+
* The same annotation can be attached to a single filter or a
|
|
14280
|
+
* `FilterGroup`. Group hints apply to the same schema node while child
|
|
14281
|
+
* filters are still collected and checked normally.
|
|
14282
|
+
*/
|
|
14283
|
+
readonly arbitrary?:
|
|
14284
|
+
| ToArbitrary.Filter
|
|
14135
14285
|
| undefined
|
|
14136
14286
|
/**
|
|
14137
14287
|
* Marks the filter as *structural*, meaning it applies to the shape or
|
|
@@ -14147,111 +14297,261 @@ export declare namespace Annotations {
|
|
|
14147
14297
|
|
|
14148
14298
|
/**
|
|
14149
14299
|
* Types used by arbitrary-derivation annotations to configure `toArbitrary`
|
|
14150
|
-
* hooks and
|
|
14300
|
+
* hooks, filter hints, candidate sources, diagnostics, and merged generation
|
|
14301
|
+
* constraints.
|
|
14151
14302
|
*
|
|
14152
14303
|
* @since 4.0.0
|
|
14153
14304
|
*/
|
|
14154
14305
|
export namespace ToArbitrary {
|
|
14155
14306
|
/**
|
|
14156
|
-
*
|
|
14157
|
-
*
|
|
14307
|
+
* Arbitrary-generation hints attached to a filter or filter group.
|
|
14308
|
+
*
|
|
14309
|
+
* **Details**
|
|
14310
|
+
*
|
|
14311
|
+
* `constraint` refines the schema node's base generator. `candidate` adds a
|
|
14312
|
+
* weighted source before all filters run. If neither hint is provided, the
|
|
14313
|
+
* filter does not guide generation; generated values are still checked by
|
|
14314
|
+
* the filter predicate. With `{ report: true }`, this is reported as
|
|
14315
|
+
* `OpaqueFilter`.
|
|
14316
|
+
*
|
|
14317
|
+
* @category models
|
|
14318
|
+
* @since 4.0.0
|
|
14319
|
+
*/
|
|
14320
|
+
export interface Filter {
|
|
14321
|
+
readonly constraint?: Constraint | undefined
|
|
14322
|
+
readonly candidate?: Candidate | undefined
|
|
14323
|
+
}
|
|
14324
|
+
|
|
14325
|
+
/**
|
|
14326
|
+
* Additional arbitrary source used before final filter checks run.
|
|
14327
|
+
*
|
|
14328
|
+
* **Details**
|
|
14329
|
+
*
|
|
14330
|
+
* The base generator keeps weight `1`; candidates default to weight `1`
|
|
14331
|
+
* and must use a positive integer weight. `make` receives the merged
|
|
14332
|
+
* constraint for the current node and may return `undefined` to opt out,
|
|
14333
|
+
* including for recursive terminal branches. Candidate values are still
|
|
14334
|
+
* checked by every schema filter, so invalid candidates affect efficiency but
|
|
14335
|
+
* not validity.
|
|
14158
14336
|
*
|
|
14159
14337
|
* @category models
|
|
14160
14338
|
* @since 4.0.0
|
|
14161
14339
|
*/
|
|
14162
|
-
export interface
|
|
14163
|
-
readonly
|
|
14340
|
+
export interface Candidate {
|
|
14341
|
+
readonly weight?: number | undefined
|
|
14342
|
+
readonly make: (
|
|
14343
|
+
fc: typeof FastCheck,
|
|
14344
|
+
context: Context
|
|
14345
|
+
) => FastCheck.Arbitrary<unknown> | undefined
|
|
14164
14346
|
}
|
|
14165
14347
|
|
|
14166
14348
|
/**
|
|
14167
|
-
*
|
|
14168
|
-
*
|
|
14349
|
+
* Ordered constraint accumulated from range checks.
|
|
14350
|
+
*
|
|
14351
|
+
* **Details**
|
|
14352
|
+
*
|
|
14353
|
+
* Generators consume these constraints only when they recognize `order`,
|
|
14354
|
+
* such as `Order.Number`, `Order.BigInt`, DateTime, or BigDecimal. Merging
|
|
14355
|
+
* constraints with different `Order` instances fails fast.
|
|
14169
14356
|
*
|
|
14170
14357
|
* @category models
|
|
14171
14358
|
* @since 4.0.0
|
|
14172
14359
|
*/
|
|
14173
|
-
export interface
|
|
14174
|
-
readonly
|
|
14360
|
+
export interface OrderedConstraint<T> {
|
|
14361
|
+
readonly order: Order.Order<T>
|
|
14362
|
+
readonly minimum?: T | undefined
|
|
14363
|
+
readonly exclusiveMinimum?: boolean | undefined
|
|
14364
|
+
readonly maximum?: T | undefined
|
|
14365
|
+
readonly exclusiveMaximum?: boolean | undefined
|
|
14175
14366
|
}
|
|
14176
14367
|
|
|
14177
14368
|
/**
|
|
14178
|
-
*
|
|
14179
|
-
*
|
|
14369
|
+
* Node-local arbitrary-generation constraint accumulated from schema checks.
|
|
14370
|
+
*
|
|
14371
|
+
* **Details**
|
|
14372
|
+
*
|
|
14373
|
+
* `Constraint` is a generation hint for the current schema AST node, not a
|
|
14374
|
+
* self-describing validation contract. Each generator consumes the fields it
|
|
14375
|
+
* understands for the current node and ignores the rest; final schema
|
|
14376
|
+
* filters still validate every generated value.
|
|
14377
|
+
*
|
|
14378
|
+
* `minLength` and `maxLength` represent node-local cardinality: string
|
|
14379
|
+
* length for strings, array length for arrays, final own-property count for
|
|
14380
|
+
* objects, and final size/cardinality for sets, maps, hash collections, and
|
|
14381
|
+
* chunks. `patterns` are concatenated and used by string generators.
|
|
14382
|
+
* `integer`, `noNaN`, `noInfinity`, `valid`, and `unique` are true when any
|
|
14383
|
+
* contributing filter sets them. Range bounds live in `ordered` so ordered
|
|
14384
|
+
* values can share the same representation.
|
|
14180
14385
|
*
|
|
14181
14386
|
* @category models
|
|
14182
14387
|
* @since 4.0.0
|
|
14183
14388
|
*/
|
|
14184
|
-
export interface
|
|
14389
|
+
export interface Constraint {
|
|
14390
|
+
readonly minLength?: number | undefined
|
|
14391
|
+
readonly maxLength?: number | undefined
|
|
14392
|
+
readonly patterns?: readonly [string, ...Array<string>]
|
|
14393
|
+
readonly integer?: boolean | undefined
|
|
14394
|
+
readonly noInfinity?: boolean | undefined
|
|
14395
|
+
readonly noNaN?: boolean | undefined
|
|
14396
|
+
readonly valid?: boolean | undefined
|
|
14397
|
+
readonly unique?: boolean | undefined
|
|
14398
|
+
readonly ordered?: OrderedConstraint<any> | undefined
|
|
14399
|
+
}
|
|
14185
14400
|
|
|
14186
14401
|
/**
|
|
14187
|
-
*
|
|
14188
|
-
*
|
|
14402
|
+
* Recursion budget passed to arbitrary-derivation hooks.
|
|
14403
|
+
*
|
|
14404
|
+
* **Details**
|
|
14405
|
+
*
|
|
14406
|
+
* Pass this object to `fc.oneof` when combining terminal and recursive
|
|
14407
|
+
* branches. Put the terminal branch first because fast-check uses only the
|
|
14408
|
+
* first branch once `maxDepth` is reached for `depthIdentifier`.
|
|
14189
14409
|
*
|
|
14190
14410
|
* @category models
|
|
14191
14411
|
* @since 4.0.0
|
|
14192
14412
|
*/
|
|
14193
|
-
export interface
|
|
14194
|
-
readonly
|
|
14413
|
+
export interface Recursion {
|
|
14414
|
+
readonly maxDepth: number
|
|
14415
|
+
readonly depthIdentifier: FastCheck.DepthIdentifier | string
|
|
14195
14416
|
}
|
|
14196
14417
|
|
|
14197
14418
|
/**
|
|
14198
|
-
*
|
|
14199
|
-
*
|
|
14419
|
+
* Context passed to arbitrary-derivation hooks and candidate factories.
|
|
14420
|
+
*
|
|
14421
|
+
* **Details**
|
|
14422
|
+
*
|
|
14423
|
+
* `constraint` contains the merged constraint for the current schema
|
|
14424
|
+
* node. `recursion` is present while deriving through a suspended schema;
|
|
14425
|
+
* hooks that build recursive alternatives should pass it to `fc.oneof` with
|
|
14426
|
+
* the finite branch first.
|
|
14200
14427
|
*
|
|
14201
14428
|
* @category models
|
|
14202
14429
|
* @since 4.0.0
|
|
14203
14430
|
*/
|
|
14204
|
-
export interface
|
|
14431
|
+
export interface Context {
|
|
14432
|
+
readonly constraint?: ToArbitrary.Constraint | undefined
|
|
14433
|
+
readonly recursion?: ToArbitrary.Recursion | undefined
|
|
14434
|
+
}
|
|
14205
14435
|
|
|
14206
14436
|
/**
|
|
14207
|
-
*
|
|
14208
|
-
*
|
|
14437
|
+
* Arbitrary generators derived for a declaration type parameter.
|
|
14438
|
+
*
|
|
14439
|
+
* **Details**
|
|
14440
|
+
*
|
|
14441
|
+
* `arbitrary` is the normal generator. `terminal` is the finite generator
|
|
14442
|
+
* used while building recursive terminal branches and is `undefined` when
|
|
14443
|
+
* no finite path is known. Optional containers can ignore it; non-empty
|
|
14444
|
+
* containers need it for their terminal branch.
|
|
14209
14445
|
*
|
|
14210
14446
|
* @category models
|
|
14211
14447
|
* @since 4.0.0
|
|
14212
14448
|
*/
|
|
14213
|
-
export interface
|
|
14214
|
-
readonly
|
|
14215
|
-
readonly
|
|
14216
|
-
readonly bigint?: BigIntConstraints | undefined
|
|
14217
|
-
readonly array?: ArrayConstraints | undefined
|
|
14218
|
-
readonly date?: DateConstraints | undefined
|
|
14449
|
+
export interface TypeParameter<T> {
|
|
14450
|
+
readonly arbitrary: FastCheck.Arbitrary<T>
|
|
14451
|
+
readonly terminal: FastCheck.Arbitrary<T> | undefined
|
|
14219
14452
|
}
|
|
14220
14453
|
|
|
14221
14454
|
/**
|
|
14222
|
-
*
|
|
14223
|
-
*
|
|
14224
|
-
*
|
|
14455
|
+
* Arbitrary derivation returned by declaration hooks.
|
|
14456
|
+
*
|
|
14457
|
+
* **Details**
|
|
14458
|
+
*
|
|
14459
|
+
* `arbitrary` is the normal generator. `terminal` is an optional finite
|
|
14460
|
+
* branch for recursive schemas. If omitted, it defaults to `arbitrary` only
|
|
14461
|
+
* for declarations without type parameters.
|
|
14225
14462
|
*
|
|
14226
14463
|
* @category models
|
|
14227
|
-
* @since
|
|
14464
|
+
* @since 4.0.0
|
|
14228
14465
|
*/
|
|
14229
|
-
export interface
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
* is to avoid infinite recursion when generating arbitrary values for
|
|
14233
|
-
* suspends, so implementations should try to avoid excessive recursion.
|
|
14234
|
-
*/
|
|
14235
|
-
readonly isSuspend?: boolean | undefined
|
|
14236
|
-
readonly constraints?: ToArbitrary.Constraint | undefined
|
|
14466
|
+
export interface Derivation<T> {
|
|
14467
|
+
readonly arbitrary: FastCheck.Arbitrary<T>
|
|
14468
|
+
readonly terminal?: FastCheck.Arbitrary<T> | undefined
|
|
14237
14469
|
}
|
|
14238
14470
|
|
|
14471
|
+
/**
|
|
14472
|
+
* Output accepted from declaration arbitrary hooks.
|
|
14473
|
+
*
|
|
14474
|
+
* **Details**
|
|
14475
|
+
*
|
|
14476
|
+
* A bare fast-check arbitrary is shorthand for `{ arbitrary }`, useful for
|
|
14477
|
+
* atomic declarations such as URLs. Generic declarations that need precise
|
|
14478
|
+
* recursive behavior should return a {@link Derivation} with `terminal`.
|
|
14479
|
+
*
|
|
14480
|
+
* @category models
|
|
14481
|
+
* @since 4.0.0
|
|
14482
|
+
*/
|
|
14483
|
+
export type Output<T> = FastCheck.Arbitrary<T> | Derivation<T>
|
|
14484
|
+
|
|
14239
14485
|
/**
|
|
14240
14486
|
* Hook signature for declaration schema arbitrary annotations.
|
|
14241
14487
|
*
|
|
14242
14488
|
* **Details**
|
|
14243
14489
|
*
|
|
14244
|
-
*
|
|
14245
|
-
*
|
|
14490
|
+
* Type parameters expose normal and terminal generators. A declaration with
|
|
14491
|
+
* no type parameters can return a bare arbitrary; a generic declaration
|
|
14492
|
+
* must return `terminal` explicitly when it has a finite branch depending on
|
|
14493
|
+
* parameters.
|
|
14246
14494
|
*
|
|
14247
14495
|
* @category models
|
|
14248
14496
|
* @since 4.0.0
|
|
14249
14497
|
*/
|
|
14250
14498
|
export interface Declaration<T, TypeParameters extends ReadonlyArray<Top>> {
|
|
14251
14499
|
(
|
|
14252
|
-
/*
|
|
14253
|
-
typeParameters: { readonly [K in keyof TypeParameters]:
|
|
14254
|
-
): (fc: typeof FastCheck, context: Context) =>
|
|
14500
|
+
/* Arbitrary derivations for any type parameters of the schema (if present) */
|
|
14501
|
+
typeParameters: { readonly [K in keyof TypeParameters]: TypeParameter<TypeParameters[K]["Type"]> }
|
|
14502
|
+
): (fc: typeof FastCheck, context: Context) => Output<T>
|
|
14503
|
+
}
|
|
14504
|
+
|
|
14505
|
+
/**
|
|
14506
|
+
* Wraps a derived value together with arbitrary-derivation diagnostics.
|
|
14507
|
+
*
|
|
14508
|
+
* @category models
|
|
14509
|
+
* @since 4.0.0
|
|
14510
|
+
*/
|
|
14511
|
+
export interface WithReport<A> {
|
|
14512
|
+
readonly value: A
|
|
14513
|
+
readonly report: Report
|
|
14514
|
+
}
|
|
14515
|
+
|
|
14516
|
+
/**
|
|
14517
|
+
* Diagnostics collected while deriving an arbitrary.
|
|
14518
|
+
*
|
|
14519
|
+
* **Details**
|
|
14520
|
+
*
|
|
14521
|
+
* Reports contain warnings only. Unsupported schema nodes, impossible
|
|
14522
|
+
* constraints, invalid candidate weights, and throwing candidate factories
|
|
14523
|
+
* fail immediately.
|
|
14524
|
+
*
|
|
14525
|
+
* @category models
|
|
14526
|
+
* @since 4.0.0
|
|
14527
|
+
*/
|
|
14528
|
+
export interface Report {
|
|
14529
|
+
readonly warnings: ReadonlyArray<Warning>
|
|
14530
|
+
}
|
|
14531
|
+
|
|
14532
|
+
/**
|
|
14533
|
+
* Non-fatal arbitrary-derivation warning.
|
|
14534
|
+
*
|
|
14535
|
+
* @category models
|
|
14536
|
+
* @since 4.0.0
|
|
14537
|
+
*/
|
|
14538
|
+
export type Warning = OpaqueFilterWarning
|
|
14539
|
+
|
|
14540
|
+
/**
|
|
14541
|
+
* Warning emitted when a filter is handled only by the final `.filter`.
|
|
14542
|
+
*
|
|
14543
|
+
* **Details**
|
|
14544
|
+
*
|
|
14545
|
+
* The filter is still enforced. The warning means it did not contribute
|
|
14546
|
+
* a constraint or candidate, so generation may rely on fast-check discards.
|
|
14547
|
+
*
|
|
14548
|
+
* @category models
|
|
14549
|
+
* @since 4.0.0
|
|
14550
|
+
*/
|
|
14551
|
+
export interface OpaqueFilterWarning {
|
|
14552
|
+
readonly _tag: "OpaqueFilter"
|
|
14553
|
+
readonly path: ReadonlyArray<PropertyKey>
|
|
14554
|
+
readonly description?: string | undefined
|
|
14255
14555
|
}
|
|
14256
14556
|
}
|
|
14257
14557
|
|