effect 4.0.0-beta.102 → 4.0.0-beta.103
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 +971 -1037
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +381 -407
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +433 -756
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +200 -325
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +207 -267
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +107 -135
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +146 -188
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +64 -84
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +405 -254
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +166 -101
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +167 -277
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +122 -176
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +729 -768
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +514 -440
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +1 -1
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +834 -1173
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +326 -439
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +180 -49
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +96 -31
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +20 -33
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +18 -30
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +225 -173
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +336 -265
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +194 -68
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +115 -80
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +233 -33
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +232 -32
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +151 -274
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +171 -214
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +68 -77
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +57 -66
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +13 -15
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +9 -10
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +60 -80
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +16 -23
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +562 -660
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +307 -362
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +253 -256
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +104 -96
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +216 -308
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +132 -186
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2841 -3247
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +1322 -1546
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +22 -40
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +22 -40
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +33 -37
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +29 -21
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +103 -105
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +77 -79
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +51 -27
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +50 -26
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +13 -55
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +7 -28
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +116 -192
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +82 -130
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +82 -146
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +48 -87
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +152 -105
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +106 -73
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +213 -168
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +114 -89
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +123 -81
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +85 -59
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +153 -264
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +42 -147
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +61 -33
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +26 -15
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +25 -33
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +48 -49
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +76 -145
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +40 -57
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +360 -714
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +168 -297
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +12 -6
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +47 -83
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +46 -68
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +319 -411
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +122 -166
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +1 -0
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +177 -284
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +68 -109
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +12 -12
- package/dist/Inspectable.js +8 -8
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +620 -786
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +228 -306
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +11 -13
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +44 -102
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +8 -8
- package/dist/JsonPointer.js +8 -8
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +98 -44
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +297 -234
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +23 -35
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +16 -28
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +359 -260
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +195 -175
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +42 -29
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +31 -21
- package/dist/LayerMap.js.map +1 -1
- package/dist/LayerRef.d.ts +6 -2
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +6 -2
- package/dist/LayerRef.js.map +1 -1
- package/dist/LogLevel.d.ts +114 -214
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +41 -76
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +218 -467
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +204 -450
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +7 -5
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +7 -5
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +217 -252
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +150 -183
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +442 -993
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +198 -642
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +144 -173
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +68 -79
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +84 -89
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +44 -47
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +71 -370
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +59 -284
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +420 -243
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +209 -120
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +21 -14
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +15 -13
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +7 -137
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +5 -93
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +196 -233
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +90 -109
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +97 -189
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +187 -290
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +447 -812
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +211 -392
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +109 -109
- package/dist/Order.js +91 -91
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +20 -23
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +8 -9
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +38 -41
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +3 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +6 -5
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +2 -2
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +4 -4
- package/dist/PlatformError.js +3 -3
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +4 -2
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +4 -2
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +200 -181
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +100 -108
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +7 -7
- package/dist/PrimaryKey.js +5 -5
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +425 -494
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +373 -362
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +24 -18
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +11 -9
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +200 -159
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +162 -132
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +49 -74
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +35 -54
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +121 -63
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +42 -21
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +24 -13
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +15 -9
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +291 -488
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +111 -202
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +6 -2
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +7 -2
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +25 -25
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +19 -20
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +8 -15
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +6 -12
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +95 -165
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +75 -122
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +102 -168
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +102 -168
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +10 -14
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +10 -14
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +31 -21
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +16 -13
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +201 -90
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +87 -41
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +302 -470
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +133 -217
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +50 -75
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +39 -60
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +290 -1636
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +162 -803
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +5 -5
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +18 -6
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +644 -642
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +491 -527
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +27 -50
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +366 -279
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaError.d.ts +7 -6
- package/dist/SchemaError.d.ts.map +1 -1
- package/dist/SchemaError.js +7 -6
- package/dist/SchemaError.js.map +1 -1
- package/dist/SchemaGetter.d.ts +217 -174
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +218 -185
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +62 -190
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +73 -265
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +2 -2
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +123 -75
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +22 -36
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +20 -26
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +114 -74
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +120 -85
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +123 -151
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +72 -92
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +3 -3
- package/dist/ScopedRef.js +2 -2
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +96 -10
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +78 -39
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +117 -107
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +107 -100
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +1 -1
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +2415 -2949
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +1078 -1381
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +262 -308
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +184 -215
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +109 -114
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +41 -50
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +282 -250
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +104 -92
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +3 -3
- package/dist/Symbol.js +3 -3
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +2 -2
- package/dist/Terminal.js +1 -1
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +100 -54
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +41 -24
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +287 -679
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +109 -251
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +92 -127
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +42 -57
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +201 -121
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +85 -56
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +62 -46
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +30 -22
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +631 -779
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +268 -330
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +297 -236
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +130 -100
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +126 -95
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +74 -56
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +101 -88
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +87 -66
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +200 -180
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +160 -136
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +97 -66
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +67 -45
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +51 -32
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +23 -15
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +129 -95
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +85 -70
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +97 -70
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +44 -34
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +126 -67
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +45 -65
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +6 -9
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +23 -16
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +3 -7
- package/dist/Utils.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/array.js.map +1 -1
- package/dist/internal/core.js +1 -1
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +4 -0
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/doNotation.js.map +1 -1
- package/dist/internal/effect.js +77 -40
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/equal.js.map +1 -1
- package/dist/internal/errors.js.map +1 -1
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/hashSet.js.map +1 -1
- package/dist/internal/layer.js.map +1 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/metric.js.map +1 -1
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/persistence.d.ts +2 -0
- package/dist/internal/persistence.d.ts.map +1 -0
- package/dist/internal/persistence.js +3 -0
- package/dist/internal/persistence.js.map +1 -0
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/record.js.map +1 -1
- package/dist/internal/redacted.js.map +1 -1
- package/dist/internal/references.js +3 -0
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/cause.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.js +13 -11
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/fromRepresentation.js +8 -15
- package/dist/internal/schema/fromRepresentation.js.map +1 -1
- package/dist/internal/schema/parser.d.ts +14 -0
- package/dist/internal/schema/parser.d.ts.map +1 -0
- package/dist/internal/schema/parser.js +13 -0
- package/dist/internal/schema/parser.js.map +1 -0
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/schema/toArbitrary.js.map +1 -1
- package/dist/internal/schema/toCodeDocument.js.map +1 -1
- package/dist/internal/schema/toEquivalence.js.map +1 -1
- package/dist/internal/schema/toJsonSchemaDocument.js +48 -6
- package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/toRepresentation.js +87 -107
- package/dist/internal/schema/toRepresentation.js.map +1 -1
- package/dist/internal/stackTraceLimit.js.map +1 -1
- package/dist/internal/stream.js.map +1 -1
- package/dist/internal/tracer.js.map +1 -1
- package/dist/internal/trie.js +13 -9
- package/dist/internal/trie.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +8 -7
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +8 -7
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +57 -28
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +50 -18
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +32 -31
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +24 -22
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +29 -29
- package/dist/testing/TestSchema.js +25 -25
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +95 -118
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +94 -117
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +132 -97
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +55 -51
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +32 -28
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +26 -21
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +107 -67
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +104 -64
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpProtocol.d.ts +30 -0
- package/dist/unstable/ai/McpProtocol.d.ts.map +1 -0
- package/dist/unstable/ai/McpProtocol.js +20 -0
- package/dist/unstable/ai/McpProtocol.js.map +1 -0
- package/dist/unstable/ai/McpSchema.d.ts +141 -75
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +58 -50
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +68 -59
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +694 -241
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +8 -19
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +9 -20
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +112 -38
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +53 -17
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +28 -14
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +9 -4
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +46 -13
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +18 -7
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +14 -3
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +10 -2
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +59 -44
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +48 -39
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +26 -8
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +18 -4
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +4 -0
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +4 -0
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
- package/dist/unstable/ai/internal/mcpProtocol.d.ts +21 -0
- package/dist/unstable/ai/internal/mcpProtocol.d.ts.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocol.js +22 -0
- package/dist/unstable/ai/internal/mcpProtocol.js.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts +2 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.js +32 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.js.map +1 -0
- package/dist/unstable/ai/internal/structured-output.js +14 -15
- package/dist/unstable/ai/internal/structured-output.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +273 -69
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +111 -33
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliConfig.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +69 -76
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +57 -61
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +35 -54
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +26 -42
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +705 -107
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +238 -42
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +418 -138
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +197 -71
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +1 -1
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +12 -4
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/Param.d.ts +292 -78
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +128 -46
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +370 -149
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +344 -136
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +23 -14
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +23 -14
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/auto-suggest.js.map +1 -1
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
- package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/help.js.map +1 -1
- package/dist/unstable/cli/internal/lexer.js +17 -7
- package/dist/unstable/cli/internal/lexer.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +2 -2
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +8 -8
- package/dist/unstable/cluster/ClusterSchema.js +8 -8
- 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 +5 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +10 -10
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +8 -8
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +4 -2
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +4 -2
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.js +2 -2
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +3 -3
- package/dist/unstable/cluster/Envelope.js +3 -3
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +6 -4
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +9 -9
- package/dist/unstable/cluster/Message.js +6 -6
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +15 -15
- package/dist/unstable/cluster/MessageStorage.js +5 -5
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +4 -4
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +1 -1
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +2 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +16 -16
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +2 -2
- package/dist/unstable/cluster/RunnerStorage.js +1 -1
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +6 -6
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +19 -10
- package/dist/unstable/cluster/Runners.js.map +1 -1
- 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 +3 -2
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +3 -3
- package/dist/unstable/cluster/ShardingConfig.js +3 -3
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +8 -8
- package/dist/unstable/cluster/Snowflake.js +8 -8
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +1 -1
- 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 +20 -5
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/index.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +5 -5
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/hash.js.map +1 -1
- package/dist/unstable/cluster/internal/interruptors.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/cluster/internal/shardLock.js.map +1 -1
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/devtools/index.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +6 -8
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +72 -8
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +58 -8
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +20 -20
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +4 -4
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +15 -15
- package/dist/unstable/eventlog/EventJournal.js +13 -13
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +3 -3
- package/dist/unstable/eventlog/EventLog.js +3 -3
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +2 -2
- package/dist/unstable/eventlog/EventLogMessage.js +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -15
- package/dist/unstable/eventlog/EventLogRemote.js +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +11 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +45 -21
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +4 -4
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +13 -5
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -5
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +14 -6
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +2 -2
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +30 -18
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +1 -1
- package/dist/unstable/http/Etag.js +1 -1
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +2 -2
- package/dist/unstable/http/Headers.js +2 -2
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +5 -3
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +11 -5
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +51 -44
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +46 -17
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +2 -0
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +4 -4
- package/dist/unstable/http/HttpClientResponse.js +2 -2
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +6 -6
- package/dist/unstable/http/HttpEffect.js +3 -3
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +6 -9
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +6 -9
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +75 -9
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +164 -39
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +76 -0
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +32 -0
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +88 -89
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +78 -79
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +13 -13
- package/dist/unstable/http/HttpServer.js +6 -6
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +2 -2
- package/dist/unstable/http/HttpServerError.js +2 -2
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
- package/dist/unstable/http/HttpServerRequest.js +4 -4
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +22 -0
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +10 -0
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +35 -7
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +35 -7
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +6 -6
- package/dist/unstable/http/Multipart.js +5 -5
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +33 -63
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +14 -28
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +10 -18
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +9 -17
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/compression.d.ts +2 -0
- package/dist/unstable/http/internal/compression.d.ts.map +1 -0
- package/dist/unstable/http/internal/compression.js +155 -0
- package/dist/unstable/http/internal/compression.js.map +1 -0
- package/dist/unstable/http/internal/preResponseHandler.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +10 -11
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +4 -5
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +11 -13
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +42 -42
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.js +13 -13
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +15 -15
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +71 -24
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +57 -10
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +0 -12
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +6 -6
- package/dist/unstable/httpapi/HttpApiSchema.js +4 -4
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +13 -13
- package/dist/unstable/httpapi/OpenApi.js +13 -13
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/httpapi/index.js.map +1 -1
- package/dist/unstable/httpapi/internal/html.js.map +1 -1
- package/dist/unstable/httpapi/internal/httpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/internal/httpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/internal/mediaType.js.map +1 -1
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +12 -14
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +17 -4
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +4 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +16 -7
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +21 -12
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +13 -4
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +10 -3
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js.map +1 -1
- package/dist/unstable/observability/internal/otlpProtobuf.js.map +1 -1
- package/dist/unstable/observability/internal/protobuf.js +3 -0
- package/dist/unstable/observability/internal/protobuf.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +8 -3
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +22 -13
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +8 -8
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +6 -6
- package/dist/unstable/persistence/PersistedQueue.js +6 -6
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +3 -3
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +91 -15
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +26 -15
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +24 -13
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +2 -2
- package/dist/unstable/persistence/Redis.js +1 -1
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/persistence/index.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +64 -21
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +14 -5
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +21 -10
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +8 -8
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +10 -10
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +25 -22
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +14 -13
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +4 -1
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +24 -3
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +4 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +1 -1
- package/dist/unstable/reactivity/Hydration.js +1 -1
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +35 -33
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +4 -2
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +12 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +12 -11
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +8 -8
- package/dist/unstable/rpc/RpcGroup.js +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +31 -30
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +6 -6
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +10 -10
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +4 -4
- package/dist/unstable/rpc/RpcSchema.js +3 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +58 -7
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +175 -96
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +13 -13
- package/dist/unstable/rpc/RpcServer.js +17 -13
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +5 -5
- package/dist/unstable/rpc/RpcWorker.js +4 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/rpc/index.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +52 -50
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +35 -33
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +5 -5
- package/dist/unstable/schema/VariantSchema.js +2 -2
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/schema/index.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +11 -3
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +9 -4
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/socket/index.js.map +1 -1
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +2 -2
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +2 -2
- package/dist/unstable/sql/SqlModel.js +2 -2
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +5 -5
- package/dist/unstable/sql/SqlResolver.js +2 -2
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +6 -6
- package/dist/unstable/sql/Statement.js +15 -15
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +2 -2
- package/dist/unstable/workers/Worker.js +2 -2
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +7 -7
- package/dist/unstable/workers/WorkerError.js +6 -6
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +1 -1
- package/dist/unstable/workers/WorkerRunner.js +1 -1
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +2 -2
- package/dist/unstable/workflow/Activity.js +2 -2
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +1 -1
- package/dist/unstable/workflow/DurableClock.js +1 -1
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +10 -10
- package/dist/unstable/workflow/DurableDeferred.js +5 -5
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +22 -20
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +22 -20
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +21 -21
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +13 -14
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +4 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +4 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/dist/unstable/workflow/index.js.map +1 -1
- package/dist/unstable/workflow/internal/crypto.js.map +1 -1
- package/package.json +5 -6
- package/src/Array.ts +982 -1045
- package/src/BigDecimal.ts +433 -756
- package/src/BigInt.ts +213 -269
- package/src/Boolean.ts +146 -188
- package/src/Cache.ts +409 -255
- package/src/Cause.ts +167 -277
- package/src/Channel.ts +891 -816
- package/src/ChannelSchema.ts +1 -1
- package/src/Chunk.ts +841 -1181
- package/src/Clock.ts +181 -49
- package/src/Combiner.ts +20 -33
- package/src/Config.ts +615 -332
- package/src/ConfigProvider.ts +214 -120
- package/src/Console.ts +289 -39
- package/src/Context.ts +319 -378
- package/src/Cron.ts +68 -77
- package/src/Crypto.ts +13 -15
- package/src/Data.ts +60 -80
- package/src/DateTime.ts +564 -660
- package/src/Deferred.ts +253 -256
- package/src/Duration.ts +216 -308
- package/src/Effect.ts +2893 -3279
- package/src/Encoding.ts +22 -40
- package/src/Equal.ts +49 -39
- package/src/Equivalence.ts +103 -105
- package/src/ErrorReporter.ts +51 -27
- package/src/ExecutionPlan.ts +13 -55
- package/src/Exit.ts +116 -192
- package/src/Fiber.ts +81 -148
- package/src/FiberHandle.ts +152 -105
- package/src/FiberMap.ts +225 -174
- package/src/FiberSet.ts +124 -82
- package/src/FileSystem.ts +155 -263
- package/src/Filter.ts +61 -33
- package/src/Formatter.ts +54 -56
- package/src/Function.ts +76 -145
- package/src/Graph.ts +416 -770
- package/src/HKT.ts +12 -6
- package/src/Hash.ts +52 -83
- package/src/HashMap.ts +319 -411
- package/src/HashRing.ts +1 -0
- package/src/HashSet.ts +177 -284
- package/src/Inspectable.ts +12 -12
- package/src/Iterable.ts +620 -786
- package/src/JsonPatch.ts +58 -112
- package/src/JsonPointer.ts +8 -8
- package/src/JsonSchema.ts +402 -244
- package/src/Latch.ts +23 -35
- package/src/Layer.ts +359 -260
- package/src/LayerMap.ts +49 -29
- package/src/LayerRef.ts +6 -2
- package/src/LogLevel.ts +114 -214
- package/src/Logger.ts +344 -697
- package/src/ManagedRuntime.ts +7 -5
- package/src/Match.ts +217 -252
- package/src/Metric.ts +516 -1089
- package/src/MutableHashMap.ts +218 -255
- package/src/MutableHashSet.ts +84 -89
- package/src/MutableList.ts +73 -370
- package/src/MutableRef.ts +420 -243
- package/src/Newtype.ts +21 -14
- package/src/NonEmptyIterable.ts +7 -137
- package/src/Number.ts +196 -233
- package/src/Optic.ts +243 -383
- package/src/Option.ts +447 -812
- package/src/Order.ts +109 -109
- package/src/Ordering.ts +20 -23
- package/src/Path.ts +38 -41
- package/src/Pipeable.ts +6 -5
- package/src/PlatformError.ts +4 -4
- package/src/Pool.ts +4 -2
- package/src/Predicate.ts +200 -181
- package/src/PrimaryKey.ts +7 -7
- package/src/PubSub.ts +526 -552
- package/src/Pull.ts +24 -18
- package/src/Queue.ts +200 -159
- package/src/Random.ts +49 -74
- package/src/RcMap.ts +121 -63
- package/src/RcRef.ts +24 -13
- package/src/Record.ts +291 -488
- package/src/Redactable.ts +10 -3
- package/src/Redacted.ts +25 -25
- package/src/Reducer.ts +8 -15
- package/src/Ref.ts +221 -361
- package/src/References.ts +102 -168
- package/src/RegExp.ts +10 -14
- package/src/Request.ts +31 -21
- package/src/RequestResolver.ts +202 -91
- package/src/Result.ts +312 -484
- package/src/Runtime.ts +50 -75
- package/src/Schedule.ts +308 -1734
- package/src/Scheduler.ts +20 -7
- package/src/Schema.ts +716 -745
- package/src/SchemaAST.ts +466 -358
- package/src/SchemaError.ts +7 -6
- package/src/SchemaGetter.ts +242 -190
- package/src/SchemaIssue.ts +89 -275
- package/src/SchemaParser.ts +180 -93
- package/src/SchemaRepresentation.ts +22 -40
- package/src/SchemaTransformation.ts +129 -88
- package/src/Scope.ts +123 -151
- package/src/ScopedRef.ts +4 -4
- package/src/Semaphore.ts +152 -51
- package/src/Sink.ts +128 -113
- package/src/Stdio.ts +1 -1
- package/src/Stream.ts +2602 -3123
- package/src/String.ts +275 -312
- package/src/Struct.ts +109 -114
- package/src/SubscriptionRef.ts +284 -252
- package/src/Symbol.ts +3 -3
- package/src/Terminal.ts +2 -2
- package/src/Tracer.ts +102 -55
- package/src/Trie.ts +287 -679
- package/src/Tuple.ts +92 -127
- package/src/TxChunk.ts +201 -121
- package/src/TxDeferred.ts +62 -46
- package/src/TxHashMap.ts +645 -799
- package/src/TxHashSet.ts +443 -356
- package/src/TxPriorityQueue.ts +130 -98
- package/src/TxPubSub.ts +107 -80
- package/src/TxQueue.ts +214 -183
- package/src/TxReentrantLock.ts +97 -66
- package/src/TxRef.ts +51 -32
- package/src/TxSemaphore.ts +129 -95
- package/src/TxSubscriptionRef.ts +97 -70
- package/src/Types.ts +126 -67
- package/src/Unify.ts +45 -65
- package/src/Utils.ts +23 -16
- package/src/internal/core.ts +2 -2
- package/src/internal/dateTime.ts +6 -0
- package/src/internal/effect.ts +93 -48
- package/src/internal/persistence.ts +2 -0
- package/src/internal/references.ts +3 -2
- package/src/internal/schema/fromJsonSchemaDocument.ts +15 -13
- package/src/internal/schema/fromRepresentation.ts +10 -16
- package/src/internal/schema/parser.ts +22 -0
- package/src/internal/schema/toJsonSchemaDocument.ts +60 -6
- package/src/internal/schema/toRepresentation.ts +104 -119
- package/src/internal/trie.ts +10 -11
- package/src/testing/FastCheck.ts +8 -7
- package/src/testing/TestClock.ts +72 -30
- package/src/testing/TestConsole.ts +32 -31
- package/src/testing/TestSchema.ts +29 -29
- package/src/unstable/ai/AiError.ts +95 -118
- package/src/unstable/ai/AnthropicStructuredOutput.ts +1 -1
- package/src/unstable/ai/Chat.ts +132 -97
- package/src/unstable/ai/IdGenerator.ts +32 -28
- package/src/unstable/ai/LanguageModel.ts +107 -67
- package/src/unstable/ai/McpProtocol.ts +48 -0
- package/src/unstable/ai/McpSchema.ts +60 -50
- package/src/unstable/ai/McpServer.ts +930 -304
- package/src/unstable/ai/Model.ts +9 -20
- package/src/unstable/ai/OpenAiStructuredOutput.ts +1 -1
- package/src/unstable/ai/Prompt.ts +145 -43
- package/src/unstable/ai/Response.ts +28 -14
- package/src/unstable/ai/Telemetry.ts +46 -13
- package/src/unstable/ai/Tokenizer.ts +14 -3
- package/src/unstable/ai/Tool.ts +59 -44
- package/src/unstable/ai/Toolkit.ts +26 -8
- package/src/unstable/ai/index.ts +5 -0
- package/src/unstable/ai/internal/mcpProtocol.ts +85 -0
- package/src/unstable/ai/internal/mcpProtocolRegistry.ts +70 -0
- package/src/unstable/ai/internal/structured-output.ts +13 -18
- package/src/unstable/cli/Argument.ts +273 -69
- package/src/unstable/cli/CliError.ts +69 -76
- package/src/unstable/cli/CliOutput.ts +44 -58
- package/src/unstable/cli/Command.ts +705 -107
- package/src/unstable/cli/Flag.ts +418 -138
- package/src/unstable/cli/GlobalFlag.ts +1 -1
- package/src/unstable/cli/HelpDoc.ts +12 -4
- package/src/unstable/cli/Param.ts +292 -78
- package/src/unstable/cli/Primitive.ts +370 -149
- package/src/unstable/cli/Prompt.ts +28 -14
- package/src/unstable/cli/internal/lexer.ts +8 -2
- package/src/unstable/cli/internal/parser.ts +2 -2
- package/src/unstable/cluster/ClusterSchema.ts +8 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +5 -1
- package/src/unstable/cluster/Entity.ts +15 -16
- package/src/unstable/cluster/EntityProxy.ts +4 -2
- package/src/unstable/cluster/EntityResource.ts +2 -2
- package/src/unstable/cluster/Envelope.ts +3 -3
- package/src/unstable/cluster/HttpRunner.ts +6 -4
- package/src/unstable/cluster/Message.ts +9 -9
- package/src/unstable/cluster/MessageStorage.ts +15 -15
- package/src/unstable/cluster/Reply.ts +4 -6
- package/src/unstable/cluster/RunnerHealth.ts +1 -1
- package/src/unstable/cluster/RunnerServer.ts +41 -8
- package/src/unstable/cluster/RunnerStorage.ts +2 -2
- package/src/unstable/cluster/Runners.ts +23 -12
- package/src/unstable/cluster/Sharding.ts +7 -8
- package/src/unstable/cluster/ShardingConfig.ts +3 -3
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +8 -8
- package/src/unstable/cluster/SqlMessageStorage.ts +1 -1
- package/src/unstable/cluster/SqlRunnerStorage.ts +21 -5
- package/src/unstable/cluster/internal/entityManager.ts +11 -15
- package/src/unstable/encoding/Msgpack.ts +6 -8
- package/src/unstable/encoding/Sse.ts +98 -16
- package/src/unstable/eventlog/Event.ts +20 -20
- package/src/unstable/eventlog/EventGroup.ts +4 -4
- package/src/unstable/eventlog/EventJournal.ts +15 -15
- package/src/unstable/eventlog/EventLog.ts +3 -3
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogMessage.ts +2 -2
- package/src/unstable/eventlog/EventLogRemote.ts +1 -1
- package/src/unstable/eventlog/EventLogServer.ts +41 -7
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +13 -5
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +14 -6
- package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
- package/src/unstable/http/Cookies.ts +35 -21
- package/src/unstable/http/Etag.ts +1 -1
- package/src/unstable/http/FetchHttpClient.ts +3 -1
- package/src/unstable/http/Headers.ts +2 -2
- package/src/unstable/http/HttpBody.ts +20 -5
- package/src/unstable/http/HttpClient.ts +83 -55
- package/src/unstable/http/HttpClientRequest.ts +2 -0
- package/src/unstable/http/HttpClientResponse.ts +4 -4
- package/src/unstable/http/HttpEffect.ts +8 -8
- package/src/unstable/http/HttpMethod.ts +6 -9
- package/src/unstable/http/HttpMiddleware.ts +202 -39
- package/src/unstable/http/HttpPlatform.ts +95 -0
- package/src/unstable/http/HttpRouter.ts +102 -98
- package/src/unstable/http/HttpServer.ts +13 -13
- package/src/unstable/http/HttpServerError.ts +2 -2
- package/src/unstable/http/HttpServerRequest.ts +4 -4
- package/src/unstable/http/HttpServerResponse.ts +30 -0
- package/src/unstable/http/HttpStaticServer.ts +35 -7
- package/src/unstable/http/Multipart.ts +6 -6
- package/src/unstable/http/Url.ts +33 -63
- package/src/unstable/http/UrlParams.ts +10 -18
- package/src/unstable/http/internal/compression.ts +196 -0
- package/src/unstable/httpapi/HttpApiBuilder.ts +10 -9
- package/src/unstable/httpapi/HttpApiClient.ts +14 -14
- package/src/unstable/httpapi/HttpApiEndpoint.ts +42 -42
- package/src/unstable/httpapi/HttpApiError.ts +13 -13
- package/src/unstable/httpapi/HttpApiGroup.ts +15 -15
- package/src/unstable/httpapi/HttpApiMiddleware.ts +71 -24
- package/src/unstable/httpapi/HttpApiScalar.ts +0 -12
- package/src/unstable/httpapi/HttpApiSchema.ts +6 -6
- package/src/unstable/httpapi/OpenApi.ts +13 -13
- package/src/unstable/observability/OtlpExporter.ts +31 -19
- package/src/unstable/observability/OtlpMetrics.ts +4 -1
- package/src/unstable/observability/OtlpResource.ts +26 -17
- package/src/unstable/observability/PrometheusMetrics.ts +13 -4
- package/src/unstable/observability/internal/otlpEnv.ts +1 -1
- package/src/unstable/observability/internal/protobuf.ts +3 -0
- package/src/unstable/persistence/KeyValueStore.ts +72 -49
- package/src/unstable/persistence/Persistable.ts +8 -8
- package/src/unstable/persistence/PersistedQueue.ts +6 -6
- package/src/unstable/persistence/Persistence.ts +126 -19
- package/src/unstable/persistence/RateLimiter.ts +26 -15
- package/src/unstable/persistence/Redis.ts +2 -2
- package/src/unstable/process/ChildProcess.ts +64 -21
- package/src/unstable/process/ChildProcessSpawner.ts +21 -10
- package/src/unstable/reactivity/AsyncResult.ts +12 -13
- package/src/unstable/reactivity/Atom.ts +28 -25
- package/src/unstable/reactivity/AtomHttpApi.ts +5 -4
- package/src/unstable/reactivity/AtomRegistry.ts +24 -3
- package/src/unstable/reactivity/AtomRpc.ts +5 -4
- package/src/unstable/reactivity/Hydration.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +35 -33
- package/src/unstable/rpc/RpcClient.ts +16 -15
- package/src/unstable/rpc/RpcGroup.ts +8 -8
- package/src/unstable/rpc/RpcMessage.ts +31 -30
- package/src/unstable/rpc/RpcMiddleware.ts +10 -10
- package/src/unstable/rpc/RpcSchema.ts +4 -4
- package/src/unstable/rpc/RpcSerialization.ts +167 -68
- package/src/unstable/rpc/RpcServer.ts +18 -15
- package/src/unstable/rpc/RpcWorker.ts +5 -5
- package/src/unstable/schema/Model.ts +52 -50
- package/src/unstable/schema/VariantSchema.ts +5 -5
- package/src/unstable/socket/Socket.ts +17 -4
- package/src/unstable/sql/SqlClient.ts +5 -6
- package/src/unstable/sql/SqlModel.ts +2 -2
- package/src/unstable/sql/SqlResolver.ts +5 -5
- package/src/unstable/sql/Statement.ts +24 -23
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +2 -2
- package/src/unstable/workers/WorkerError.ts +7 -7
- package/src/unstable/workers/WorkerRunner.ts +1 -1
- package/src/unstable/workflow/Activity.ts +2 -2
- package/src/unstable/workflow/DurableClock.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +10 -10
- package/src/unstable/workflow/DurableQueue.ts +22 -20
- package/src/unstable/workflow/Workflow.ts +23 -23
- package/src/unstable/workflow/WorkflowEngine.ts +1 -1
- package/src/unstable/workflow/WorkflowProxy.ts +4 -2
- package/dist/internal/version.d.ts +0 -3
- package/dist/internal/version.d.ts.map +0 -1
- package/dist/internal/version.js +0 -2
- package/dist/internal/version.js.map +0 -1
- package/src/internal/version.ts +0 -2
package/src/Predicate.ts
CHANGED
|
@@ -29,12 +29,12 @@ import type { TupleOf, TupleOfAtLeast } from "./Types.ts"
|
|
|
29
29
|
*
|
|
30
30
|
* **Example** (Defining a predicate)
|
|
31
31
|
*
|
|
32
|
-
* ```ts
|
|
32
|
+
* ```ts import.meta.vitest
|
|
33
33
|
* import { Predicate } from "effect"
|
|
34
34
|
*
|
|
35
35
|
* const isPositive: Predicate.Predicate<number> = (n) => n > 0
|
|
36
36
|
*
|
|
37
|
-
*
|
|
37
|
+
* isPositive(1) // => true
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
40
|
* @see {@link Refinement}
|
|
@@ -62,15 +62,18 @@ export interface Predicate<in A> {
|
|
|
62
62
|
*
|
|
63
63
|
* **Example** (Type-level usage)
|
|
64
64
|
*
|
|
65
|
-
* ```ts
|
|
65
|
+
* ```ts import.meta.vitest
|
|
66
66
|
* import { Predicate } from "effect"
|
|
67
67
|
*
|
|
68
68
|
* type P = Predicate.Predicate<number>
|
|
69
69
|
* type TL = Predicate.PredicateTypeLambda
|
|
70
|
+
*
|
|
71
|
+
* const witness: P = (value) => value > 0
|
|
72
|
+
* witness(1) // => true
|
|
70
73
|
* ```
|
|
71
74
|
*
|
|
72
75
|
* @see {@link Predicate}
|
|
73
|
-
* @category
|
|
76
|
+
* @category utility types
|
|
74
77
|
* @since 2.0.0
|
|
75
78
|
*/
|
|
76
79
|
export interface PredicateTypeLambda extends TypeLambda {
|
|
@@ -93,14 +96,14 @@ export interface PredicateTypeLambda extends TypeLambda {
|
|
|
93
96
|
*
|
|
94
97
|
* **Example** (Narrowing unknown values)
|
|
95
98
|
*
|
|
96
|
-
* ```ts
|
|
99
|
+
* ```ts import.meta.vitest
|
|
97
100
|
* import { Predicate } from "effect"
|
|
98
101
|
*
|
|
99
102
|
* const isString: Predicate.Refinement<unknown, string> = (u): u is string => typeof u === "string"
|
|
100
103
|
*
|
|
101
104
|
* const data: unknown = "hello"
|
|
102
105
|
* if (isString(data)) {
|
|
103
|
-
*
|
|
106
|
+
* data.toUpperCase() // => "HELLO"
|
|
104
107
|
* }
|
|
105
108
|
* ```
|
|
106
109
|
*
|
|
@@ -129,11 +132,13 @@ export interface Refinement<in A, out B extends A> {
|
|
|
129
132
|
*
|
|
130
133
|
* **Example** (Extracting predicate input)
|
|
131
134
|
*
|
|
132
|
-
* ```ts
|
|
135
|
+
* ```ts import.meta.vitest
|
|
133
136
|
* import { Predicate } from "effect"
|
|
134
137
|
*
|
|
135
138
|
* type IsString = Predicate.Predicate<string>
|
|
136
139
|
* type Input = Predicate.Predicate.In<IsString>
|
|
140
|
+
*
|
|
141
|
+
* const input: Input = "value"
|
|
137
142
|
* ```
|
|
138
143
|
*
|
|
139
144
|
* @see {@link Predicate}
|
|
@@ -156,11 +161,13 @@ export declare namespace Predicate {
|
|
|
156
161
|
*
|
|
157
162
|
* **Example** (Inferring the input type)
|
|
158
163
|
*
|
|
159
|
-
* ```ts
|
|
164
|
+
* ```ts import.meta.vitest
|
|
160
165
|
* import { Predicate } from "effect"
|
|
161
166
|
*
|
|
162
167
|
* type P = Predicate.Predicate<number>
|
|
163
168
|
* type Input = Predicate.Predicate.In<P>
|
|
169
|
+
*
|
|
170
|
+
* const input: Input = 1
|
|
164
171
|
* ```
|
|
165
172
|
*
|
|
166
173
|
* @see {@link Predicate.Any}
|
|
@@ -183,10 +190,13 @@ export declare namespace Predicate {
|
|
|
183
190
|
*
|
|
184
191
|
* **Example** (Using generic constraints)
|
|
185
192
|
*
|
|
186
|
-
* ```ts
|
|
193
|
+
* ```ts import.meta.vitest
|
|
187
194
|
* import { Predicate } from "effect"
|
|
188
195
|
*
|
|
189
196
|
* type AnyPredicate = Predicate.Predicate.Any
|
|
197
|
+
*
|
|
198
|
+
* const witness: AnyPredicate = () => true
|
|
199
|
+
* witness("value") // => true
|
|
190
200
|
* ```
|
|
191
201
|
*
|
|
192
202
|
* @see {@link Predicate.In}
|
|
@@ -211,12 +221,14 @@ export declare namespace Predicate {
|
|
|
211
221
|
*
|
|
212
222
|
* **Example** (Extracting refinement types)
|
|
213
223
|
*
|
|
214
|
-
* ```ts
|
|
224
|
+
* ```ts import.meta.vitest
|
|
215
225
|
* import { Predicate } from "effect"
|
|
216
226
|
*
|
|
217
227
|
* type IsString = Predicate.Refinement<unknown, string>
|
|
218
228
|
* type Input = Predicate.Refinement.In<IsString>
|
|
219
229
|
* type Output = Predicate.Refinement.Out<IsString>
|
|
230
|
+
*
|
|
231
|
+
* const output: Output = "value"
|
|
220
232
|
* ```
|
|
221
233
|
*
|
|
222
234
|
* @see {@link Refinement}
|
|
@@ -238,11 +250,13 @@ export declare namespace Refinement {
|
|
|
238
250
|
*
|
|
239
251
|
* **Example** (Inferring the input type)
|
|
240
252
|
*
|
|
241
|
-
* ```ts
|
|
253
|
+
* ```ts import.meta.vitest
|
|
242
254
|
* import { Predicate } from "effect"
|
|
243
255
|
*
|
|
244
256
|
* type R = Predicate.Refinement<unknown, string>
|
|
245
257
|
* type Input = Predicate.Refinement.In<R>
|
|
258
|
+
*
|
|
259
|
+
* const input: Input = "value"
|
|
246
260
|
* ```
|
|
247
261
|
*
|
|
248
262
|
* @see {@link Refinement.Out}
|
|
@@ -267,11 +281,13 @@ export declare namespace Refinement {
|
|
|
267
281
|
*
|
|
268
282
|
* **Example** (Inferring the output type)
|
|
269
283
|
*
|
|
270
|
-
* ```ts
|
|
284
|
+
* ```ts import.meta.vitest
|
|
271
285
|
* import { Predicate } from "effect"
|
|
272
286
|
*
|
|
273
287
|
* type R = Predicate.Refinement<unknown, string>
|
|
274
288
|
* type Output = Predicate.Refinement.Out<R>
|
|
289
|
+
*
|
|
290
|
+
* const output: Output = "value"
|
|
275
291
|
* ```
|
|
276
292
|
*
|
|
277
293
|
* @see {@link Refinement.In}
|
|
@@ -293,10 +309,13 @@ export declare namespace Refinement {
|
|
|
293
309
|
*
|
|
294
310
|
* **Example** (Using generic constraints)
|
|
295
311
|
*
|
|
296
|
-
* ```ts
|
|
312
|
+
* ```ts import.meta.vitest
|
|
297
313
|
* import { Predicate } from "effect"
|
|
298
314
|
*
|
|
299
315
|
* type AnyRefinement = Predicate.Refinement.Any
|
|
316
|
+
*
|
|
317
|
+
* const witness: AnyRefinement = (_): _ is string => true
|
|
318
|
+
* witness("value") // => true
|
|
300
319
|
* ```
|
|
301
320
|
*
|
|
302
321
|
* @see {@link Refinement.In}
|
|
@@ -322,14 +341,14 @@ export declare namespace Refinement {
|
|
|
322
341
|
*
|
|
323
342
|
* **Example** (Checking string length)
|
|
324
343
|
*
|
|
325
|
-
* ```ts
|
|
344
|
+
* ```ts import.meta.vitest
|
|
326
345
|
* import { Predicate } from "effect"
|
|
327
346
|
*
|
|
328
347
|
* const isLongerThan2 = Predicate.mapInput((s: string) => s.length)(
|
|
329
348
|
* (n: number) => n > 2
|
|
330
349
|
* )
|
|
331
350
|
*
|
|
332
|
-
*
|
|
351
|
+
* isLongerThan2("hello") // => true
|
|
333
352
|
* ```
|
|
334
353
|
*
|
|
335
354
|
* @see {@link Predicate}
|
|
@@ -354,14 +373,14 @@ export const mapInput: {
|
|
|
354
373
|
*
|
|
355
374
|
* **Example** (Checking string length)
|
|
356
375
|
*
|
|
357
|
-
* ```ts
|
|
376
|
+
* ```ts import.meta.vitest
|
|
358
377
|
* import { Predicate } from "effect"
|
|
359
378
|
*
|
|
360
379
|
* const isLongerThan2 = Predicate.mapInput((s: string) => s.length)(
|
|
361
380
|
* (n: number) => n > 2
|
|
362
381
|
* )
|
|
363
382
|
*
|
|
364
|
-
*
|
|
383
|
+
* isLongerThan2("hello") // => true
|
|
365
384
|
* ```
|
|
366
385
|
*
|
|
367
386
|
* @see {@link Predicate}
|
|
@@ -386,14 +405,14 @@ export const mapInput: {
|
|
|
386
405
|
*
|
|
387
406
|
* **Example** (Checking string length)
|
|
388
407
|
*
|
|
389
|
-
* ```ts
|
|
408
|
+
* ```ts import.meta.vitest
|
|
390
409
|
* import { Predicate } from "effect"
|
|
391
410
|
*
|
|
392
411
|
* const isLongerThan2 = Predicate.mapInput((s: string) => s.length)(
|
|
393
412
|
* (n: number) => n > 2
|
|
394
413
|
* )
|
|
395
414
|
*
|
|
396
|
-
*
|
|
415
|
+
* isLongerThan2("hello") // => true
|
|
397
416
|
* ```
|
|
398
417
|
*
|
|
399
418
|
* @see {@link Predicate}
|
|
@@ -420,12 +439,12 @@ export const mapInput: {
|
|
|
420
439
|
*
|
|
421
440
|
* **Example** (Checking exact length)
|
|
422
441
|
*
|
|
423
|
-
* ```ts
|
|
442
|
+
* ```ts import.meta.vitest
|
|
424
443
|
* import { Predicate } from "effect"
|
|
425
444
|
*
|
|
426
445
|
* const isPair = Predicate.isTupleOf(2)
|
|
427
446
|
*
|
|
428
|
-
*
|
|
447
|
+
* isPair([1, 2]) // => true
|
|
429
448
|
* ```
|
|
430
449
|
*
|
|
431
450
|
* @see {@link isTupleOfAtLeast}
|
|
@@ -449,12 +468,12 @@ export const isTupleOf: {
|
|
|
449
468
|
*
|
|
450
469
|
* **Example** (Checking exact length)
|
|
451
470
|
*
|
|
452
|
-
* ```ts
|
|
471
|
+
* ```ts import.meta.vitest
|
|
453
472
|
* import { Predicate } from "effect"
|
|
454
473
|
*
|
|
455
474
|
* const isPair = Predicate.isTupleOf(2)
|
|
456
475
|
*
|
|
457
|
-
*
|
|
476
|
+
* isPair([1, 2]) // => true
|
|
458
477
|
* ```
|
|
459
478
|
*
|
|
460
479
|
* @see {@link isTupleOfAtLeast}
|
|
@@ -478,12 +497,12 @@ export const isTupleOf: {
|
|
|
478
497
|
*
|
|
479
498
|
* **Example** (Checking exact length)
|
|
480
499
|
*
|
|
481
|
-
* ```ts
|
|
500
|
+
* ```ts import.meta.vitest
|
|
482
501
|
* import { Predicate } from "effect"
|
|
483
502
|
*
|
|
484
503
|
* const isPair = Predicate.isTupleOf(2)
|
|
485
504
|
*
|
|
486
|
-
*
|
|
505
|
+
* isPair([1, 2]) // => true
|
|
487
506
|
* ```
|
|
488
507
|
*
|
|
489
508
|
* @see {@link isTupleOfAtLeast}
|
|
@@ -509,12 +528,12 @@ export const isTupleOf: {
|
|
|
509
528
|
*
|
|
510
529
|
* **Example** (Checking minimum length)
|
|
511
530
|
*
|
|
512
|
-
* ```ts
|
|
531
|
+
* ```ts import.meta.vitest
|
|
513
532
|
* import { Predicate } from "effect"
|
|
514
533
|
*
|
|
515
534
|
* const hasAtLeast2 = Predicate.isTupleOfAtLeast(2)
|
|
516
535
|
*
|
|
517
|
-
*
|
|
536
|
+
* hasAtLeast2([1, 2, 3]) // => true
|
|
518
537
|
* ```
|
|
519
538
|
*
|
|
520
539
|
* @see {@link isTupleOf}
|
|
@@ -538,12 +557,12 @@ export const isTupleOfAtLeast: {
|
|
|
538
557
|
*
|
|
539
558
|
* **Example** (Checking minimum length)
|
|
540
559
|
*
|
|
541
|
-
* ```ts
|
|
560
|
+
* ```ts import.meta.vitest
|
|
542
561
|
* import { Predicate } from "effect"
|
|
543
562
|
*
|
|
544
563
|
* const hasAtLeast2 = Predicate.isTupleOfAtLeast(2)
|
|
545
564
|
*
|
|
546
|
-
*
|
|
565
|
+
* hasAtLeast2([1, 2, 3]) // => true
|
|
547
566
|
* ```
|
|
548
567
|
*
|
|
549
568
|
* @see {@link isTupleOf}
|
|
@@ -567,12 +586,12 @@ export const isTupleOfAtLeast: {
|
|
|
567
586
|
*
|
|
568
587
|
* **Example** (Checking minimum length)
|
|
569
588
|
*
|
|
570
|
-
* ```ts
|
|
589
|
+
* ```ts import.meta.vitest
|
|
571
590
|
* import { Predicate } from "effect"
|
|
572
591
|
*
|
|
573
592
|
* const hasAtLeast2 = Predicate.isTupleOfAtLeast(2)
|
|
574
593
|
*
|
|
575
|
-
*
|
|
594
|
+
* hasAtLeast2([1, 2, 3]) // => true
|
|
576
595
|
* ```
|
|
577
596
|
*
|
|
578
597
|
* @see {@link isTupleOf}
|
|
@@ -598,18 +617,16 @@ export const isTupleOfAtLeast: {
|
|
|
598
617
|
*
|
|
599
618
|
* **Example** (Filtering truthy values)
|
|
600
619
|
*
|
|
601
|
-
* ```ts
|
|
620
|
+
* ```ts import.meta.vitest
|
|
602
621
|
* import { Predicate } from "effect"
|
|
603
622
|
*
|
|
604
623
|
* const values = [0, 1, "", "ok", false]
|
|
605
|
-
* const truthy = values.filter(Predicate.isTruthy)
|
|
606
|
-
*
|
|
607
|
-
* console.log(truthy)
|
|
624
|
+
* const truthy = values.filter(Predicate.isTruthy) // => [1, "ok"]
|
|
608
625
|
* ```
|
|
609
626
|
*
|
|
610
627
|
* @see {@link isNullish}
|
|
611
628
|
* @see {@link isNotNullish}
|
|
612
|
-
* @category
|
|
629
|
+
* @category predicates
|
|
613
630
|
* @since 2.0.0
|
|
614
631
|
*/
|
|
615
632
|
export function isTruthy(input: unknown): boolean {
|
|
@@ -629,13 +646,13 @@ export function isTruthy(input: unknown): boolean {
|
|
|
629
646
|
*
|
|
630
647
|
* **Example** (Guarding a Set)
|
|
631
648
|
*
|
|
632
|
-
* ```ts
|
|
649
|
+
* ```ts import.meta.vitest
|
|
633
650
|
* import { Predicate } from "effect"
|
|
634
651
|
*
|
|
635
652
|
* const data: unknown = new Set([1, 2])
|
|
636
653
|
*
|
|
637
654
|
* if (Predicate.isSet(data)) {
|
|
638
|
-
*
|
|
655
|
+
* data.size // => 2
|
|
639
656
|
* }
|
|
640
657
|
* ```
|
|
641
658
|
*
|
|
@@ -661,13 +678,13 @@ export function isSet(input: unknown): input is Set<unknown> {
|
|
|
661
678
|
*
|
|
662
679
|
* **Example** (Guarding a Map)
|
|
663
680
|
*
|
|
664
|
-
* ```ts
|
|
681
|
+
* ```ts import.meta.vitest
|
|
665
682
|
* import { Predicate } from "effect"
|
|
666
683
|
*
|
|
667
684
|
* const data: unknown = new Map([["a", 1]])
|
|
668
685
|
*
|
|
669
686
|
* if (Predicate.isMap(data)) {
|
|
670
|
-
*
|
|
687
|
+
* data.size // => 1
|
|
671
688
|
* }
|
|
672
689
|
* ```
|
|
673
690
|
*
|
|
@@ -694,13 +711,13 @@ export function isMap(input: unknown): input is Map<unknown, unknown> {
|
|
|
694
711
|
*
|
|
695
712
|
* **Example** (Guarding strings)
|
|
696
713
|
*
|
|
697
|
-
* ```ts
|
|
714
|
+
* ```ts import.meta.vitest
|
|
698
715
|
* import { Predicate } from "effect"
|
|
699
716
|
*
|
|
700
717
|
* const data: unknown = "hi"
|
|
701
718
|
*
|
|
702
719
|
* if (Predicate.isString(data)) {
|
|
703
|
-
*
|
|
720
|
+
* data.toUpperCase() // => "HI"
|
|
704
721
|
* }
|
|
705
722
|
* ```
|
|
706
723
|
*
|
|
@@ -728,13 +745,13 @@ export function isString(input: unknown): input is string {
|
|
|
728
745
|
*
|
|
729
746
|
* **Example** (Guarding numbers)
|
|
730
747
|
*
|
|
731
|
-
* ```ts
|
|
748
|
+
* ```ts import.meta.vitest
|
|
732
749
|
* import { Predicate } from "effect"
|
|
733
750
|
*
|
|
734
751
|
* const data: unknown = 42
|
|
735
752
|
*
|
|
736
753
|
* if (Predicate.isNumber(data)) {
|
|
737
|
-
*
|
|
754
|
+
* data + 1 // => 43
|
|
738
755
|
* }
|
|
739
756
|
* ```
|
|
740
757
|
*
|
|
@@ -761,13 +778,13 @@ export function isNumber(input: unknown): input is number {
|
|
|
761
778
|
*
|
|
762
779
|
* **Example** (Guarding booleans)
|
|
763
780
|
*
|
|
764
|
-
* ```ts
|
|
781
|
+
* ```ts import.meta.vitest
|
|
765
782
|
* import { Predicate } from "effect"
|
|
766
783
|
*
|
|
767
784
|
* const data: unknown = true
|
|
768
785
|
*
|
|
769
786
|
* if (Predicate.isBoolean(data)) {
|
|
770
|
-
*
|
|
787
|
+
* data ? "yes" : "no" // => "yes"
|
|
771
788
|
* }
|
|
772
789
|
* ```
|
|
773
790
|
*
|
|
@@ -794,13 +811,13 @@ export function isBoolean(input: unknown): input is boolean {
|
|
|
794
811
|
*
|
|
795
812
|
* **Example** (Guarding bigints)
|
|
796
813
|
*
|
|
797
|
-
* ```ts
|
|
814
|
+
* ```ts import.meta.vitest
|
|
798
815
|
* import { Predicate } from "effect"
|
|
799
816
|
*
|
|
800
817
|
* const data: unknown = 1n
|
|
801
818
|
*
|
|
802
819
|
* if (Predicate.isBigInt(data)) {
|
|
803
|
-
*
|
|
820
|
+
* data + 2n // => 3n
|
|
804
821
|
* }
|
|
805
822
|
* ```
|
|
806
823
|
*
|
|
@@ -826,13 +843,13 @@ export function isBigInt(input: unknown): input is bigint {
|
|
|
826
843
|
*
|
|
827
844
|
* **Example** (Guarding symbols)
|
|
828
845
|
*
|
|
829
|
-
* ```ts
|
|
846
|
+
* ```ts import.meta.vitest
|
|
830
847
|
* import { Predicate } from "effect"
|
|
831
848
|
*
|
|
832
849
|
* const data: unknown = Symbol.for("id")
|
|
833
850
|
*
|
|
834
851
|
* if (Predicate.isSymbol(data)) {
|
|
835
|
-
*
|
|
852
|
+
* data.description // => "id"
|
|
836
853
|
* }
|
|
837
854
|
* ```
|
|
838
855
|
*
|
|
@@ -858,14 +875,14 @@ export function isSymbol(input: unknown): input is symbol {
|
|
|
858
875
|
*
|
|
859
876
|
* **Example** (Guarding property keys)
|
|
860
877
|
*
|
|
861
|
-
* ```ts
|
|
878
|
+
* ```ts import.meta.vitest
|
|
862
879
|
* import { Predicate } from "effect"
|
|
863
880
|
*
|
|
864
881
|
* const key: unknown = "name"
|
|
865
882
|
* const obj: Record<PropertyKey, unknown> = { name: "Ada" }
|
|
866
883
|
*
|
|
867
884
|
* if (Predicate.isPropertyKey(key) && key in obj) {
|
|
868
|
-
*
|
|
885
|
+
* obj[key] // => "Ada"
|
|
869
886
|
* }
|
|
870
887
|
* ```
|
|
871
888
|
*
|
|
@@ -893,13 +910,13 @@ export function isPropertyKey(u: unknown): u is PropertyKey {
|
|
|
893
910
|
*
|
|
894
911
|
* **Example** (Guarding functions)
|
|
895
912
|
*
|
|
896
|
-
* ```ts
|
|
913
|
+
* ```ts import.meta.vitest
|
|
897
914
|
* import { Predicate } from "effect"
|
|
898
915
|
*
|
|
899
916
|
* const data: unknown = () => 1
|
|
900
917
|
*
|
|
901
918
|
* if (Predicate.isFunction(data)) {
|
|
902
|
-
*
|
|
919
|
+
* data() // => 1
|
|
903
920
|
* }
|
|
904
921
|
* ```
|
|
905
922
|
*
|
|
@@ -925,12 +942,12 @@ export function isFunction(input: unknown): input is Function {
|
|
|
925
942
|
*
|
|
926
943
|
* **Example** (Guarding undefined values)
|
|
927
944
|
*
|
|
928
|
-
* ```ts
|
|
945
|
+
* ```ts import.meta.vitest
|
|
929
946
|
* import { Predicate } from "effect"
|
|
930
947
|
*
|
|
931
948
|
* const data: unknown = undefined
|
|
932
949
|
*
|
|
933
|
-
*
|
|
950
|
+
* Predicate.isUndefined(data) // => true
|
|
934
951
|
* ```
|
|
935
952
|
*
|
|
936
953
|
* @see {@link isNotUndefined}
|
|
@@ -956,13 +973,11 @@ export function isUndefined(input: unknown): input is undefined {
|
|
|
956
973
|
*
|
|
957
974
|
* **Example** (Filtering undefined values)
|
|
958
975
|
*
|
|
959
|
-
* ```ts
|
|
976
|
+
* ```ts import.meta.vitest
|
|
960
977
|
* import { Predicate } from "effect"
|
|
961
978
|
*
|
|
962
979
|
* const values = [1, undefined, 2]
|
|
963
|
-
* const defined = values.filter(Predicate.isNotUndefined)
|
|
964
|
-
*
|
|
965
|
-
* console.log(defined)
|
|
980
|
+
* const defined = values.filter(Predicate.isNotUndefined) // => [1, 2]
|
|
966
981
|
* ```
|
|
967
982
|
*
|
|
968
983
|
* @see {@link isUndefined}
|
|
@@ -987,12 +1002,12 @@ export function isNotUndefined<A>(input: A): input is Exclude<A, undefined> {
|
|
|
987
1002
|
*
|
|
988
1003
|
* **Example** (Guarding null values)
|
|
989
1004
|
*
|
|
990
|
-
* ```ts
|
|
1005
|
+
* ```ts import.meta.vitest
|
|
991
1006
|
* import { Predicate } from "effect"
|
|
992
1007
|
*
|
|
993
1008
|
* const data: unknown = null
|
|
994
1009
|
*
|
|
995
|
-
*
|
|
1010
|
+
* Predicate.isNull(data) // => true
|
|
996
1011
|
* ```
|
|
997
1012
|
*
|
|
998
1013
|
* @see {@link isNotNull}
|
|
@@ -1018,13 +1033,11 @@ export function isNull(input: unknown): input is null {
|
|
|
1018
1033
|
*
|
|
1019
1034
|
* **Example** (Filtering null values)
|
|
1020
1035
|
*
|
|
1021
|
-
* ```ts
|
|
1036
|
+
* ```ts import.meta.vitest
|
|
1022
1037
|
* import { Predicate } from "effect"
|
|
1023
1038
|
*
|
|
1024
1039
|
* const values = [1, null, 2]
|
|
1025
|
-
* const nonNull = values.filter(Predicate.isNotNull)
|
|
1026
|
-
*
|
|
1027
|
-
* console.log(nonNull)
|
|
1040
|
+
* const nonNull = values.filter(Predicate.isNotNull) // => [1, 2]
|
|
1028
1041
|
* ```
|
|
1029
1042
|
*
|
|
1030
1043
|
* @see {@link isNull}
|
|
@@ -1049,13 +1062,11 @@ export function isNotNull<A>(input: A): input is Exclude<A, null> {
|
|
|
1049
1062
|
*
|
|
1050
1063
|
* **Example** (Guarding nullish values)
|
|
1051
1064
|
*
|
|
1052
|
-
* ```ts
|
|
1065
|
+
* ```ts import.meta.vitest
|
|
1053
1066
|
* import { Predicate } from "effect"
|
|
1054
1067
|
*
|
|
1055
1068
|
* const values = [0, null, "", undefined]
|
|
1056
|
-
* const nullish = values.filter(Predicate.isNullish)
|
|
1057
|
-
*
|
|
1058
|
-
* console.log(nullish)
|
|
1069
|
+
* const nullish = values.filter(Predicate.isNullish) // => [null, undefined]
|
|
1059
1070
|
* ```
|
|
1060
1071
|
*
|
|
1061
1072
|
* @see {@link isNotNullish}
|
|
@@ -1082,13 +1093,11 @@ export function isNullish<A>(input: A): input is A & (null | undefined) {
|
|
|
1082
1093
|
*
|
|
1083
1094
|
* **Example** (Filtering non-nullish values)
|
|
1084
1095
|
*
|
|
1085
|
-
* ```ts
|
|
1096
|
+
* ```ts import.meta.vitest
|
|
1086
1097
|
* import { Predicate } from "effect"
|
|
1087
1098
|
*
|
|
1088
1099
|
* const values = [0, null, "", undefined]
|
|
1089
|
-
* const present = values.filter(Predicate.isNotNullish)
|
|
1090
|
-
*
|
|
1091
|
-
* console.log(present)
|
|
1100
|
+
* const present = values.filter(Predicate.isNotNullish) // => [0, ""]
|
|
1092
1101
|
* ```
|
|
1093
1102
|
*
|
|
1094
1103
|
* @see {@link isNullish}
|
|
@@ -1110,10 +1119,10 @@ export function isNotNullish<A>(input: A): input is NonNullable<A> {
|
|
|
1110
1119
|
*
|
|
1111
1120
|
* **Example** (Matching no values)
|
|
1112
1121
|
*
|
|
1113
|
-
* ```ts
|
|
1122
|
+
* ```ts import.meta.vitest
|
|
1114
1123
|
* import { Predicate } from "effect"
|
|
1115
1124
|
*
|
|
1116
|
-
*
|
|
1125
|
+
* Predicate.isNever("anything") // => false
|
|
1117
1126
|
* ```
|
|
1118
1127
|
*
|
|
1119
1128
|
* @see {@link isUnknown}
|
|
@@ -1133,10 +1142,10 @@ export function isNever(_: unknown): _ is never {
|
|
|
1133
1142
|
*
|
|
1134
1143
|
* **Example** (Matching every value)
|
|
1135
1144
|
*
|
|
1136
|
-
* ```ts
|
|
1145
|
+
* ```ts import.meta.vitest
|
|
1137
1146
|
* import { Predicate } from "effect"
|
|
1138
1147
|
*
|
|
1139
|
-
*
|
|
1148
|
+
* Predicate.isUnknown(123) // => true
|
|
1140
1149
|
* ```
|
|
1141
1150
|
*
|
|
1142
1151
|
* @see {@link isNever}
|
|
@@ -1161,10 +1170,10 @@ export function isUnknown(_: unknown): _ is unknown {
|
|
|
1161
1170
|
*
|
|
1162
1171
|
* **Example** (Checking objects or arrays)
|
|
1163
1172
|
*
|
|
1164
|
-
* ```ts
|
|
1173
|
+
* ```ts import.meta.vitest
|
|
1165
1174
|
* import { Predicate } from "effect"
|
|
1166
1175
|
*
|
|
1167
|
-
*
|
|
1176
|
+
* Predicate.isObjectOrArray([]) // => true
|
|
1168
1177
|
* ```
|
|
1169
1178
|
*
|
|
1170
1179
|
* @see {@link isObject}
|
|
@@ -1192,11 +1201,11 @@ export function isObjectOrArray(input: unknown): input is { [x: PropertyKey]: un
|
|
|
1192
1201
|
*
|
|
1193
1202
|
* **Example** (Guarding objects)
|
|
1194
1203
|
*
|
|
1195
|
-
* ```ts
|
|
1204
|
+
* ```ts import.meta.vitest
|
|
1196
1205
|
* import { Predicate } from "effect"
|
|
1197
1206
|
*
|
|
1198
|
-
*
|
|
1199
|
-
*
|
|
1207
|
+
* Predicate.isObject({ a: 1 }) // => true
|
|
1208
|
+
* Predicate.isObject([1, 2]) // => false
|
|
1200
1209
|
* ```
|
|
1201
1210
|
*
|
|
1202
1211
|
* @see {@link isObjectOrArray}
|
|
@@ -1225,12 +1234,12 @@ export function isObject(input: unknown): input is { [x: PropertyKey]: unknown }
|
|
|
1225
1234
|
*
|
|
1226
1235
|
* **Example** (Checking readonly objects)
|
|
1227
1236
|
*
|
|
1228
|
-
* ```ts
|
|
1237
|
+
* ```ts import.meta.vitest
|
|
1229
1238
|
* import { Predicate } from "effect"
|
|
1230
1239
|
*
|
|
1231
1240
|
* const data: unknown = { a: 1 }
|
|
1232
1241
|
*
|
|
1233
|
-
*
|
|
1242
|
+
* Predicate.isReadonlyObject(data) // => true
|
|
1234
1243
|
* ```
|
|
1235
1244
|
*
|
|
1236
1245
|
* @see {@link isObject}
|
|
@@ -1255,11 +1264,11 @@ export function isReadonlyObject(input: unknown): input is { readonly [x: Proper
|
|
|
1255
1264
|
*
|
|
1256
1265
|
* **Example** (Checking object keywords)
|
|
1257
1266
|
*
|
|
1258
|
-
* ```ts
|
|
1267
|
+
* ```ts import.meta.vitest
|
|
1259
1268
|
* import { Predicate } from "effect"
|
|
1260
1269
|
*
|
|
1261
|
-
*
|
|
1262
|
-
*
|
|
1270
|
+
* Predicate.isObjectKeyword(() => 1) // => true
|
|
1271
|
+
* Predicate.isObjectKeyword(null) // => false
|
|
1263
1272
|
* ```
|
|
1264
1273
|
*
|
|
1265
1274
|
* @see {@link isObject}
|
|
@@ -1286,14 +1295,14 @@ export function isObjectKeyword(input: unknown): input is object {
|
|
|
1286
1295
|
*
|
|
1287
1296
|
* **Example** (Guarding object properties)
|
|
1288
1297
|
*
|
|
1289
|
-
* ```ts
|
|
1298
|
+
* ```ts import.meta.vitest
|
|
1290
1299
|
* import { Predicate } from "effect"
|
|
1291
1300
|
*
|
|
1292
1301
|
* const hasName = Predicate.hasProperty("name")
|
|
1293
1302
|
* const data: unknown = { name: "Ada" }
|
|
1294
1303
|
*
|
|
1295
1304
|
* if (hasName(data)) {
|
|
1296
|
-
*
|
|
1305
|
+
* data.name // => "Ada"
|
|
1297
1306
|
* }
|
|
1298
1307
|
* ```
|
|
1299
1308
|
*
|
|
@@ -1318,14 +1327,14 @@ export const hasProperty: {
|
|
|
1318
1327
|
*
|
|
1319
1328
|
* **Example** (Guarding object properties)
|
|
1320
1329
|
*
|
|
1321
|
-
* ```ts
|
|
1330
|
+
* ```ts import.meta.vitest
|
|
1322
1331
|
* import { Predicate } from "effect"
|
|
1323
1332
|
*
|
|
1324
1333
|
* const hasName = Predicate.hasProperty("name")
|
|
1325
1334
|
* const data: unknown = { name: "Ada" }
|
|
1326
1335
|
*
|
|
1327
1336
|
* if (hasName(data)) {
|
|
1328
|
-
*
|
|
1337
|
+
* data.name // => "Ada"
|
|
1329
1338
|
* }
|
|
1330
1339
|
* ```
|
|
1331
1340
|
*
|
|
@@ -1350,14 +1359,14 @@ export const hasProperty: {
|
|
|
1350
1359
|
*
|
|
1351
1360
|
* **Example** (Guarding object properties)
|
|
1352
1361
|
*
|
|
1353
|
-
* ```ts
|
|
1362
|
+
* ```ts import.meta.vitest
|
|
1354
1363
|
* import { Predicate } from "effect"
|
|
1355
1364
|
*
|
|
1356
1365
|
* const hasName = Predicate.hasProperty("name")
|
|
1357
1366
|
* const data: unknown = { name: "Ada" }
|
|
1358
1367
|
*
|
|
1359
1368
|
* if (hasName(data)) {
|
|
1360
|
-
*
|
|
1369
|
+
* data.name // => "Ada"
|
|
1361
1370
|
* }
|
|
1362
1371
|
* ```
|
|
1363
1372
|
*
|
|
@@ -1387,12 +1396,12 @@ export const hasProperty: {
|
|
|
1387
1396
|
*
|
|
1388
1397
|
* **Example** (Guarding tagged values)
|
|
1389
1398
|
*
|
|
1390
|
-
* ```ts
|
|
1399
|
+
* ```ts import.meta.vitest
|
|
1391
1400
|
* import { Predicate } from "effect"
|
|
1392
1401
|
*
|
|
1393
1402
|
* const isOk = Predicate.isTagged("Ok")
|
|
1394
1403
|
*
|
|
1395
|
-
*
|
|
1404
|
+
* isOk({ _tag: "Ok", value: 1 }) // => true
|
|
1396
1405
|
* ```
|
|
1397
1406
|
*
|
|
1398
1407
|
* @see {@link hasProperty}
|
|
@@ -1414,12 +1423,12 @@ export const isTagged: {
|
|
|
1414
1423
|
*
|
|
1415
1424
|
* **Example** (Guarding tagged values)
|
|
1416
1425
|
*
|
|
1417
|
-
* ```ts
|
|
1426
|
+
* ```ts import.meta.vitest
|
|
1418
1427
|
* import { Predicate } from "effect"
|
|
1419
1428
|
*
|
|
1420
1429
|
* const isOk = Predicate.isTagged("Ok")
|
|
1421
1430
|
*
|
|
1422
|
-
*
|
|
1431
|
+
* isOk({ _tag: "Ok", value: 1 }) // => true
|
|
1423
1432
|
* ```
|
|
1424
1433
|
*
|
|
1425
1434
|
* @see {@link hasProperty}
|
|
@@ -1441,12 +1450,12 @@ export const isTagged: {
|
|
|
1441
1450
|
*
|
|
1442
1451
|
* **Example** (Guarding tagged values)
|
|
1443
1452
|
*
|
|
1444
|
-
* ```ts
|
|
1453
|
+
* ```ts import.meta.vitest
|
|
1445
1454
|
* import { Predicate } from "effect"
|
|
1446
1455
|
*
|
|
1447
1456
|
* const isOk = Predicate.isTagged("Ok")
|
|
1448
1457
|
*
|
|
1449
|
-
*
|
|
1458
|
+
* isOk({ _tag: "Ok", value: 1 }) // => true
|
|
1450
1459
|
* ```
|
|
1451
1460
|
*
|
|
1452
1461
|
* @see {@link hasProperty}
|
|
@@ -1472,12 +1481,12 @@ export const isTagged: {
|
|
|
1472
1481
|
*
|
|
1473
1482
|
* **Example** (Guarding errors)
|
|
1474
1483
|
*
|
|
1475
|
-
* ```ts
|
|
1484
|
+
* ```ts import.meta.vitest
|
|
1476
1485
|
* import { Predicate } from "effect"
|
|
1477
1486
|
*
|
|
1478
1487
|
* const data: unknown = new Error("boom")
|
|
1479
1488
|
*
|
|
1480
|
-
*
|
|
1489
|
+
* Predicate.isError(data) // => true
|
|
1481
1490
|
* ```
|
|
1482
1491
|
*
|
|
1483
1492
|
* @see {@link isUnknown}
|
|
@@ -1501,12 +1510,12 @@ export function isError(input: unknown): input is Error {
|
|
|
1501
1510
|
*
|
|
1502
1511
|
* **Example** (Guarding Uint8Array values)
|
|
1503
1512
|
*
|
|
1504
|
-
* ```ts
|
|
1513
|
+
* ```ts import.meta.vitest
|
|
1505
1514
|
* import { Predicate } from "effect"
|
|
1506
1515
|
*
|
|
1507
1516
|
* const data: unknown = new Uint8Array([1, 2])
|
|
1508
1517
|
*
|
|
1509
|
-
*
|
|
1518
|
+
* Predicate.isUint8Array(data) // => true
|
|
1510
1519
|
* ```
|
|
1511
1520
|
*
|
|
1512
1521
|
* @see {@link isIterable}
|
|
@@ -1531,12 +1540,12 @@ export function isUint8Array(input: unknown): input is Uint8Array {
|
|
|
1531
1540
|
*
|
|
1532
1541
|
* **Example** (Guarding Date values)
|
|
1533
1542
|
*
|
|
1534
|
-
* ```ts
|
|
1543
|
+
* ```ts import.meta.vitest
|
|
1535
1544
|
* import { Predicate } from "effect"
|
|
1536
1545
|
*
|
|
1537
1546
|
* const data: unknown = new Date()
|
|
1538
1547
|
*
|
|
1539
|
-
*
|
|
1548
|
+
* Predicate.isDate(data) // => true
|
|
1540
1549
|
* ```
|
|
1541
1550
|
*
|
|
1542
1551
|
* @see {@link isRegExp}
|
|
@@ -1560,12 +1569,12 @@ export function isDate(input: unknown): input is Date {
|
|
|
1560
1569
|
*
|
|
1561
1570
|
* **Example** (Guarding iterables)
|
|
1562
1571
|
*
|
|
1563
|
-
* ```ts
|
|
1572
|
+
* ```ts import.meta.vitest
|
|
1564
1573
|
* import { Predicate } from "effect"
|
|
1565
1574
|
*
|
|
1566
1575
|
* const data: unknown = [1, 2, 3]
|
|
1567
1576
|
*
|
|
1568
|
-
*
|
|
1577
|
+
* Predicate.isIterable(data) // => true
|
|
1569
1578
|
* ```
|
|
1570
1579
|
*
|
|
1571
1580
|
* @see {@link isSet}
|
|
@@ -1590,12 +1599,12 @@ export function isIterable(input: unknown): input is Iterable<unknown> {
|
|
|
1590
1599
|
*
|
|
1591
1600
|
* **Example** (Guarding promises)
|
|
1592
1601
|
*
|
|
1593
|
-
* ```ts
|
|
1602
|
+
* ```ts import.meta.vitest
|
|
1594
1603
|
* import { Predicate } from "effect"
|
|
1595
1604
|
*
|
|
1596
1605
|
* const data: unknown = Promise.resolve(1)
|
|
1597
1606
|
*
|
|
1598
|
-
*
|
|
1607
|
+
* Predicate.isPromise(data) // => true
|
|
1599
1608
|
* ```
|
|
1600
1609
|
*
|
|
1601
1610
|
* @see {@link isPromiseLike}
|
|
@@ -1620,12 +1629,12 @@ export function isPromise(input: unknown): input is Promise<unknown> {
|
|
|
1620
1629
|
*
|
|
1621
1630
|
* **Example** (Guarding promise-like values)
|
|
1622
1631
|
*
|
|
1623
|
-
* ```ts
|
|
1632
|
+
* ```ts import.meta.vitest
|
|
1624
1633
|
* import { Predicate } from "effect"
|
|
1625
1634
|
*
|
|
1626
1635
|
* const data: unknown = { then: () => {} }
|
|
1627
1636
|
*
|
|
1628
|
-
*
|
|
1637
|
+
* Predicate.isPromiseLike(data) // => true
|
|
1629
1638
|
* ```
|
|
1630
1639
|
*
|
|
1631
1640
|
* @see {@link isPromise}
|
|
@@ -1649,12 +1658,12 @@ export function isPromiseLike(input: unknown): input is PromiseLike<unknown> {
|
|
|
1649
1658
|
*
|
|
1650
1659
|
* **Example** (Guarding RegExp values)
|
|
1651
1660
|
*
|
|
1652
|
-
* ```ts
|
|
1661
|
+
* ```ts import.meta.vitest
|
|
1653
1662
|
* import { Predicate } from "effect"
|
|
1654
1663
|
*
|
|
1655
1664
|
* const data: unknown = /abc/
|
|
1656
1665
|
*
|
|
1657
|
-
*
|
|
1666
|
+
* Predicate.isRegExp(data) // => true
|
|
1658
1667
|
* ```
|
|
1659
1668
|
*
|
|
1660
1669
|
* @see {@link isDate}
|
|
@@ -1680,7 +1689,7 @@ export function isRegExp(input: unknown): input is RegExp {
|
|
|
1680
1689
|
*
|
|
1681
1690
|
* **Example** (Composing refinements)
|
|
1682
1691
|
*
|
|
1683
|
-
* ```ts
|
|
1692
|
+
* ```ts import.meta.vitest
|
|
1684
1693
|
* import { Predicate } from "effect"
|
|
1685
1694
|
*
|
|
1686
1695
|
* const isNumber: Predicate.Refinement<unknown, number> = (u): u is number => typeof u === "number"
|
|
@@ -1688,7 +1697,7 @@ export function isRegExp(input: unknown): input is RegExp {
|
|
|
1688
1697
|
*
|
|
1689
1698
|
* const isIntegerNumber = Predicate.compose(isNumber, isInteger)
|
|
1690
1699
|
*
|
|
1691
|
-
*
|
|
1700
|
+
* isIntegerNumber(1) // => true
|
|
1692
1701
|
* ```
|
|
1693
1702
|
*
|
|
1694
1703
|
* @see {@link and}
|
|
@@ -1712,7 +1721,7 @@ export const compose: {
|
|
|
1712
1721
|
*
|
|
1713
1722
|
* **Example** (Composing refinements)
|
|
1714
1723
|
*
|
|
1715
|
-
* ```ts
|
|
1724
|
+
* ```ts import.meta.vitest
|
|
1716
1725
|
* import { Predicate } from "effect"
|
|
1717
1726
|
*
|
|
1718
1727
|
* const isNumber: Predicate.Refinement<unknown, number> = (u): u is number => typeof u === "number"
|
|
@@ -1720,7 +1729,7 @@ export const compose: {
|
|
|
1720
1729
|
*
|
|
1721
1730
|
* const isIntegerNumber = Predicate.compose(isNumber, isInteger)
|
|
1722
1731
|
*
|
|
1723
|
-
*
|
|
1732
|
+
* isIntegerNumber(1) // => true
|
|
1724
1733
|
* ```
|
|
1725
1734
|
*
|
|
1726
1735
|
* @see {@link and}
|
|
@@ -1744,7 +1753,7 @@ export const compose: {
|
|
|
1744
1753
|
*
|
|
1745
1754
|
* **Example** (Composing refinements)
|
|
1746
1755
|
*
|
|
1747
|
-
* ```ts
|
|
1756
|
+
* ```ts import.meta.vitest
|
|
1748
1757
|
* import { Predicate } from "effect"
|
|
1749
1758
|
*
|
|
1750
1759
|
* const isNumber: Predicate.Refinement<unknown, number> = (u): u is number => typeof u === "number"
|
|
@@ -1752,7 +1761,7 @@ export const compose: {
|
|
|
1752
1761
|
*
|
|
1753
1762
|
* const isIntegerNumber = Predicate.compose(isNumber, isInteger)
|
|
1754
1763
|
*
|
|
1755
|
-
*
|
|
1764
|
+
* isIntegerNumber(1) // => true
|
|
1756
1765
|
* ```
|
|
1757
1766
|
*
|
|
1758
1767
|
* @see {@link and}
|
|
@@ -1776,7 +1785,7 @@ export const compose: {
|
|
|
1776
1785
|
*
|
|
1777
1786
|
* **Example** (Composing refinements)
|
|
1778
1787
|
*
|
|
1779
|
-
* ```ts
|
|
1788
|
+
* ```ts import.meta.vitest
|
|
1780
1789
|
* import { Predicate } from "effect"
|
|
1781
1790
|
*
|
|
1782
1791
|
* const isNumber: Predicate.Refinement<unknown, number> = (u): u is number => typeof u === "number"
|
|
@@ -1784,7 +1793,7 @@ export const compose: {
|
|
|
1784
1793
|
*
|
|
1785
1794
|
* const isIntegerNumber = Predicate.compose(isNumber, isInteger)
|
|
1786
1795
|
*
|
|
1787
|
-
*
|
|
1796
|
+
* isIntegerNumber(1) // => true
|
|
1788
1797
|
* ```
|
|
1789
1798
|
*
|
|
1790
1799
|
* @see {@link and}
|
|
@@ -1808,7 +1817,7 @@ export const compose: {
|
|
|
1808
1817
|
*
|
|
1809
1818
|
* **Example** (Composing refinements)
|
|
1810
1819
|
*
|
|
1811
|
-
* ```ts
|
|
1820
|
+
* ```ts import.meta.vitest
|
|
1812
1821
|
* import { Predicate } from "effect"
|
|
1813
1822
|
*
|
|
1814
1823
|
* const isNumber: Predicate.Refinement<unknown, number> = (u): u is number => typeof u === "number"
|
|
@@ -1816,7 +1825,7 @@ export const compose: {
|
|
|
1816
1825
|
*
|
|
1817
1826
|
* const isIntegerNumber = Predicate.compose(isNumber, isInteger)
|
|
1818
1827
|
*
|
|
1819
|
-
*
|
|
1828
|
+
* isIntegerNumber(1) // => true
|
|
1820
1829
|
* ```
|
|
1821
1830
|
*
|
|
1822
1831
|
* @see {@link and}
|
|
@@ -1846,12 +1855,12 @@ export const compose: {
|
|
|
1846
1855
|
*
|
|
1847
1856
|
* **Example** (Checking tuples)
|
|
1848
1857
|
*
|
|
1849
|
-
* ```ts
|
|
1858
|
+
* ```ts import.meta.vitest
|
|
1850
1859
|
* import { Predicate } from "effect"
|
|
1851
1860
|
*
|
|
1852
1861
|
* const tupleCheck = Predicate.Tuple([(n: number) => n > 0, Predicate.isString])
|
|
1853
1862
|
*
|
|
1854
|
-
*
|
|
1863
|
+
* tupleCheck([1, "ok"]) // => true
|
|
1855
1864
|
* ```
|
|
1856
1865
|
*
|
|
1857
1866
|
* @see {@link Struct}
|
|
@@ -1892,7 +1901,7 @@ export function Tuple<const T extends ReadonlyArray<Predicate.Any>>(
|
|
|
1892
1901
|
*
|
|
1893
1902
|
* **Example** (Checking structs)
|
|
1894
1903
|
*
|
|
1895
|
-
* ```ts
|
|
1904
|
+
* ```ts import.meta.vitest
|
|
1896
1905
|
* import { Predicate } from "effect"
|
|
1897
1906
|
*
|
|
1898
1907
|
* const userCheck = Predicate.Struct({
|
|
@@ -1900,7 +1909,7 @@ export function Tuple<const T extends ReadonlyArray<Predicate.Any>>(
|
|
|
1900
1909
|
* name: Predicate.isString
|
|
1901
1910
|
* })
|
|
1902
1911
|
*
|
|
1903
|
-
*
|
|
1912
|
+
* userCheck({ id: 1, name: "Ada" }) // => true
|
|
1904
1913
|
* ```
|
|
1905
1914
|
*
|
|
1906
1915
|
* @see {@link Tuple}
|
|
@@ -1940,12 +1949,12 @@ export function Struct<R extends Record<string, Predicate.Any>>(
|
|
|
1940
1949
|
*
|
|
1941
1950
|
* **Example** (Negating a predicate)
|
|
1942
1951
|
*
|
|
1943
|
-
* ```ts
|
|
1952
|
+
* ```ts import.meta.vitest
|
|
1944
1953
|
* import { Predicate } from "effect"
|
|
1945
1954
|
*
|
|
1946
1955
|
* const isNotString = Predicate.not(Predicate.isString)
|
|
1947
1956
|
*
|
|
1948
|
-
*
|
|
1957
|
+
* isNotString(1) // => true
|
|
1949
1958
|
* ```
|
|
1950
1959
|
*
|
|
1951
1960
|
* @see {@link and}
|
|
@@ -1973,12 +1982,12 @@ export function not<A>(self: Predicate<A>): Predicate<A> {
|
|
|
1973
1982
|
*
|
|
1974
1983
|
* **Example** (Checking either condition)
|
|
1975
1984
|
*
|
|
1976
|
-
* ```ts
|
|
1985
|
+
* ```ts import.meta.vitest
|
|
1977
1986
|
* import { Predicate } from "effect"
|
|
1978
1987
|
*
|
|
1979
1988
|
* const isStringOrNumber = Predicate.or(Predicate.isString, Predicate.isNumber)
|
|
1980
1989
|
*
|
|
1981
|
-
*
|
|
1990
|
+
* isStringOrNumber("a") // => true
|
|
1982
1991
|
* ```
|
|
1983
1992
|
*
|
|
1984
1993
|
* @see {@link and}
|
|
@@ -2002,12 +2011,12 @@ export const or: {
|
|
|
2002
2011
|
*
|
|
2003
2012
|
* **Example** (Checking either condition)
|
|
2004
2013
|
*
|
|
2005
|
-
* ```ts
|
|
2014
|
+
* ```ts import.meta.vitest
|
|
2006
2015
|
* import { Predicate } from "effect"
|
|
2007
2016
|
*
|
|
2008
2017
|
* const isStringOrNumber = Predicate.or(Predicate.isString, Predicate.isNumber)
|
|
2009
2018
|
*
|
|
2010
|
-
*
|
|
2019
|
+
* isStringOrNumber("a") // => true
|
|
2011
2020
|
* ```
|
|
2012
2021
|
*
|
|
2013
2022
|
* @see {@link and}
|
|
@@ -2031,12 +2040,12 @@ export const or: {
|
|
|
2031
2040
|
*
|
|
2032
2041
|
* **Example** (Checking either condition)
|
|
2033
2042
|
*
|
|
2034
|
-
* ```ts
|
|
2043
|
+
* ```ts import.meta.vitest
|
|
2035
2044
|
* import { Predicate } from "effect"
|
|
2036
2045
|
*
|
|
2037
2046
|
* const isStringOrNumber = Predicate.or(Predicate.isString, Predicate.isNumber)
|
|
2038
2047
|
*
|
|
2039
|
-
*
|
|
2048
|
+
* isStringOrNumber("a") // => true
|
|
2040
2049
|
* ```
|
|
2041
2050
|
*
|
|
2042
2051
|
* @see {@link and}
|
|
@@ -2060,12 +2069,12 @@ export const or: {
|
|
|
2060
2069
|
*
|
|
2061
2070
|
* **Example** (Checking either condition)
|
|
2062
2071
|
*
|
|
2063
|
-
* ```ts
|
|
2072
|
+
* ```ts import.meta.vitest
|
|
2064
2073
|
* import { Predicate } from "effect"
|
|
2065
2074
|
*
|
|
2066
2075
|
* const isStringOrNumber = Predicate.or(Predicate.isString, Predicate.isNumber)
|
|
2067
2076
|
*
|
|
2068
|
-
*
|
|
2077
|
+
* isStringOrNumber("a") // => true
|
|
2069
2078
|
* ```
|
|
2070
2079
|
*
|
|
2071
2080
|
* @see {@link and}
|
|
@@ -2089,12 +2098,12 @@ export const or: {
|
|
|
2089
2098
|
*
|
|
2090
2099
|
* **Example** (Checking either condition)
|
|
2091
2100
|
*
|
|
2092
|
-
* ```ts
|
|
2101
|
+
* ```ts import.meta.vitest
|
|
2093
2102
|
* import { Predicate } from "effect"
|
|
2094
2103
|
*
|
|
2095
2104
|
* const isStringOrNumber = Predicate.or(Predicate.isString, Predicate.isNumber)
|
|
2096
2105
|
*
|
|
2097
|
-
*
|
|
2106
|
+
* isStringOrNumber("a") // => true
|
|
2098
2107
|
* ```
|
|
2099
2108
|
*
|
|
2100
2109
|
* @see {@link and}
|
|
@@ -2121,7 +2130,7 @@ export const or: {
|
|
|
2121
2130
|
*
|
|
2122
2131
|
* **Example** (Checking both conditions)
|
|
2123
2132
|
*
|
|
2124
|
-
* ```ts
|
|
2133
|
+
* ```ts import.meta.vitest
|
|
2125
2134
|
* import { Predicate } from "effect"
|
|
2126
2135
|
*
|
|
2127
2136
|
* const hasAAndB = Predicate.and(
|
|
@@ -2134,6 +2143,8 @@ export const or: {
|
|
|
2134
2143
|
* // input has both properties at this point
|
|
2135
2144
|
* const a = input.a
|
|
2136
2145
|
* const b = input.b
|
|
2146
|
+
*
|
|
2147
|
+
* const values = [a, b] // => [1, "ok"]
|
|
2137
2148
|
* }
|
|
2138
2149
|
* ```
|
|
2139
2150
|
*
|
|
@@ -2159,7 +2170,7 @@ export const and: {
|
|
|
2159
2170
|
*
|
|
2160
2171
|
* **Example** (Checking both conditions)
|
|
2161
2172
|
*
|
|
2162
|
-
* ```ts
|
|
2173
|
+
* ```ts import.meta.vitest
|
|
2163
2174
|
* import { Predicate } from "effect"
|
|
2164
2175
|
*
|
|
2165
2176
|
* const hasAAndB = Predicate.and(
|
|
@@ -2172,6 +2183,8 @@ export const and: {
|
|
|
2172
2183
|
* // input has both properties at this point
|
|
2173
2184
|
* const a = input.a
|
|
2174
2185
|
* const b = input.b
|
|
2186
|
+
*
|
|
2187
|
+
* const values = [a, b] // => [1, "ok"]
|
|
2175
2188
|
* }
|
|
2176
2189
|
* ```
|
|
2177
2190
|
*
|
|
@@ -2197,7 +2210,7 @@ export const and: {
|
|
|
2197
2210
|
*
|
|
2198
2211
|
* **Example** (Checking both conditions)
|
|
2199
2212
|
*
|
|
2200
|
-
* ```ts
|
|
2213
|
+
* ```ts import.meta.vitest
|
|
2201
2214
|
* import { Predicate } from "effect"
|
|
2202
2215
|
*
|
|
2203
2216
|
* const hasAAndB = Predicate.and(
|
|
@@ -2210,6 +2223,8 @@ export const and: {
|
|
|
2210
2223
|
* // input has both properties at this point
|
|
2211
2224
|
* const a = input.a
|
|
2212
2225
|
* const b = input.b
|
|
2226
|
+
*
|
|
2227
|
+
* const values = [a, b] // => [1, "ok"]
|
|
2213
2228
|
* }
|
|
2214
2229
|
* ```
|
|
2215
2230
|
*
|
|
@@ -2235,7 +2250,7 @@ export const and: {
|
|
|
2235
2250
|
*
|
|
2236
2251
|
* **Example** (Checking both conditions)
|
|
2237
2252
|
*
|
|
2238
|
-
* ```ts
|
|
2253
|
+
* ```ts import.meta.vitest
|
|
2239
2254
|
* import { Predicate } from "effect"
|
|
2240
2255
|
*
|
|
2241
2256
|
* const hasAAndB = Predicate.and(
|
|
@@ -2248,6 +2263,8 @@ export const and: {
|
|
|
2248
2263
|
* // input has both properties at this point
|
|
2249
2264
|
* const a = input.a
|
|
2250
2265
|
* const b = input.b
|
|
2266
|
+
*
|
|
2267
|
+
* const values = [a, b] // => [1, "ok"]
|
|
2251
2268
|
* }
|
|
2252
2269
|
* ```
|
|
2253
2270
|
*
|
|
@@ -2273,7 +2290,7 @@ export const and: {
|
|
|
2273
2290
|
*
|
|
2274
2291
|
* **Example** (Checking both conditions)
|
|
2275
2292
|
*
|
|
2276
|
-
* ```ts
|
|
2293
|
+
* ```ts import.meta.vitest
|
|
2277
2294
|
* import { Predicate } from "effect"
|
|
2278
2295
|
*
|
|
2279
2296
|
* const hasAAndB = Predicate.and(
|
|
@@ -2286,6 +2303,8 @@ export const and: {
|
|
|
2286
2303
|
* // input has both properties at this point
|
|
2287
2304
|
* const a = input.a
|
|
2288
2305
|
* const b = input.b
|
|
2306
|
+
*
|
|
2307
|
+
* const values = [a, b] // => [1, "ok"]
|
|
2289
2308
|
* }
|
|
2290
2309
|
* ```
|
|
2291
2310
|
*
|
|
@@ -2310,14 +2329,14 @@ export const and: {
|
|
|
2310
2329
|
*
|
|
2311
2330
|
* **Example** (Checking exclusive-or conditions)
|
|
2312
2331
|
*
|
|
2313
|
-
* ```ts
|
|
2332
|
+
* ```ts import.meta.vitest
|
|
2314
2333
|
* import { Predicate } from "effect"
|
|
2315
2334
|
*
|
|
2316
2335
|
* const isEven = (n: number) => n % 2 === 0
|
|
2317
2336
|
* const isPositive = (n: number) => n > 0
|
|
2318
2337
|
* const either = Predicate.xor(isEven, isPositive)
|
|
2319
2338
|
*
|
|
2320
|
-
*
|
|
2339
|
+
* either(-2) // => true
|
|
2321
2340
|
* ```
|
|
2322
2341
|
*
|
|
2323
2342
|
* @see {@link or}
|
|
@@ -2339,14 +2358,14 @@ export const xor: {
|
|
|
2339
2358
|
*
|
|
2340
2359
|
* **Example** (Checking exclusive-or conditions)
|
|
2341
2360
|
*
|
|
2342
|
-
* ```ts
|
|
2361
|
+
* ```ts import.meta.vitest
|
|
2343
2362
|
* import { Predicate } from "effect"
|
|
2344
2363
|
*
|
|
2345
2364
|
* const isEven = (n: number) => n % 2 === 0
|
|
2346
2365
|
* const isPositive = (n: number) => n > 0
|
|
2347
2366
|
* const either = Predicate.xor(isEven, isPositive)
|
|
2348
2367
|
*
|
|
2349
|
-
*
|
|
2368
|
+
* either(-2) // => true
|
|
2350
2369
|
* ```
|
|
2351
2370
|
*
|
|
2352
2371
|
* @see {@link or}
|
|
@@ -2368,14 +2387,14 @@ export const xor: {
|
|
|
2368
2387
|
*
|
|
2369
2388
|
* **Example** (Checking exclusive-or conditions)
|
|
2370
2389
|
*
|
|
2371
|
-
* ```ts
|
|
2390
|
+
* ```ts import.meta.vitest
|
|
2372
2391
|
* import { Predicate } from "effect"
|
|
2373
2392
|
*
|
|
2374
2393
|
* const isEven = (n: number) => n % 2 === 0
|
|
2375
2394
|
* const isPositive = (n: number) => n > 0
|
|
2376
2395
|
* const either = Predicate.xor(isEven, isPositive)
|
|
2377
2396
|
*
|
|
2378
|
-
*
|
|
2397
|
+
* either(-2) // => true
|
|
2379
2398
|
* ```
|
|
2380
2399
|
*
|
|
2381
2400
|
* @see {@link or}
|
|
@@ -2399,13 +2418,13 @@ export const xor: {
|
|
|
2399
2418
|
*
|
|
2400
2419
|
* **Example** (Defining equivalence)
|
|
2401
2420
|
*
|
|
2402
|
-
* ```ts
|
|
2421
|
+
* ```ts import.meta.vitest
|
|
2403
2422
|
* import { Predicate } from "effect"
|
|
2404
2423
|
*
|
|
2405
2424
|
* const isEven = (n: number) => n % 2 === 0
|
|
2406
2425
|
* const same = Predicate.eqv(isEven, isEven)
|
|
2407
2426
|
*
|
|
2408
|
-
*
|
|
2427
|
+
* same(3) // => true
|
|
2409
2428
|
* ```
|
|
2410
2429
|
*
|
|
2411
2430
|
* @see {@link xor}
|
|
@@ -2426,13 +2445,13 @@ export const eqv: {
|
|
|
2426
2445
|
*
|
|
2427
2446
|
* **Example** (Defining equivalence)
|
|
2428
2447
|
*
|
|
2429
|
-
* ```ts
|
|
2448
|
+
* ```ts import.meta.vitest
|
|
2430
2449
|
* import { Predicate } from "effect"
|
|
2431
2450
|
*
|
|
2432
2451
|
* const isEven = (n: number) => n % 2 === 0
|
|
2433
2452
|
* const same = Predicate.eqv(isEven, isEven)
|
|
2434
2453
|
*
|
|
2435
|
-
*
|
|
2454
|
+
* same(3) // => true
|
|
2436
2455
|
* ```
|
|
2437
2456
|
*
|
|
2438
2457
|
* @see {@link xor}
|
|
@@ -2453,13 +2472,13 @@ export const eqv: {
|
|
|
2453
2472
|
*
|
|
2454
2473
|
* **Example** (Defining equivalence)
|
|
2455
2474
|
*
|
|
2456
|
-
* ```ts
|
|
2475
|
+
* ```ts import.meta.vitest
|
|
2457
2476
|
* import { Predicate } from "effect"
|
|
2458
2477
|
*
|
|
2459
2478
|
* const isEven = (n: number) => n % 2 === 0
|
|
2460
2479
|
* const same = Predicate.eqv(isEven, isEven)
|
|
2461
2480
|
*
|
|
2462
|
-
*
|
|
2481
|
+
* same(3) // => true
|
|
2463
2482
|
* ```
|
|
2464
2483
|
*
|
|
2465
2484
|
* @see {@link xor}
|
|
@@ -2484,14 +2503,14 @@ export const eqv: {
|
|
|
2484
2503
|
*
|
|
2485
2504
|
* **Example** (Checking implication)
|
|
2486
2505
|
*
|
|
2487
|
-
* ```ts
|
|
2506
|
+
* ```ts import.meta.vitest
|
|
2488
2507
|
* import { Predicate } from "effect"
|
|
2489
2508
|
*
|
|
2490
2509
|
* const isAdult = (age: number) => age >= 18
|
|
2491
2510
|
* const canVote = (age: number) => age >= 18
|
|
2492
2511
|
* const implies = Predicate.implies(isAdult, canVote)
|
|
2493
2512
|
*
|
|
2494
|
-
*
|
|
2513
|
+
* implies(16) // => true
|
|
2495
2514
|
* ```
|
|
2496
2515
|
*
|
|
2497
2516
|
* @see {@link and}
|
|
@@ -2515,14 +2534,14 @@ export const implies: {
|
|
|
2515
2534
|
*
|
|
2516
2535
|
* **Example** (Checking implication)
|
|
2517
2536
|
*
|
|
2518
|
-
* ```ts
|
|
2537
|
+
* ```ts import.meta.vitest
|
|
2519
2538
|
* import { Predicate } from "effect"
|
|
2520
2539
|
*
|
|
2521
2540
|
* const isAdult = (age: number) => age >= 18
|
|
2522
2541
|
* const canVote = (age: number) => age >= 18
|
|
2523
2542
|
* const implies = Predicate.implies(isAdult, canVote)
|
|
2524
2543
|
*
|
|
2525
|
-
*
|
|
2544
|
+
* implies(16) // => true
|
|
2526
2545
|
* ```
|
|
2527
2546
|
*
|
|
2528
2547
|
* @see {@link and}
|
|
@@ -2546,14 +2565,14 @@ export const implies: {
|
|
|
2546
2565
|
*
|
|
2547
2566
|
* **Example** (Checking implication)
|
|
2548
2567
|
*
|
|
2549
|
-
* ```ts
|
|
2568
|
+
* ```ts import.meta.vitest
|
|
2550
2569
|
* import { Predicate } from "effect"
|
|
2551
2570
|
*
|
|
2552
2571
|
* const isAdult = (age: number) => age >= 18
|
|
2553
2572
|
* const canVote = (age: number) => age >= 18
|
|
2554
2573
|
* const implies = Predicate.implies(isAdult, canVote)
|
|
2555
2574
|
*
|
|
2556
|
-
*
|
|
2575
|
+
* implies(16) // => true
|
|
2557
2576
|
* ```
|
|
2558
2577
|
*
|
|
2559
2578
|
* @see {@link and}
|
|
@@ -2580,12 +2599,12 @@ export const implies: {
|
|
|
2580
2599
|
*
|
|
2581
2600
|
* **Example** (Checking NOR conditions)
|
|
2582
2601
|
*
|
|
2583
|
-
* ```ts
|
|
2602
|
+
* ```ts import.meta.vitest
|
|
2584
2603
|
* import { Predicate } from "effect"
|
|
2585
2604
|
*
|
|
2586
2605
|
* const neither = Predicate.nor(Predicate.isString, Predicate.isNumber)
|
|
2587
2606
|
*
|
|
2588
|
-
*
|
|
2607
|
+
* neither(true) // => true
|
|
2589
2608
|
* ```
|
|
2590
2609
|
*
|
|
2591
2610
|
* @see {@link or}
|
|
@@ -2607,12 +2626,12 @@ export const nor: {
|
|
|
2607
2626
|
*
|
|
2608
2627
|
* **Example** (Checking NOR conditions)
|
|
2609
2628
|
*
|
|
2610
|
-
* ```ts
|
|
2629
|
+
* ```ts import.meta.vitest
|
|
2611
2630
|
* import { Predicate } from "effect"
|
|
2612
2631
|
*
|
|
2613
2632
|
* const neither = Predicate.nor(Predicate.isString, Predicate.isNumber)
|
|
2614
2633
|
*
|
|
2615
|
-
*
|
|
2634
|
+
* neither(true) // => true
|
|
2616
2635
|
* ```
|
|
2617
2636
|
*
|
|
2618
2637
|
* @see {@link or}
|
|
@@ -2634,12 +2653,12 @@ export const nor: {
|
|
|
2634
2653
|
*
|
|
2635
2654
|
* **Example** (Checking NOR conditions)
|
|
2636
2655
|
*
|
|
2637
|
-
* ```ts
|
|
2656
|
+
* ```ts import.meta.vitest
|
|
2638
2657
|
* import { Predicate } from "effect"
|
|
2639
2658
|
*
|
|
2640
2659
|
* const neither = Predicate.nor(Predicate.isString, Predicate.isNumber)
|
|
2641
2660
|
*
|
|
2642
|
-
*
|
|
2661
|
+
* neither(true) // => true
|
|
2643
2662
|
* ```
|
|
2644
2663
|
*
|
|
2645
2664
|
* @see {@link or}
|
|
@@ -2666,12 +2685,12 @@ export const nor: {
|
|
|
2666
2685
|
*
|
|
2667
2686
|
* **Example** (Checking NAND conditions)
|
|
2668
2687
|
*
|
|
2669
|
-
* ```ts
|
|
2688
|
+
* ```ts import.meta.vitest
|
|
2670
2689
|
* import { Predicate } from "effect"
|
|
2671
2690
|
*
|
|
2672
2691
|
* const notBoth = Predicate.nand(Predicate.isString, Predicate.isNumber)
|
|
2673
2692
|
*
|
|
2674
|
-
*
|
|
2693
|
+
* notBoth("a") // => true
|
|
2675
2694
|
* ```
|
|
2676
2695
|
*
|
|
2677
2696
|
* @see {@link and}
|
|
@@ -2693,12 +2712,12 @@ export const nand: {
|
|
|
2693
2712
|
*
|
|
2694
2713
|
* **Example** (Checking NAND conditions)
|
|
2695
2714
|
*
|
|
2696
|
-
* ```ts
|
|
2715
|
+
* ```ts import.meta.vitest
|
|
2697
2716
|
* import { Predicate } from "effect"
|
|
2698
2717
|
*
|
|
2699
2718
|
* const notBoth = Predicate.nand(Predicate.isString, Predicate.isNumber)
|
|
2700
2719
|
*
|
|
2701
|
-
*
|
|
2720
|
+
* notBoth("a") // => true
|
|
2702
2721
|
* ```
|
|
2703
2722
|
*
|
|
2704
2723
|
* @see {@link and}
|
|
@@ -2720,12 +2739,12 @@ export const nand: {
|
|
|
2720
2739
|
*
|
|
2721
2740
|
* **Example** (Checking NAND conditions)
|
|
2722
2741
|
*
|
|
2723
|
-
* ```ts
|
|
2742
|
+
* ```ts import.meta.vitest
|
|
2724
2743
|
* import { Predicate } from "effect"
|
|
2725
2744
|
*
|
|
2726
2745
|
* const notBoth = Predicate.nand(Predicate.isString, Predicate.isNumber)
|
|
2727
2746
|
*
|
|
2728
|
-
*
|
|
2747
|
+
* notBoth("a") // => true
|
|
2729
2748
|
* ```
|
|
2730
2749
|
*
|
|
2731
2750
|
* @see {@link and}
|
|
@@ -2753,17 +2772,17 @@ export const nand: {
|
|
|
2753
2772
|
*
|
|
2754
2773
|
* **Example** (Checking all predicates)
|
|
2755
2774
|
*
|
|
2756
|
-
* ```ts
|
|
2775
|
+
* ```ts import.meta.vitest
|
|
2757
2776
|
* import { Predicate } from "effect"
|
|
2758
2777
|
*
|
|
2759
2778
|
* const allChecks = Predicate.every([Predicate.isNumber, (n: number) => n > 0])
|
|
2760
2779
|
*
|
|
2761
|
-
*
|
|
2780
|
+
* allChecks(2) // => true
|
|
2762
2781
|
* ```
|
|
2763
2782
|
*
|
|
2764
2783
|
* @see {@link some}
|
|
2765
2784
|
* @see {@link and}
|
|
2766
|
-
* @category
|
|
2785
|
+
* @category combining
|
|
2767
2786
|
* @since 2.0.0
|
|
2768
2787
|
*/
|
|
2769
2788
|
export function every<A>(collection: Iterable<Predicate<A>>): Predicate<A> {
|
|
@@ -2791,17 +2810,17 @@ export function every<A>(collection: Iterable<Predicate<A>>): Predicate<A> {
|
|
|
2791
2810
|
*
|
|
2792
2811
|
* **Example** (Checking any predicate)
|
|
2793
2812
|
*
|
|
2794
|
-
* ```ts
|
|
2813
|
+
* ```ts import.meta.vitest
|
|
2795
2814
|
* import { Predicate } from "effect"
|
|
2796
2815
|
*
|
|
2797
2816
|
* const anyCheck = Predicate.some([Predicate.isString, Predicate.isNumber])
|
|
2798
2817
|
*
|
|
2799
|
-
*
|
|
2818
|
+
* anyCheck("ok") // => true
|
|
2800
2819
|
* ```
|
|
2801
2820
|
*
|
|
2802
2821
|
* @see {@link every}
|
|
2803
2822
|
* @see {@link or}
|
|
2804
|
-
* @category
|
|
2823
|
+
* @category combining
|
|
2805
2824
|
* @since 2.0.0
|
|
2806
2825
|
*/
|
|
2807
2826
|
export function some<A>(collection: Iterable<Predicate<A>>): Predicate<A> {
|