effect 4.0.0-beta.66 → 4.0.0-beta.67
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 +113 -67
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +28 -18
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +404 -337
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +190 -146
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +167 -97
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +87 -47
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +62 -31
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +30 -15
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +20 -1
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +16 -0
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +236 -132
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +133 -57
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +74 -62
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +43 -36
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +1518 -575
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +661 -287
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +119 -10
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +45 -6
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +548 -379
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +238 -170
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +15 -8
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +8 -4
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +2 -4
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +2 -4
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +4 -2
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +2 -2
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +1 -1
- package/dist/ConfigProvider.js +1 -1
- package/dist/Console.d.ts +76 -50
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +69 -46
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +383 -134
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +134 -54
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +69 -48
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +96 -36
- package/dist/Cron.js.map +1 -1
- package/dist/Data.d.ts +3 -2
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +874 -443
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +374 -215
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +367 -174
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +145 -71
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +42 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +36 -0
- package/dist/Duration.d.ts +329 -185
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +174 -106
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2109 -1945
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +901 -726
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +37 -2
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +2 -2
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +78 -28
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +75 -27
- package/dist/Encoding.js.map +1 -1
- package/dist/Equivalence.d.ts +14 -19
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +14 -19
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +66 -82
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +38 -29
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +94 -9
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +20 -5
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +7 -5
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +72 -40
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +39 -21
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +117 -56
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +120 -38
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +286 -158
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +174 -72
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +92 -51
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +96 -33
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +104 -73
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +53 -39
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +166 -88
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +68 -42
- package/dist/Filter.js.map +1 -1
- package/dist/Function.d.ts +154 -86
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +53 -37
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +682 -365
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +308 -157
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +29 -13
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +31 -18
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +25 -15
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +444 -256
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +223 -105
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +36 -17
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +75 -8
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +194 -104
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +93 -38
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +20 -9
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +16 -6
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +309 -149
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +129 -65
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +4 -3
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +4 -3
- package/dist/JsonPatch.js.map +1 -1
- package/dist/Latch.d.ts +98 -15
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +41 -10
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +412 -309
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +261 -180
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +95 -21
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +55 -11
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +92 -131
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +25 -15
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +155 -99
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +211 -184
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +75 -17
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +22 -16
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +133 -157
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +85 -76
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +325 -284
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +217 -212
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +117 -58
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +52 -29
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +52 -30
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +94 -38
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +92 -49
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +123 -71
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +99 -62
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +79 -60
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +3 -0
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +36 -39
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +34 -20
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +116 -64
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +54 -30
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +1 -2
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +0 -1
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +28 -47
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +14 -12
- package/dist/Option.js.map +1 -1
- package/dist/Ordering.d.ts +43 -28
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +4 -2
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +225 -40
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +113 -17
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +77 -13
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +48 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +71 -15
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +59 -12
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +74 -6
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +68 -5
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +66 -31
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +26 -24
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +16 -21
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +9 -14
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +9 -2
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +7 -1
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +364 -262
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +245 -174
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +94 -25
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +61 -13
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +284 -150
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +216 -113
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +54 -35
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +36 -24
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +151 -141
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +66 -20
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +69 -32
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +33 -16
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +273 -129
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +117 -57
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +3 -3
- package/dist/Redactable.js +2 -2
- package/dist/Redacted.d.ts +63 -33
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +30 -14
- package/dist/Redacted.js.map +1 -1
- package/dist/Ref.d.ts +81 -52
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +54 -35
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +73 -31
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +66 -30
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +11 -5
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +11 -5
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +158 -34
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +67 -12
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +261 -116
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +77 -41
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +13 -7
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +44 -6
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +16 -14
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +6 -6
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +43 -18
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +35 -16
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +545 -576
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +260 -246
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +43 -6
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +33 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +803 -282
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +281 -189
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +24 -15
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +13 -9
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +26 -13
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +22 -9
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +1 -8
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +194 -25
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +220 -26
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +61 -41
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +56 -33
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +7 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +23 -0
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +102 -43
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +57 -23
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +138 -46
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +80 -19
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +28 -8
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +25 -5
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +64 -28
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +22 -13
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +458 -200
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +240 -89
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +43 -6
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +33 -4
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +1896 -1183
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +867 -524
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +171 -95
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +125 -67
- package/dist/String.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +308 -203
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +125 -76
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +13 -5
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +13 -5
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +278 -62
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +116 -23
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +26 -2
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +4 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +39 -7
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +10 -4
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +229 -55
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +94 -18
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +213 -142
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +88 -60
- package/dist/Trie.js.map +1 -1
- package/dist/TxChunk.d.ts +182 -146
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +73 -56
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +43 -29
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +22 -15
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +362 -222
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +171 -98
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +178 -104
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +84 -43
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +93 -62
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +54 -36
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +77 -49
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +60 -37
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +279 -241
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +147 -101
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +69 -46
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +48 -32
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +69 -40
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +34 -19
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +101 -54
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +76 -34
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +72 -48
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +33 -22
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +34 -34
- package/dist/UndefinedOr.d.ts +48 -25
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +28 -25
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +71 -116
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +20 -6
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +4 -0
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +4 -0
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +81 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -32
- package/dist/index.js.map +1 -1
- package/dist/internal/schema/schema.js +1 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +6 -3
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +6 -3
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +39 -34
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +42 -12
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +39 -30
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +25 -10
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.js +7 -7
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +197 -130
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +166 -102
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
- package/dist/unstable/ai/Chat.d.ts +65 -41
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +51 -33
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +9 -8
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +28 -18
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +18 -11
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +31 -25
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +20 -14
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +339 -119
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +264 -98
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +53 -19
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +63 -15
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +8 -6
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +7 -5
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
- package/dist/unstable/ai/Prompt.d.ts +194 -168
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +75 -66
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +153 -140
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +43 -48
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +27 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +42 -32
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +14 -10
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +13 -8
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +10 -6
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +153 -84
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +97 -44
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +32 -39
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +7 -5
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +42 -24
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +42 -24
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +226 -134
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +101 -65
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +72 -26
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +86 -23
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +43 -13
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +30 -6
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +194 -113
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +45 -31
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +7 -7
- package/dist/unstable/cli/Completions.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +235 -142
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +111 -71
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +41 -13
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +30 -7
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +35 -10
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/HelpDoc.js +21 -0
- package/dist/unstable/cli/Param.d.ts +79 -31
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +160 -98
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +79 -42
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +66 -35
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +177 -45
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +103 -21
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +13 -0
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +5 -1
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +5 -1
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/config.d.ts +3 -0
- package/dist/unstable/cli/internal/config.d.ts.map +1 -1
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/lexer.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +35 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +56 -7
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +56 -7
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +39 -5
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +61 -8
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +11 -3
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +75 -16
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +75 -10
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +30 -2
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +18 -3
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +15 -2
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +24 -2
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +40 -8
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +43 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +11 -4
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +27 -3
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +24 -2
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +105 -23
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +88 -14
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +88 -13
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +31 -6
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts +24 -3
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +21 -2
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +102 -13
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +86 -10
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +70 -10
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +101 -12
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +64 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +47 -17
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +47 -17
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +34 -2
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +40 -12
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +31 -4
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +38 -4
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +73 -10
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +70 -9
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +51 -5
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +47 -4
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +10 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +35 -4
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +66 -9
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +23 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +15 -1
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +15 -1
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +21 -1
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +89 -19
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +48 -13
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +29 -2
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +18 -1
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +18 -1
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/internal/hash.js +12 -0
- package/dist/unstable/cluster/internal/hash.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +26 -3
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +26 -3
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +32 -5
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +102 -20
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +21 -1
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +81 -12
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +75 -9
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +149 -21
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +97 -13
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +109 -18
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +69 -13
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +115 -30
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +22 -2
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +24 -6
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +108 -16
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +151 -31
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +111 -20
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +92 -18
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +72 -16
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +54 -8
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +17 -3
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +156 -77
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +93 -39
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +40 -7
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +27 -4
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +33 -4
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay.d.ts +1 -1
- package/dist/unstable/http/FindMyWay.js +1 -1
- package/dist/unstable/http/Headers.d.ts +182 -36
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +86 -16
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +114 -26
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +98 -20
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +205 -96
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +84 -38
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +68 -12
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +71 -9
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +151 -45
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +44 -11
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +42 -16
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +33 -13
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +44 -6
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +35 -5
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +23 -1
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +52 -10
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +34 -3
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +34 -3
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +194 -45
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +118 -24
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +151 -22
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +76 -11
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +90 -10
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +82 -8
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +101 -20
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +43 -5
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +204 -33
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +22 -4
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +47 -5
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +178 -28
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +129 -19
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Node.js +1 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Search.js +1 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Web.js +1 -1
- package/dist/unstable/http/Multipasta.d.ts +1 -1
- package/dist/unstable/http/Multipasta.js +1 -1
- package/dist/unstable/http/Template.d.ts +53 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +26 -0
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +56 -42
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +29 -15
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +233 -49
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +116 -23
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +14 -8
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +44 -6
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +42 -6
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +98 -1
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +111 -22
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +47 -5
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +6 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +26 -1
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +73 -15
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +33 -3
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js +14 -3
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +32 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +29 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +32 -2
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +49 -12
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +47 -5
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +28 -3
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +32 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +7 -5
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.d.ts +2 -1
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +2 -1
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +81 -21
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +76 -15
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +22 -5
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +24 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +60 -13
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +97 -16
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +90 -14
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +81 -16
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +26 -5
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +36 -4
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +87 -64
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +24 -17
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +11 -6
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.d.ts +2 -1
- package/dist/unstable/process/index.d.ts.map +1 -1
- package/dist/unstable/process/index.js +2 -1
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +121 -36
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +539 -130
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +252 -58
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +29 -3
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +69 -10
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +29 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +28 -5
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +35 -3
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +61 -7
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +255 -56
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +44 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +81 -19
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +52 -12
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +26 -2
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +3 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +23 -7
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +39 -3
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +34 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +56 -12
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +73 -23
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +69 -22
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +20 -1
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +20 -1
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +16 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +8 -0
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +8 -0
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +130 -52
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +79 -34
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +104 -24
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +22 -6
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +167 -34
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +123 -28
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +58 -10
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +43 -5
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts +35 -4
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +44 -4
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +34 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +38 -1
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +31 -0
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +22 -0
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +99 -0
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +114 -0
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +26 -5
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +8 -4
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +56 -13
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +44 -10
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +29 -8
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +29 -8
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.d.ts +3 -0
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.js +23 -0
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +124 -0
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +82 -0
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +1 -1
- package/dist/unstable/sql/index.js +1 -1
- package/dist/unstable/workers/Transferable.d.ts +65 -13
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +53 -10
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +60 -8
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +43 -4
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +31 -9
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +44 -7
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +24 -1
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.d.ts +1 -1
- package/dist/unstable/workers/index.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +61 -10
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +20 -5
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +12 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +22 -2
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +76 -13
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +30 -7
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +23 -5
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +100 -31
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +75 -19
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +16 -4
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +2 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +11 -11
- package/src/Array.ts +113 -67
- package/src/BigDecimal.ts +404 -337
- package/src/BigInt.ts +167 -97
- package/src/Boolean.ts +62 -31
- package/src/Brand.ts +20 -1
- package/src/Cache.ts +331 -164
- package/src/Cause.ts +74 -62
- package/src/Channel.ts +1585 -607
- package/src/ChannelSchema.ts +137 -12
- package/src/Chunk.ts +549 -380
- package/src/Clock.ts +15 -8
- package/src/Combiner.ts +2 -4
- package/src/Config.ts +4 -2
- package/src/ConfigProvider.ts +1 -1
- package/src/Console.ts +88 -58
- package/src/Context.ts +384 -135
- package/src/Cron.ts +111 -48
- package/src/Data.ts +3 -2
- package/src/DateTime.ts +874 -443
- package/src/Deferred.ts +367 -174
- package/src/Differ.ts +42 -0
- package/src/Duration.ts +329 -185
- package/src/Effect.ts +2127 -1957
- package/src/Effectable.ts +37 -2
- package/src/Encoding.ts +78 -28
- package/src/Equivalence.ts +14 -19
- package/src/ErrorReporter.ts +66 -82
- package/src/ExecutionPlan.ts +94 -9
- package/src/Exit.ts +7 -5
- package/src/Fiber.ts +72 -40
- package/src/FiberHandle.ts +156 -56
- package/src/FiberMap.ts +327 -162
- package/src/FiberSet.ts +129 -51
- package/src/FileSystem.ts +106 -74
- package/src/Filter.ts +166 -88
- package/src/Function.ts +154 -86
- package/src/Graph.ts +682 -365
- package/src/HKT.ts +29 -13
- package/src/Hash.ts +31 -18
- package/src/HashMap.ts +444 -256
- package/src/HashRing.ts +94 -17
- package/src/HashSet.ts +194 -104
- package/src/Inspectable.ts +22 -10
- package/src/Iterable.ts +309 -149
- package/src/JsonPatch.ts +4 -3
- package/src/Latch.ts +98 -15
- package/src/Layer.ts +487 -344
- package/src/LayerMap.ts +95 -21
- package/src/LogLevel.ts +92 -131
- package/src/Logger.ts +357 -288
- package/src/ManagedRuntime.ts +75 -17
- package/src/Match.ts +133 -157
- package/src/Metric.ts +355 -304
- package/src/MutableHashMap.ts +161 -84
- package/src/MutableHashSet.ts +122 -52
- package/src/MutableList.ts +141 -81
- package/src/MutableRef.ts +130 -90
- package/src/Newtype.ts +3 -0
- package/src/NonEmptyIterable.ts +36 -39
- package/src/Number.ts +116 -64
- package/src/Optic.ts +1 -2
- package/src/Option.ts +28 -47
- package/src/Ordering.ts +43 -28
- package/src/PartitionedSemaphore.ts +225 -40
- package/src/Path.ts +77 -13
- package/src/Pipeable.ts +76 -21
- package/src/PlatformError.ts +74 -6
- package/src/Pool.ts +94 -31
- package/src/Predicate.ts +16 -21
- package/src/PrimaryKey.ts +9 -2
- package/src/PubSub.ts +364 -262
- package/src/Pull.ts +94 -25
- package/src/Queue.ts +284 -150
- package/src/Random.ts +54 -35
- package/src/RcMap.ts +151 -141
- package/src/RcRef.ts +69 -32
- package/src/Record.ts +273 -129
- package/src/Redactable.ts +3 -3
- package/src/Redacted.ts +63 -33
- package/src/Ref.ts +161 -104
- package/src/References.ts +73 -31
- package/src/RegExp.ts +11 -5
- package/src/Request.ts +158 -34
- package/src/RequestResolver.ts +277 -119
- package/src/Resource.ts +45 -7
- package/src/Result.ts +18 -16
- package/src/Runtime.ts +45 -19
- package/src/Schedule.ts +574 -599
- package/src/Scheduler.ts +43 -6
- package/src/Schema.ts +819 -295
- package/src/SchemaAST.ts +25 -16
- package/src/SchemaGetter.ts +29 -14
- package/src/SchemaIssue.ts +1 -8
- package/src/SchemaParser.ts +262 -38
- package/src/SchemaTransformation.ts +61 -41
- package/src/SchemaUtils.ts +23 -0
- package/src/Scope.ts +102 -43
- package/src/ScopedCache.ts +192 -56
- package/src/ScopedRef.ts +28 -8
- package/src/Semaphore.ts +64 -28
- package/src/Sink.ts +458 -200
- package/src/Stdio.ts +43 -6
- package/src/Stream.ts +2039 -1252
- package/src/String.ts +171 -95
- package/src/SubscriptionRef.ts +308 -203
- package/src/Symbol.ts +13 -5
- package/src/SynchronizedRef.ts +278 -62
- package/src/Take.ts +26 -2
- package/src/Terminal.ts +40 -7
- package/src/Tracer.ts +229 -55
- package/src/Trie.ts +213 -142
- package/src/TxChunk.ts +182 -146
- package/src/TxDeferred.ts +43 -29
- package/src/TxHashMap.ts +370 -230
- package/src/TxHashSet.ts +250 -152
- package/src/TxPriorityQueue.ts +96 -64
- package/src/TxPubSub.ts +77 -49
- package/src/TxQueue.ts +279 -241
- package/src/TxReentrantLock.ts +70 -47
- package/src/TxRef.ts +69 -40
- package/src/TxSemaphore.ts +101 -54
- package/src/TxSubscriptionRef.ts +72 -48
- package/src/Types.ts +34 -34
- package/src/UndefinedOr.ts +48 -25
- package/src/Unify.ts +71 -116
- package/src/Utils.ts +4 -0
- package/src/index.ts +81 -32
- package/src/internal/schema/schema.ts +1 -1
- package/src/testing/FastCheck.ts +6 -3
- package/src/testing/TestClock.ts +63 -34
- package/src/testing/TestConsole.ts +49 -30
- package/src/testing/TestSchema.ts +8 -8
- package/src/unstable/ai/AiError.ts +187 -120
- package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
- package/src/unstable/ai/Chat.ts +69 -43
- package/src/unstable/ai/EmbeddingModel.ts +12 -11
- package/src/unstable/ai/IdGenerator.ts +28 -18
- package/src/unstable/ai/LanguageModel.ts +35 -27
- package/src/unstable/ai/McpSchema.ts +339 -119
- package/src/unstable/ai/McpServer.ts +76 -19
- package/src/unstable/ai/Model.ts +8 -6
- package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
- package/src/unstable/ai/Prompt.ts +210 -184
- package/src/unstable/ai/Response.ts +159 -147
- package/src/unstable/ai/ResponseIdTracker.ts +43 -4
- package/src/unstable/ai/Telemetry.ts +42 -32
- package/src/unstable/ai/Tokenizer.ts +13 -8
- package/src/unstable/ai/Tool.ts +154 -85
- package/src/unstable/ai/Toolkit.ts +51 -46
- package/src/unstable/ai/index.ts +42 -24
- package/src/unstable/cli/Argument.ts +226 -134
- package/src/unstable/cli/CliError.ts +96 -26
- package/src/unstable/cli/CliOutput.ts +43 -13
- package/src/unstable/cli/Command.ts +194 -113
- package/src/unstable/cli/Completions.ts +7 -7
- package/src/unstable/cli/Flag.ts +235 -142
- package/src/unstable/cli/GlobalFlag.ts +41 -13
- package/src/unstable/cli/HelpDoc.ts +35 -10
- package/src/unstable/cli/Param.ts +327 -189
- package/src/unstable/cli/Primitive.ts +79 -42
- package/src/unstable/cli/Prompt.ts +201 -45
- package/src/unstable/cli/internal/ansi.ts +13 -0
- package/src/unstable/cli/internal/command.ts +5 -1
- package/src/unstable/cli/internal/config.ts +3 -0
- package/src/unstable/cli/internal/lexer.ts +11 -0
- package/src/unstable/cluster/ClusterCron.ts +35 -1
- package/src/unstable/cluster/ClusterError.ts +56 -7
- package/src/unstable/cluster/ClusterMetrics.ts +39 -5
- package/src/unstable/cluster/ClusterSchema.ts +61 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +35 -2
- package/src/unstable/cluster/DeliverAt.ts +39 -4
- package/src/unstable/cluster/Entity.ts +107 -16
- package/src/unstable/cluster/EntityAddress.ts +30 -2
- package/src/unstable/cluster/EntityId.ts +18 -3
- package/src/unstable/cluster/EntityProxy.ts +34 -2
- package/src/unstable/cluster/EntityProxyServer.ts +44 -8
- package/src/unstable/cluster/EntityResource.ts +43 -6
- package/src/unstable/cluster/EntityType.ts +27 -3
- package/src/unstable/cluster/Envelope.ts +128 -23
- package/src/unstable/cluster/HttpRunner.ts +88 -13
- package/src/unstable/cluster/K8sHttpClient.ts +49 -6
- package/src/unstable/cluster/MachineId.ts +24 -3
- package/src/unstable/cluster/Message.ts +102 -13
- package/src/unstable/cluster/MessageStorage.ts +127 -21
- package/src/unstable/cluster/Reply.ts +101 -12
- package/src/unstable/cluster/Runner.ts +47 -17
- package/src/unstable/cluster/RunnerAddress.ts +34 -2
- package/src/unstable/cluster/RunnerHealth.ts +40 -12
- package/src/unstable/cluster/RunnerServer.ts +31 -4
- package/src/unstable/cluster/RunnerStorage.ts +42 -5
- package/src/unstable/cluster/Runners.ts +73 -10
- package/src/unstable/cluster/ShardId.ts +51 -5
- package/src/unstable/cluster/Sharding.ts +35 -4
- package/src/unstable/cluster/ShardingConfig.ts +75 -10
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
- package/src/unstable/cluster/SingleRunner.ts +23 -1
- package/src/unstable/cluster/Singleton.ts +15 -1
- package/src/unstable/cluster/SingletonAddress.ts +21 -1
- package/src/unstable/cluster/Snowflake.ts +89 -19
- package/src/unstable/cluster/SocketRunner.ts +29 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
- package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
- package/src/unstable/cluster/TestRunner.ts +18 -1
- package/src/unstable/cluster/internal/hash.ts +12 -0
- package/src/unstable/devtools/DevTools.ts +26 -3
- package/src/unstable/devtools/DevToolsClient.ts +32 -5
- package/src/unstable/devtools/DevToolsSchema.ts +201 -44
- package/src/unstable/devtools/DevToolsServer.ts +27 -2
- package/src/unstable/encoding/Msgpack.ts +97 -12
- package/src/unstable/encoding/Ndjson.ts +149 -21
- package/src/unstable/encoding/Sse.ts +109 -18
- package/src/unstable/eventlog/Event.ts +131 -30
- package/src/unstable/eventlog/EventGroup.ts +50 -17
- package/src/unstable/eventlog/EventJournal.ts +120 -20
- package/src/unstable/eventlog/EventLog.ts +151 -31
- package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
- package/src/unstable/eventlog/EventLogMessage.ts +92 -18
- package/src/unstable/eventlog/EventLogRemote.ts +54 -8
- package/src/unstable/eventlog/EventLogServer.ts +33 -3
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
- package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
- package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
- package/src/unstable/http/Cookies.ts +156 -77
- package/src/unstable/http/Etag.ts +40 -7
- package/src/unstable/http/FetchHttpClient.ts +33 -4
- package/src/unstable/http/FindMyWay.ts +1 -1
- package/src/unstable/http/Headers.ts +252 -50
- package/src/unstable/http/HttpBody.ts +128 -26
- package/src/unstable/http/HttpClient.ts +205 -96
- package/src/unstable/http/HttpClientError.ts +80 -12
- package/src/unstable/http/HttpClientRequest.ts +318 -100
- package/src/unstable/http/HttpClientResponse.ts +59 -16
- package/src/unstable/http/HttpEffect.ts +66 -18
- package/src/unstable/http/HttpIncomingMessage.ts +47 -7
- package/src/unstable/http/HttpMethod.ts +35 -5
- package/src/unstable/http/HttpMiddleware.ts +59 -11
- package/src/unstable/http/HttpPlatform.ts +34 -3
- package/src/unstable/http/HttpRouter.ts +217 -52
- package/src/unstable/http/HttpServer.ts +151 -22
- package/src/unstable/http/HttpServerError.ts +90 -10
- package/src/unstable/http/HttpServerRequest.ts +125 -21
- package/src/unstable/http/HttpServerRespondable.ts +49 -6
- package/src/unstable/http/HttpServerResponse.ts +390 -67
- package/src/unstable/http/HttpStaticServer.ts +22 -4
- package/src/unstable/http/HttpTraceContext.ts +53 -6
- package/src/unstable/http/Multipart.ts +178 -28
- package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
- package/src/unstable/http/Multipasta/Node.ts +1 -1
- package/src/unstable/http/Multipasta/Search.ts +1 -1
- package/src/unstable/http/Multipasta/Web.ts +1 -1
- package/src/unstable/http/Multipasta.ts +1 -1
- package/src/unstable/http/Template.ts +53 -0
- package/src/unstable/http/Url.ts +56 -42
- package/src/unstable/http/UrlParams.ts +233 -49
- package/src/unstable/httpapi/HttpApi.ts +49 -14
- package/src/unstable/httpapi/HttpApiBuilder.ts +82 -16
- package/src/unstable/httpapi/HttpApiClient.ts +79 -15
- package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
- package/src/unstable/httpapi/HttpApiError.ts +100 -1
- package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
- package/src/unstable/httpapi/HttpApiMiddleware.ts +111 -22
- package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
- package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
- package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
- package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
- package/src/unstable/httpapi/HttpApiTest.ts +26 -1
- package/src/unstable/httpapi/OpenApi.ts +115 -15
- package/src/unstable/observability/Otlp.ts +33 -3
- package/src/unstable/observability/OtlpExporter.ts +32 -1
- package/src/unstable/observability/OtlpLogger.ts +31 -2
- package/src/unstable/observability/OtlpMetrics.ts +37 -4
- package/src/unstable/observability/OtlpResource.ts +68 -12
- package/src/unstable/observability/OtlpSerialization.ts +28 -3
- package/src/unstable/observability/OtlpTracer.ts +38 -2
- package/src/unstable/observability/PrometheusMetrics.ts +32 -12
- package/src/unstable/observability/index.ts +2 -1
- package/src/unstable/persistence/KeyValueStore.ts +108 -28
- package/src/unstable/persistence/Persistable.ts +76 -15
- package/src/unstable/persistence/PersistedCache.ts +27 -2
- package/src/unstable/persistence/PersistedQueue.ts +98 -16
- package/src/unstable/persistence/Persistence.ts +97 -16
- package/src/unstable/persistence/RateLimiter.ts +97 -21
- package/src/unstable/persistence/Redis.ts +42 -5
- package/src/unstable/process/ChildProcess.ts +89 -65
- package/src/unstable/process/ChildProcessSpawner.ts +22 -11
- package/src/unstable/process/index.ts +2 -1
- package/src/unstable/reactivity/AsyncResult.ts +202 -61
- package/src/unstable/reactivity/Atom.ts +593 -139
- package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
- package/src/unstable/reactivity/AtomRef.ts +51 -7
- package/src/unstable/reactivity/AtomRegistry.ts +141 -22
- package/src/unstable/reactivity/AtomRpc.ts +36 -2
- package/src/unstable/reactivity/Hydration.ts +45 -5
- package/src/unstable/reactivity/Reactivity.ts +95 -13
- package/src/unstable/rpc/Rpc.ts +255 -56
- package/src/unstable/rpc/RpcClient.ts +107 -19
- package/src/unstable/rpc/RpcClientError.ts +26 -2
- package/src/unstable/rpc/RpcGroup.ts +51 -8
- package/src/unstable/rpc/RpcMessage.ts +128 -32
- package/src/unstable/rpc/RpcMiddleware.ts +100 -20
- package/src/unstable/rpc/RpcSchema.ts +38 -4
- package/src/unstable/rpc/RpcSerialization.ts +60 -13
- package/src/unstable/rpc/RpcServer.ts +107 -23
- package/src/unstable/rpc/RpcTest.ts +20 -1
- package/src/unstable/rpc/RpcWorker.ts +40 -6
- package/src/unstable/rpc/Utils.ts +31 -0
- package/src/unstable/schema/Model.ts +148 -52
- package/src/unstable/schema/VariantSchema.ts +104 -24
- package/src/unstable/socket/Socket.ts +167 -34
- package/src/unstable/socket/SocketServer.ts +58 -10
- package/src/unstable/sql/Migrator.ts +56 -4
- package/src/unstable/sql/SqlClient.ts +55 -2
- package/src/unstable/sql/SqlConnection.ts +31 -0
- package/src/unstable/sql/SqlError.ts +117 -0
- package/src/unstable/sql/SqlModel.ts +26 -5
- package/src/unstable/sql/SqlResolver.ts +56 -13
- package/src/unstable/sql/SqlSchema.ts +29 -8
- package/src/unstable/sql/SqlStream.ts +23 -0
- package/src/unstable/sql/Statement.ts +141 -0
- package/src/unstable/sql/index.ts +1 -1
- package/src/unstable/workers/Transferable.ts +65 -13
- package/src/unstable/workers/Worker.ts +60 -8
- package/src/unstable/workers/WorkerError.ts +50 -9
- package/src/unstable/workers/WorkerRunner.ts +32 -3
- package/src/unstable/workers/index.ts +1 -1
- package/src/unstable/workflow/Activity.ts +61 -10
- package/src/unstable/workflow/DurableClock.ts +26 -3
- package/src/unstable/workflow/DurableDeferred.ts +146 -31
- package/src/unstable/workflow/DurableQueue.ts +30 -7
- package/src/unstable/workflow/Workflow.ts +121 -31
- package/src/unstable/workflow/WorkflowEngine.ts +40 -5
- package/src/unstable/workflow/WorkflowProxy.ts +32 -2
- package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
package/dist/Graph.d.ts
CHANGED
|
@@ -1,4 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* The `Graph` module provides immutable and scoped-mutable graph data
|
|
3
|
+
* structures for modeling relationships between indexed nodes and edges. A
|
|
4
|
+
* graph can be directed or undirected, stores user-defined data on both nodes
|
|
5
|
+
* and edges, and exposes traversal, analysis, path finding, transformation, and
|
|
6
|
+
* diagram export utilities.
|
|
7
|
+
*
|
|
8
|
+
* **Mental model**
|
|
9
|
+
*
|
|
10
|
+
* - Nodes and edges are addressed by stable numeric indices: {@link NodeIndex}
|
|
11
|
+
* and {@link EdgeIndex}
|
|
12
|
+
* - Node data has type `N`; edge data has type `E`
|
|
13
|
+
* - {@link Graph} values are immutable snapshots; use {@link MutableGraph}
|
|
14
|
+
* through {@link mutate}, {@link beginMutation}, or constructor callbacks to
|
|
15
|
+
* add, remove, or update nodes and edges
|
|
16
|
+
* - Directed graphs follow edge direction for neighbors and traversals, while
|
|
17
|
+
* undirected graphs treat each edge as connecting both endpoints
|
|
18
|
+
* - Missing lookups return `Option`, while structurally invalid operations such
|
|
19
|
+
* as adding an edge to a missing node throw {@link GraphError}
|
|
20
|
+
*
|
|
21
|
+
* **Common tasks**
|
|
22
|
+
*
|
|
23
|
+
* - Create graphs: {@link directed}, {@link undirected}
|
|
24
|
+
* - Mutate safely: {@link mutate}, {@link addNode}, {@link addEdge},
|
|
25
|
+
* {@link removeNode}, {@link removeEdge}
|
|
26
|
+
* - Query contents: {@link getNode}, {@link getEdge}, {@link hasNode},
|
|
27
|
+
* {@link hasEdge}, {@link nodeCount}, {@link edgeCount}, {@link neighbors}
|
|
28
|
+
* - Transform data: {@link updateNode}, {@link updateEdge}, {@link mapNodes},
|
|
29
|
+
* {@link mapEdges}, {@link filterNodes}, {@link filterEdges},
|
|
30
|
+
* {@link filterMapNodes}, {@link filterMapEdges}
|
|
31
|
+
* - Traverse lazily: {@link dfs}, {@link bfs}, {@link topo},
|
|
32
|
+
* {@link dfsPostOrder}, {@link nodes}, {@link edges}, {@link Walker}
|
|
33
|
+
* - Analyze structure: {@link isAcyclic}, {@link isBipartite},
|
|
34
|
+
* {@link connectedComponents}, {@link stronglyConnectedComponents},
|
|
35
|
+
* {@link externals}
|
|
36
|
+
* - Find paths: {@link dijkstra}, {@link astar}, {@link bellmanFord},
|
|
37
|
+
* {@link floydWarshall}
|
|
38
|
+
* - Export diagrams: {@link toGraphViz}, {@link toMermaid}
|
|
39
|
+
*
|
|
40
|
+
* **Gotchas**
|
|
41
|
+
*
|
|
42
|
+
* - Only mutable graphs can be changed. Create one with {@link mutate} or by
|
|
43
|
+
* passing a callback to {@link directed} / {@link undirected}.
|
|
44
|
+
* - Traversal APIs return lazy {@link Walker} values. Use {@link indices},
|
|
45
|
+
* {@link values}, or {@link entries} to choose what each iteration yields.
|
|
46
|
+
* - `NodeIndex` and `EdgeIndex` values are identifiers, not array offsets. They
|
|
47
|
+
* are not reused after removals.
|
|
48
|
+
* - Shortest-path algorithms require a cost function. {@link dijkstra} and
|
|
49
|
+
* {@link astar} reject negative weights; use {@link bellmanFord} or
|
|
50
|
+
* {@link floydWarshall} when negative weights are part of the model.
|
|
51
|
+
*
|
|
2
52
|
* @since 4.0.0
|
|
3
53
|
*/
|
|
4
54
|
import * as Data from "./Data.ts";
|
|
@@ -10,22 +60,22 @@ declare const TypeId = "~effect/collections/Graph";
|
|
|
10
60
|
/**
|
|
11
61
|
* Node index for node identification using plain numbers.
|
|
12
62
|
*
|
|
13
|
-
* @since 4.0.0
|
|
14
63
|
* @category models
|
|
64
|
+
* @since 4.0.0
|
|
15
65
|
*/
|
|
16
66
|
export type NodeIndex = number;
|
|
17
67
|
/**
|
|
18
68
|
* Edge index for edge identification using plain numbers.
|
|
19
69
|
*
|
|
20
|
-
* @since 4.0.0
|
|
21
70
|
* @category models
|
|
71
|
+
* @since 4.0.0
|
|
22
72
|
*/
|
|
23
73
|
export type EdgeIndex = number;
|
|
24
74
|
/**
|
|
25
75
|
* Edge data containing source, target, and user data.
|
|
26
76
|
*
|
|
27
|
-
* @since 4.0.0
|
|
28
77
|
* @category models
|
|
78
|
+
* @since 4.0.0
|
|
29
79
|
*/
|
|
30
80
|
export declare class Edge<E> extends Data.Class<{
|
|
31
81
|
readonly source: NodeIndex;
|
|
@@ -36,15 +86,20 @@ export declare class Edge<E> extends Data.Class<{
|
|
|
36
86
|
/**
|
|
37
87
|
* Graph type for distinguishing directed and undirected graphs.
|
|
38
88
|
*
|
|
39
|
-
* @since 4.0.0
|
|
40
89
|
* @category models
|
|
90
|
+
* @since 4.0.0
|
|
41
91
|
*/
|
|
42
92
|
export type Kind = "directed" | "undirected";
|
|
43
93
|
/**
|
|
44
|
-
*
|
|
94
|
+
* Common structural interface shared by immutable and mutable graphs.
|
|
95
|
+
*
|
|
96
|
+
* **Details**
|
|
97
|
+
*
|
|
98
|
+
* Contains the node and edge maps, adjacency indexes, allocation counters, and
|
|
99
|
+
* shared protocols used by both `Graph` and `MutableGraph`.
|
|
45
100
|
*
|
|
46
|
-
* @since 4.0.0
|
|
47
101
|
* @category models
|
|
102
|
+
* @since 4.0.0
|
|
48
103
|
*/
|
|
49
104
|
export interface Proto<out N, out E> extends Iterable<readonly [NodeIndex, N]>, Equal.Equal, Pipeable, Inspectable {
|
|
50
105
|
readonly [TypeId]: typeof TypeId;
|
|
@@ -59,8 +114,8 @@ export interface Proto<out N, out E> extends Iterable<readonly [NodeIndex, N]>,
|
|
|
59
114
|
/**
|
|
60
115
|
* Immutable graph interface.
|
|
61
116
|
*
|
|
62
|
-
* @since 4.0.0
|
|
63
117
|
* @category models
|
|
118
|
+
* @since 4.0.0
|
|
64
119
|
*/
|
|
65
120
|
export interface Graph<out N, out E, T extends Kind = "directed"> extends Proto<N, E> {
|
|
66
121
|
readonly type: T;
|
|
@@ -69,8 +124,8 @@ export interface Graph<out N, out E, T extends Kind = "directed"> extends Proto<
|
|
|
69
124
|
/**
|
|
70
125
|
* Mutable graph interface.
|
|
71
126
|
*
|
|
72
|
-
* @since 4.0.0
|
|
73
127
|
* @category models
|
|
128
|
+
* @since 4.0.0
|
|
74
129
|
*/
|
|
75
130
|
export interface MutableGraph<out N, out E, T extends Kind = "directed"> extends Proto<N, E> {
|
|
76
131
|
readonly type: T;
|
|
@@ -79,51 +134,59 @@ export interface MutableGraph<out N, out E, T extends Kind = "directed"> extends
|
|
|
79
134
|
/**
|
|
80
135
|
* Directed graph type alias.
|
|
81
136
|
*
|
|
82
|
-
* @since 4.0.0
|
|
83
137
|
* @category models
|
|
138
|
+
* @since 4.0.0
|
|
84
139
|
*/
|
|
85
140
|
export type DirectedGraph<N, E> = Graph<N, E, "directed">;
|
|
86
141
|
/**
|
|
87
142
|
* Undirected graph type alias.
|
|
88
143
|
*
|
|
89
|
-
* @since 4.0.0
|
|
90
144
|
* @category models
|
|
145
|
+
* @since 4.0.0
|
|
91
146
|
*/
|
|
92
147
|
export type UndirectedGraph<N, E> = Graph<N, E, "undirected">;
|
|
93
148
|
/**
|
|
94
149
|
* Mutable directed graph type alias.
|
|
95
150
|
*
|
|
96
|
-
* @since 4.0.0
|
|
97
151
|
* @category models
|
|
152
|
+
* @since 4.0.0
|
|
98
153
|
*/
|
|
99
154
|
export type MutableDirectedGraph<N, E> = MutableGraph<N, E, "directed">;
|
|
100
155
|
/**
|
|
101
156
|
* Mutable undirected graph type alias.
|
|
102
157
|
*
|
|
103
|
-
* @since 4.0.0
|
|
104
158
|
* @category models
|
|
159
|
+
* @since 4.0.0
|
|
105
160
|
*/
|
|
106
161
|
export type MutableUndirectedGraph<N, E> = MutableGraph<N, E, "undirected">;
|
|
107
162
|
declare const GraphError_base: new <A extends Record<string, any> = {}>(args: import("./Types.ts").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("./Cause.ts").YieldableError & {
|
|
108
163
|
readonly _tag: "GraphError";
|
|
109
164
|
} & Readonly<A>;
|
|
110
165
|
/**
|
|
111
|
-
*
|
|
166
|
+
* Error thrown by graph operations when the requested graph structure is
|
|
167
|
+
* invalid, such as referencing a missing node or using unsupported edge
|
|
168
|
+
* weights.
|
|
169
|
+
*
|
|
112
170
|
* @category errors
|
|
171
|
+
* @since 4.0.0
|
|
113
172
|
*/
|
|
114
173
|
export declare class GraphError extends GraphError_base<{
|
|
115
174
|
readonly message: string;
|
|
116
175
|
}> {
|
|
117
176
|
}
|
|
118
177
|
/**
|
|
119
|
-
*
|
|
178
|
+
* Returns `true` if a value has the graph runtime type identifier, narrowing
|
|
179
|
+
* it to a `Graph`.
|
|
180
|
+
*
|
|
120
181
|
* @category Guards
|
|
182
|
+
* @since 4.0.0
|
|
121
183
|
*/
|
|
122
184
|
export declare const isGraph: (u: unknown) => u is Graph<unknown, unknown>;
|
|
123
185
|
/**
|
|
124
186
|
* Creates a directed graph, optionally with initial mutations.
|
|
125
187
|
*
|
|
126
|
-
*
|
|
188
|
+
* **Example** (Creating a directed graph)
|
|
189
|
+
*
|
|
127
190
|
* ```ts
|
|
128
191
|
* import { Graph } from "effect"
|
|
129
192
|
*
|
|
@@ -137,14 +200,15 @@ export declare const isGraph: (u: unknown) => u is Graph<unknown, unknown>;
|
|
|
137
200
|
* })
|
|
138
201
|
* ```
|
|
139
202
|
*
|
|
140
|
-
* @since 4.0.0
|
|
141
203
|
* @category constructors
|
|
204
|
+
* @since 4.0.0
|
|
142
205
|
*/
|
|
143
206
|
export declare const directed: <N, E>(mutate?: (mutable: MutableDirectedGraph<N, E>) => void) => DirectedGraph<N, E>;
|
|
144
207
|
/**
|
|
145
208
|
* Creates an undirected graph, optionally with initial mutations.
|
|
146
209
|
*
|
|
147
|
-
*
|
|
210
|
+
* **Example** (Creating an undirected graph)
|
|
211
|
+
*
|
|
148
212
|
* ```ts
|
|
149
213
|
* import { Graph } from "effect"
|
|
150
214
|
*
|
|
@@ -158,14 +222,15 @@ export declare const directed: <N, E>(mutate?: (mutable: MutableDirectedGraph<N,
|
|
|
158
222
|
* })
|
|
159
223
|
* ```
|
|
160
224
|
*
|
|
161
|
-
* @since 4.0.0
|
|
162
225
|
* @category constructors
|
|
226
|
+
* @since 4.0.0
|
|
163
227
|
*/
|
|
164
228
|
export declare const undirected: <N, E>(mutate?: (mutable: MutableUndirectedGraph<N, E>) => void) => UndirectedGraph<N, E>;
|
|
165
229
|
/**
|
|
166
230
|
* Creates a mutable scope for safe graph mutations by copying the data structure.
|
|
167
231
|
*
|
|
168
|
-
*
|
|
232
|
+
* **Example** (Beginning a mutation scope)
|
|
233
|
+
*
|
|
169
234
|
* ```ts
|
|
170
235
|
* import { Graph } from "effect"
|
|
171
236
|
*
|
|
@@ -174,14 +239,15 @@ export declare const undirected: <N, E>(mutate?: (mutable: MutableUndirectedGrap
|
|
|
174
239
|
* // Now mutable can be safely modified without affecting original graph
|
|
175
240
|
* ```
|
|
176
241
|
*
|
|
177
|
-
* @since 4.0.0
|
|
178
242
|
* @category mutations
|
|
243
|
+
* @since 4.0.0
|
|
179
244
|
*/
|
|
180
245
|
export declare const beginMutation: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T>) => MutableGraph<N, E, T>;
|
|
181
246
|
/**
|
|
182
247
|
* Converts a mutable graph back to an immutable graph, ending the mutation scope.
|
|
183
248
|
*
|
|
184
|
-
*
|
|
249
|
+
* **Example** (Ending a mutation scope)
|
|
250
|
+
*
|
|
185
251
|
* ```ts
|
|
186
252
|
* import { Graph } from "effect"
|
|
187
253
|
*
|
|
@@ -191,69 +257,85 @@ export declare const beginMutation: <N, E, T extends Kind = "directed">(graph: G
|
|
|
191
257
|
* const newGraph = Graph.endMutation(mutable)
|
|
192
258
|
* ```
|
|
193
259
|
*
|
|
194
|
-
* @since 4.0.0
|
|
195
260
|
* @category mutations
|
|
261
|
+
* @since 4.0.0
|
|
196
262
|
*/
|
|
197
263
|
export declare const endMutation: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>) => Graph<N, E, T>;
|
|
198
264
|
/**
|
|
199
265
|
* Performs scoped mutations on a graph, automatically managing the mutation lifecycle.
|
|
200
266
|
*
|
|
201
|
-
*
|
|
267
|
+
* **Example** (Applying scoped mutations)
|
|
268
|
+
*
|
|
202
269
|
* ```ts
|
|
203
270
|
* import { Graph } from "effect"
|
|
204
271
|
*
|
|
205
272
|
* const graph = Graph.directed<string, number>()
|
|
206
273
|
* const newGraph = Graph.mutate(graph, (mutable) => {
|
|
207
|
-
*
|
|
208
|
-
*
|
|
274
|
+
* const nodeA = Graph.addNode(mutable, "A")
|
|
275
|
+
* const nodeB = Graph.addNode(mutable, "B")
|
|
276
|
+
* Graph.addEdge(mutable, nodeA, nodeB, 1)
|
|
209
277
|
* })
|
|
278
|
+
*
|
|
279
|
+
* console.log(Graph.nodeCount(newGraph)) // 2
|
|
280
|
+
* console.log(Graph.edgeCount(newGraph)) // 1
|
|
210
281
|
* ```
|
|
211
282
|
*
|
|
212
|
-
* @since 4.0.0
|
|
213
283
|
* @category mutations
|
|
284
|
+
* @since 4.0.0
|
|
214
285
|
*/
|
|
215
286
|
export declare const mutate: {
|
|
216
287
|
/**
|
|
217
288
|
* Performs scoped mutations on a graph, automatically managing the mutation lifecycle.
|
|
218
289
|
*
|
|
219
|
-
*
|
|
290
|
+
* **Example** (Applying scoped mutations)
|
|
291
|
+
*
|
|
220
292
|
* ```ts
|
|
221
293
|
* import { Graph } from "effect"
|
|
222
294
|
*
|
|
223
295
|
* const graph = Graph.directed<string, number>()
|
|
224
296
|
* const newGraph = Graph.mutate(graph, (mutable) => {
|
|
225
|
-
*
|
|
226
|
-
*
|
|
297
|
+
* const nodeA = Graph.addNode(mutable, "A")
|
|
298
|
+
* const nodeB = Graph.addNode(mutable, "B")
|
|
299
|
+
* Graph.addEdge(mutable, nodeA, nodeB, 1)
|
|
227
300
|
* })
|
|
301
|
+
*
|
|
302
|
+
* console.log(Graph.nodeCount(newGraph)) // 2
|
|
303
|
+
* console.log(Graph.edgeCount(newGraph)) // 1
|
|
228
304
|
* ```
|
|
229
305
|
*
|
|
230
|
-
* @since 4.0.0
|
|
231
306
|
* @category mutations
|
|
307
|
+
* @since 4.0.0
|
|
232
308
|
*/
|
|
233
309
|
<N, E, T extends Kind = "directed">(f: (mutable: MutableGraph<N, E, T>) => void): (graph: Graph<N, E, T>) => Graph<N, E, T>;
|
|
234
310
|
/**
|
|
235
311
|
* Performs scoped mutations on a graph, automatically managing the mutation lifecycle.
|
|
236
312
|
*
|
|
237
|
-
*
|
|
313
|
+
* **Example** (Applying scoped mutations)
|
|
314
|
+
*
|
|
238
315
|
* ```ts
|
|
239
316
|
* import { Graph } from "effect"
|
|
240
317
|
*
|
|
241
318
|
* const graph = Graph.directed<string, number>()
|
|
242
319
|
* const newGraph = Graph.mutate(graph, (mutable) => {
|
|
243
|
-
*
|
|
244
|
-
*
|
|
320
|
+
* const nodeA = Graph.addNode(mutable, "A")
|
|
321
|
+
* const nodeB = Graph.addNode(mutable, "B")
|
|
322
|
+
* Graph.addEdge(mutable, nodeA, nodeB, 1)
|
|
245
323
|
* })
|
|
324
|
+
*
|
|
325
|
+
* console.log(Graph.nodeCount(newGraph)) // 2
|
|
326
|
+
* console.log(Graph.edgeCount(newGraph)) // 1
|
|
246
327
|
* ```
|
|
247
328
|
*
|
|
248
|
-
* @since 4.0.0
|
|
249
329
|
* @category mutations
|
|
330
|
+
* @since 4.0.0
|
|
250
331
|
*/
|
|
251
332
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T>, f: (mutable: MutableGraph<N, E, T>) => void): Graph<N, E, T>;
|
|
252
333
|
};
|
|
253
334
|
/**
|
|
254
335
|
* Adds a new node to a mutable graph and returns its index.
|
|
255
336
|
*
|
|
256
|
-
*
|
|
337
|
+
* **Example** (Adding nodes)
|
|
338
|
+
*
|
|
257
339
|
* ```ts
|
|
258
340
|
* import { Graph } from "effect"
|
|
259
341
|
*
|
|
@@ -265,14 +347,15 @@ export declare const mutate: {
|
|
|
265
347
|
* })
|
|
266
348
|
* ```
|
|
267
349
|
*
|
|
268
|
-
* @since 4.0.0
|
|
269
350
|
* @category mutations
|
|
351
|
+
* @since 4.0.0
|
|
270
352
|
*/
|
|
271
353
|
export declare const addNode: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, data: N) => NodeIndex;
|
|
272
354
|
/**
|
|
273
355
|
* Gets the data associated with a node index, if it exists.
|
|
274
356
|
*
|
|
275
|
-
*
|
|
357
|
+
* **Example** (Getting node data)
|
|
358
|
+
*
|
|
276
359
|
* ```ts
|
|
277
360
|
* import { Graph } from "effect"
|
|
278
361
|
* import * as Option from "effect/Option"
|
|
@@ -289,14 +372,15 @@ export declare const addNode: <N, E, T extends Kind = "directed">(mutable: Mutab
|
|
|
289
372
|
* }
|
|
290
373
|
* ```
|
|
291
374
|
*
|
|
292
|
-
* @since 4.0.0
|
|
293
375
|
* @category getters
|
|
376
|
+
* @since 4.0.0
|
|
294
377
|
*/
|
|
295
378
|
export declare const getNode: {
|
|
296
379
|
/**
|
|
297
380
|
* Gets the data associated with a node index, if it exists.
|
|
298
381
|
*
|
|
299
|
-
*
|
|
382
|
+
* **Example** (Getting node data)
|
|
383
|
+
*
|
|
300
384
|
* ```ts
|
|
301
385
|
* import { Graph } from "effect"
|
|
302
386
|
* import * as Option from "effect/Option"
|
|
@@ -313,14 +397,15 @@ export declare const getNode: {
|
|
|
313
397
|
* }
|
|
314
398
|
* ```
|
|
315
399
|
*
|
|
316
|
-
* @since 4.0.0
|
|
317
400
|
* @category getters
|
|
401
|
+
* @since 4.0.0
|
|
318
402
|
*/
|
|
319
403
|
<N, E, T extends Kind = "directed">(nodeIndex: NodeIndex): (graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<N>;
|
|
320
404
|
/**
|
|
321
405
|
* Gets the data associated with a node index, if it exists.
|
|
322
406
|
*
|
|
323
|
-
*
|
|
407
|
+
* **Example** (Getting node data)
|
|
408
|
+
*
|
|
324
409
|
* ```ts
|
|
325
410
|
* import { Graph } from "effect"
|
|
326
411
|
* import * as Option from "effect/Option"
|
|
@@ -337,15 +422,16 @@ export declare const getNode: {
|
|
|
337
422
|
* }
|
|
338
423
|
* ```
|
|
339
424
|
*
|
|
340
|
-
* @since 4.0.0
|
|
341
425
|
* @category getters
|
|
426
|
+
* @since 4.0.0
|
|
342
427
|
*/
|
|
343
428
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex): Option.Option<N>;
|
|
344
429
|
};
|
|
345
430
|
/**
|
|
346
431
|
* Checks if a node with the given index exists in the graph.
|
|
347
432
|
*
|
|
348
|
-
*
|
|
433
|
+
* **Example** (Checking node existence)
|
|
434
|
+
*
|
|
349
435
|
* ```ts
|
|
350
436
|
* import { Graph } from "effect"
|
|
351
437
|
*
|
|
@@ -362,14 +448,15 @@ export declare const getNode: {
|
|
|
362
448
|
* console.log(notExists) // false
|
|
363
449
|
* ```
|
|
364
450
|
*
|
|
365
|
-
* @since 4.0.0
|
|
366
451
|
* @category getters
|
|
452
|
+
* @since 4.0.0
|
|
367
453
|
*/
|
|
368
454
|
export declare const hasNode: {
|
|
369
455
|
/**
|
|
370
456
|
* Checks if a node with the given index exists in the graph.
|
|
371
457
|
*
|
|
372
|
-
*
|
|
458
|
+
* **Example** (Checking node existence)
|
|
459
|
+
*
|
|
373
460
|
* ```ts
|
|
374
461
|
* import { Graph } from "effect"
|
|
375
462
|
*
|
|
@@ -386,14 +473,15 @@ export declare const hasNode: {
|
|
|
386
473
|
* console.log(notExists) // false
|
|
387
474
|
* ```
|
|
388
475
|
*
|
|
389
|
-
* @since 4.0.0
|
|
390
476
|
* @category getters
|
|
477
|
+
* @since 4.0.0
|
|
391
478
|
*/
|
|
392
479
|
(nodeIndex: NodeIndex): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => boolean;
|
|
393
480
|
/**
|
|
394
481
|
* Checks if a node with the given index exists in the graph.
|
|
395
482
|
*
|
|
396
|
-
*
|
|
483
|
+
* **Example** (Checking node existence)
|
|
484
|
+
*
|
|
397
485
|
* ```ts
|
|
398
486
|
* import { Graph } from "effect"
|
|
399
487
|
*
|
|
@@ -410,15 +498,16 @@ export declare const hasNode: {
|
|
|
410
498
|
* console.log(notExists) // false
|
|
411
499
|
* ```
|
|
412
500
|
*
|
|
413
|
-
* @since 4.0.0
|
|
414
501
|
* @category getters
|
|
502
|
+
* @since 4.0.0
|
|
415
503
|
*/
|
|
416
504
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex): boolean;
|
|
417
505
|
};
|
|
418
506
|
/**
|
|
419
507
|
* Returns the number of nodes in the graph.
|
|
420
508
|
*
|
|
421
|
-
*
|
|
509
|
+
* **Example** (Counting nodes)
|
|
510
|
+
*
|
|
422
511
|
* ```ts
|
|
423
512
|
* import { Graph } from "effect"
|
|
424
513
|
*
|
|
@@ -434,14 +523,15 @@ export declare const hasNode: {
|
|
|
434
523
|
* console.log(Graph.nodeCount(graphWithNodes)) // 3
|
|
435
524
|
* ```
|
|
436
525
|
*
|
|
437
|
-
* @since 4.0.0
|
|
438
526
|
* @category getters
|
|
527
|
+
* @since 4.0.0
|
|
439
528
|
*/
|
|
440
529
|
export declare const nodeCount: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => number;
|
|
441
530
|
/**
|
|
442
531
|
* Finds the first node that matches the given predicate.
|
|
443
532
|
*
|
|
444
|
-
*
|
|
533
|
+
* **Example** (Finding the first matching node)
|
|
534
|
+
*
|
|
445
535
|
* ```ts
|
|
446
536
|
* import { Graph } from "effect"
|
|
447
537
|
*
|
|
@@ -458,14 +548,15 @@ export declare const nodeCount: <N, E, T extends Kind = "directed">(graph: Graph
|
|
|
458
548
|
* console.log(notFound) // Option.none()
|
|
459
549
|
* ```
|
|
460
550
|
*
|
|
461
|
-
* @since 4.0.0
|
|
462
551
|
* @category getters
|
|
552
|
+
* @since 4.0.0
|
|
463
553
|
*/
|
|
464
554
|
export declare const findNode: {
|
|
465
555
|
/**
|
|
466
556
|
* Finds the first node that matches the given predicate.
|
|
467
557
|
*
|
|
468
|
-
*
|
|
558
|
+
* **Example** (Finding the first matching node)
|
|
559
|
+
*
|
|
469
560
|
* ```ts
|
|
470
561
|
* import { Graph } from "effect"
|
|
471
562
|
*
|
|
@@ -482,14 +573,15 @@ export declare const findNode: {
|
|
|
482
573
|
* console.log(notFound) // Option.none()
|
|
483
574
|
* ```
|
|
484
575
|
*
|
|
485
|
-
* @since 4.0.0
|
|
486
576
|
* @category getters
|
|
577
|
+
* @since 4.0.0
|
|
487
578
|
*/
|
|
488
579
|
<N>(predicate: (data: N) => boolean): <E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<NodeIndex>;
|
|
489
580
|
/**
|
|
490
581
|
* Finds the first node that matches the given predicate.
|
|
491
582
|
*
|
|
492
|
-
*
|
|
583
|
+
* **Example** (Finding the first matching node)
|
|
584
|
+
*
|
|
493
585
|
* ```ts
|
|
494
586
|
* import { Graph } from "effect"
|
|
495
587
|
*
|
|
@@ -506,15 +598,16 @@ export declare const findNode: {
|
|
|
506
598
|
* console.log(notFound) // Option.none()
|
|
507
599
|
* ```
|
|
508
600
|
*
|
|
509
|
-
* @since 4.0.0
|
|
510
601
|
* @category getters
|
|
602
|
+
* @since 4.0.0
|
|
511
603
|
*/
|
|
512
604
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: N) => boolean): Option.Option<NodeIndex>;
|
|
513
605
|
};
|
|
514
606
|
/**
|
|
515
607
|
* Finds all nodes that match the given predicate.
|
|
516
608
|
*
|
|
517
|
-
*
|
|
609
|
+
* **Example** (Finding matching nodes)
|
|
610
|
+
*
|
|
518
611
|
* ```ts
|
|
519
612
|
* import { Graph } from "effect"
|
|
520
613
|
*
|
|
@@ -531,14 +624,15 @@ export declare const findNode: {
|
|
|
531
624
|
* console.log(empty) // []
|
|
532
625
|
* ```
|
|
533
626
|
*
|
|
534
|
-
* @since 4.0.0
|
|
535
627
|
* @category getters
|
|
628
|
+
* @since 4.0.0
|
|
536
629
|
*/
|
|
537
630
|
export declare const findNodes: {
|
|
538
631
|
/**
|
|
539
632
|
* Finds all nodes that match the given predicate.
|
|
540
633
|
*
|
|
541
|
-
*
|
|
634
|
+
* **Example** (Finding matching nodes)
|
|
635
|
+
*
|
|
542
636
|
* ```ts
|
|
543
637
|
* import { Graph } from "effect"
|
|
544
638
|
*
|
|
@@ -555,14 +649,15 @@ export declare const findNodes: {
|
|
|
555
649
|
* console.log(empty) // []
|
|
556
650
|
* ```
|
|
557
651
|
*
|
|
558
|
-
* @since 4.0.0
|
|
559
652
|
* @category getters
|
|
653
|
+
* @since 4.0.0
|
|
560
654
|
*/
|
|
561
655
|
<N>(predicate: (data: N) => boolean): <E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<NodeIndex>;
|
|
562
656
|
/**
|
|
563
657
|
* Finds all nodes that match the given predicate.
|
|
564
658
|
*
|
|
565
|
-
*
|
|
659
|
+
* **Example** (Finding matching nodes)
|
|
660
|
+
*
|
|
566
661
|
* ```ts
|
|
567
662
|
* import { Graph } from "effect"
|
|
568
663
|
*
|
|
@@ -579,15 +674,16 @@ export declare const findNodes: {
|
|
|
579
674
|
* console.log(empty) // []
|
|
580
675
|
* ```
|
|
581
676
|
*
|
|
582
|
-
* @since 4.0.0
|
|
583
677
|
* @category getters
|
|
678
|
+
* @since 4.0.0
|
|
584
679
|
*/
|
|
585
680
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: N) => boolean): Array<NodeIndex>;
|
|
586
681
|
};
|
|
587
682
|
/**
|
|
588
683
|
* Finds the first edge that matches the given predicate.
|
|
589
684
|
*
|
|
590
|
-
*
|
|
685
|
+
* **Example** (Finding the first matching edge)
|
|
686
|
+
*
|
|
591
687
|
* ```ts
|
|
592
688
|
* import { Graph } from "effect"
|
|
593
689
|
*
|
|
@@ -606,14 +702,15 @@ export declare const findNodes: {
|
|
|
606
702
|
* console.log(notFound) // Option.none()
|
|
607
703
|
* ```
|
|
608
704
|
*
|
|
609
|
-
* @since 4.0.0
|
|
610
705
|
* @category getters
|
|
706
|
+
* @since 4.0.0
|
|
611
707
|
*/
|
|
612
708
|
export declare const findEdge: {
|
|
613
709
|
/**
|
|
614
710
|
* Finds the first edge that matches the given predicate.
|
|
615
711
|
*
|
|
616
|
-
*
|
|
712
|
+
* **Example** (Finding the first matching edge)
|
|
713
|
+
*
|
|
617
714
|
* ```ts
|
|
618
715
|
* import { Graph } from "effect"
|
|
619
716
|
*
|
|
@@ -632,14 +729,15 @@ export declare const findEdge: {
|
|
|
632
729
|
* console.log(notFound) // Option.none()
|
|
633
730
|
* ```
|
|
634
731
|
*
|
|
635
|
-
* @since 4.0.0
|
|
636
732
|
* @category getters
|
|
733
|
+
* @since 4.0.0
|
|
637
734
|
*/
|
|
638
735
|
<E>(predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<EdgeIndex>;
|
|
639
736
|
/**
|
|
640
737
|
* Finds the first edge that matches the given predicate.
|
|
641
738
|
*
|
|
642
|
-
*
|
|
739
|
+
* **Example** (Finding the first matching edge)
|
|
740
|
+
*
|
|
643
741
|
* ```ts
|
|
644
742
|
* import { Graph } from "effect"
|
|
645
743
|
*
|
|
@@ -658,15 +756,16 @@ export declare const findEdge: {
|
|
|
658
756
|
* console.log(notFound) // Option.none()
|
|
659
757
|
* ```
|
|
660
758
|
*
|
|
661
|
-
* @since 4.0.0
|
|
662
759
|
* @category getters
|
|
760
|
+
* @since 4.0.0
|
|
663
761
|
*/
|
|
664
762
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): Option.Option<EdgeIndex>;
|
|
665
763
|
};
|
|
666
764
|
/**
|
|
667
765
|
* Finds all edges that match the given predicate.
|
|
668
766
|
*
|
|
669
|
-
*
|
|
767
|
+
* **Example** (Finding matching edges)
|
|
768
|
+
*
|
|
670
769
|
* ```ts
|
|
671
770
|
* import { Graph } from "effect"
|
|
672
771
|
*
|
|
@@ -686,14 +785,15 @@ export declare const findEdge: {
|
|
|
686
785
|
* console.log(empty) // []
|
|
687
786
|
* ```
|
|
688
787
|
*
|
|
689
|
-
* @since 4.0.0
|
|
690
788
|
* @category getters
|
|
789
|
+
* @since 4.0.0
|
|
691
790
|
*/
|
|
692
791
|
export declare const findEdges: {
|
|
693
792
|
/**
|
|
694
793
|
* Finds all edges that match the given predicate.
|
|
695
794
|
*
|
|
696
|
-
*
|
|
795
|
+
* **Example** (Finding matching edges)
|
|
796
|
+
*
|
|
697
797
|
* ```ts
|
|
698
798
|
* import { Graph } from "effect"
|
|
699
799
|
*
|
|
@@ -713,14 +813,15 @@ export declare const findEdges: {
|
|
|
713
813
|
* console.log(empty) // []
|
|
714
814
|
* ```
|
|
715
815
|
*
|
|
716
|
-
* @since 4.0.0
|
|
717
816
|
* @category getters
|
|
817
|
+
* @since 4.0.0
|
|
718
818
|
*/
|
|
719
819
|
<E>(predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<EdgeIndex>;
|
|
720
820
|
/**
|
|
721
821
|
* Finds all edges that match the given predicate.
|
|
722
822
|
*
|
|
723
|
-
*
|
|
823
|
+
* **Example** (Finding matching edges)
|
|
824
|
+
*
|
|
724
825
|
* ```ts
|
|
725
826
|
* import { Graph } from "effect"
|
|
726
827
|
*
|
|
@@ -740,15 +841,16 @@ export declare const findEdges: {
|
|
|
740
841
|
* console.log(empty) // []
|
|
741
842
|
* ```
|
|
742
843
|
*
|
|
743
|
-
* @since 4.0.0
|
|
744
844
|
* @category getters
|
|
845
|
+
* @since 4.0.0
|
|
745
846
|
*/
|
|
746
847
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, predicate: (data: E, source: NodeIndex, target: NodeIndex) => boolean): Array<EdgeIndex>;
|
|
747
848
|
};
|
|
748
849
|
/**
|
|
749
850
|
* Updates a single node's data by applying a transformation function.
|
|
750
851
|
*
|
|
751
|
-
*
|
|
852
|
+
* **Example** (Updating node data)
|
|
853
|
+
*
|
|
752
854
|
* ```ts
|
|
753
855
|
* import { Graph } from "effect"
|
|
754
856
|
*
|
|
@@ -762,14 +864,15 @@ export declare const findEdges: {
|
|
|
762
864
|
* console.log(nodeData) // Option.some("NODE A")
|
|
763
865
|
* ```
|
|
764
866
|
*
|
|
765
|
-
* @since 4.0.0
|
|
766
867
|
* @category transformations
|
|
868
|
+
* @since 4.0.0
|
|
767
869
|
*/
|
|
768
870
|
export declare const updateNode: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, index: NodeIndex, f: (data: N) => N) => void;
|
|
769
871
|
/**
|
|
770
872
|
* Updates a single edge's data by applying a transformation function.
|
|
771
873
|
*
|
|
772
|
-
*
|
|
874
|
+
* **Example** (Updating edge data)
|
|
875
|
+
*
|
|
773
876
|
* ```ts
|
|
774
877
|
* import { Graph } from "effect"
|
|
775
878
|
*
|
|
@@ -781,17 +884,23 @@ export declare const updateNode: <N, E, T extends Kind = "directed">(mutable: Mu
|
|
|
781
884
|
* })
|
|
782
885
|
*
|
|
783
886
|
* const edgeData = Graph.getEdge(result, 0)
|
|
784
|
-
* console.log(edgeData) // new Graph.Edge({ source: 0, target: 1, data: 20 })
|
|
887
|
+
* console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 }))
|
|
785
888
|
* ```
|
|
786
889
|
*
|
|
787
|
-
* @since 4.0.0
|
|
788
890
|
* @category mutations
|
|
891
|
+
* @since 4.0.0
|
|
789
892
|
*/
|
|
790
893
|
export declare const updateEdge: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, edgeIndex: EdgeIndex, f: (data: E) => E) => void;
|
|
791
894
|
/**
|
|
792
|
-
*
|
|
895
|
+
* Transforms every node's data in a mutable graph in place using the provided
|
|
896
|
+
* mapping function.
|
|
897
|
+
*
|
|
898
|
+
* **Details**
|
|
899
|
+
*
|
|
900
|
+
* Node indices and edges are preserved; only the stored node data is replaced.
|
|
901
|
+
*
|
|
902
|
+
* **Example** (Mapping node data)
|
|
793
903
|
*
|
|
794
|
-
* @example
|
|
795
904
|
* ```ts
|
|
796
905
|
* import { Graph } from "effect"
|
|
797
906
|
*
|
|
@@ -803,17 +912,18 @@ export declare const updateEdge: <N, E, T extends Kind = "directed">(mutable: Mu
|
|
|
803
912
|
* })
|
|
804
913
|
*
|
|
805
914
|
* const nodeData = Graph.getNode(graph, 0)
|
|
806
|
-
* console.log(nodeData) //
|
|
915
|
+
* console.log(nodeData) // Option.some("NODE A")
|
|
807
916
|
* ```
|
|
808
917
|
*
|
|
809
|
-
* @since 4.0.0
|
|
810
918
|
* @category transformations
|
|
919
|
+
* @since 4.0.0
|
|
811
920
|
*/
|
|
812
921
|
export declare const mapNodes: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: N) => N) => void;
|
|
813
922
|
/**
|
|
814
923
|
* Transforms all edge data in a mutable graph using the provided mapping function.
|
|
815
924
|
*
|
|
816
|
-
*
|
|
925
|
+
* **Example** (Mapping edge data)
|
|
926
|
+
*
|
|
817
927
|
* ```ts
|
|
818
928
|
* import { Graph } from "effect"
|
|
819
929
|
*
|
|
@@ -827,17 +937,18 @@ export declare const mapNodes: <N, E, T extends Kind = "directed">(mutable: Muta
|
|
|
827
937
|
* })
|
|
828
938
|
*
|
|
829
939
|
* const edgeData = Graph.getEdge(graph, 0)
|
|
830
|
-
* console.log(edgeData) // new Graph.Edge({ source: 0, target: 1, data: 20 })
|
|
940
|
+
* console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 }))
|
|
831
941
|
* ```
|
|
832
942
|
*
|
|
833
|
-
* @since 4.0.0
|
|
834
943
|
* @category transformations
|
|
944
|
+
* @since 4.0.0
|
|
835
945
|
*/
|
|
836
946
|
export declare const mapEdges: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: E) => E) => void;
|
|
837
947
|
/**
|
|
838
948
|
* Reverses all edge directions in a mutable graph by swapping source and target nodes.
|
|
839
949
|
*
|
|
840
|
-
*
|
|
950
|
+
* **Example** (Reversing edge directions)
|
|
951
|
+
*
|
|
841
952
|
* ```ts
|
|
842
953
|
* import { Graph } from "effect"
|
|
843
954
|
*
|
|
@@ -851,18 +962,19 @@ export declare const mapEdges: <N, E, T extends Kind = "directed">(mutable: Muta
|
|
|
851
962
|
* })
|
|
852
963
|
*
|
|
853
964
|
* const edge0 = Graph.getEdge(graph, 0)
|
|
854
|
-
* console.log(edge0) // new Graph.Edge({ source: 1, target: 0, data: 1 })
|
|
965
|
+
* console.log(edge0) // Option.some(new Graph.Edge({ source: 1, target: 0, data: 1 }))
|
|
855
966
|
* ```
|
|
856
967
|
*
|
|
857
|
-
* @since 4.0.0
|
|
858
968
|
* @category transformations
|
|
969
|
+
* @since 4.0.0
|
|
859
970
|
*/
|
|
860
971
|
export declare const reverse: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>) => void;
|
|
861
972
|
/**
|
|
862
973
|
* Filters and optionally transforms nodes in a mutable graph using a predicate function.
|
|
863
974
|
* Nodes that return Option.none are removed along with all their connected edges.
|
|
864
975
|
*
|
|
865
|
-
*
|
|
976
|
+
* **Example** (Filtering and mapping nodes)
|
|
977
|
+
*
|
|
866
978
|
* ```ts
|
|
867
979
|
* import { Graph } from "effect"
|
|
868
980
|
* import * as Option from "effect/Option"
|
|
@@ -885,15 +997,16 @@ export declare const reverse: <N, E, T extends Kind = "directed">(mutable: Mutab
|
|
|
885
997
|
* console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain)
|
|
886
998
|
* ```
|
|
887
999
|
*
|
|
888
|
-
* @since 4.0.0
|
|
889
1000
|
* @category transformations
|
|
1001
|
+
* @since 4.0.0
|
|
890
1002
|
*/
|
|
891
1003
|
export declare const filterMapNodes: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: N) => Option.Option<N>) => void;
|
|
892
1004
|
/**
|
|
893
1005
|
* Filters and optionally transforms edges in a mutable graph using a predicate function.
|
|
894
1006
|
* Edges that return Option.none are removed from the graph.
|
|
895
1007
|
*
|
|
896
|
-
*
|
|
1008
|
+
* **Example** (Filtering and mapping edges)
|
|
1009
|
+
*
|
|
897
1010
|
* ```ts
|
|
898
1011
|
* import { Graph } from "effect"
|
|
899
1012
|
* import * as Option from "effect/Option"
|
|
@@ -916,15 +1029,16 @@ export declare const filterMapNodes: <N, E, T extends Kind = "directed">(mutable
|
|
|
916
1029
|
* console.log(Graph.edgeCount(graph)) // 2 (edges with weight 5 removed)
|
|
917
1030
|
* ```
|
|
918
1031
|
*
|
|
919
|
-
* @since 4.0.0
|
|
920
1032
|
* @category transformations
|
|
1033
|
+
* @since 4.0.0
|
|
921
1034
|
*/
|
|
922
1035
|
export declare const filterMapEdges: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, f: (data: E) => Option.Option<E>) => void;
|
|
923
1036
|
/**
|
|
924
1037
|
* Filters nodes by removing those that don't match the predicate.
|
|
925
1038
|
* This function modifies the mutable graph in place.
|
|
926
1039
|
*
|
|
927
|
-
*
|
|
1040
|
+
* **Example** (Filtering nodes)
|
|
1041
|
+
*
|
|
928
1042
|
* ```ts
|
|
929
1043
|
* import { Graph } from "effect"
|
|
930
1044
|
*
|
|
@@ -941,15 +1055,16 @@ export declare const filterMapEdges: <N, E, T extends Kind = "directed">(mutable
|
|
|
941
1055
|
* console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain)
|
|
942
1056
|
* ```
|
|
943
1057
|
*
|
|
944
|
-
* @since 4.0.0
|
|
945
1058
|
* @category transformations
|
|
1059
|
+
* @since 4.0.0
|
|
946
1060
|
*/
|
|
947
1061
|
export declare const filterNodes: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, predicate: (data: N) => boolean) => void;
|
|
948
1062
|
/**
|
|
949
1063
|
* Filters edges by removing those that don't match the predicate.
|
|
950
1064
|
* This function modifies the mutable graph in place.
|
|
951
1065
|
*
|
|
952
|
-
*
|
|
1066
|
+
* **Example** (Filtering edges)
|
|
1067
|
+
*
|
|
953
1068
|
* ```ts
|
|
954
1069
|
* import { Graph } from "effect"
|
|
955
1070
|
*
|
|
@@ -969,14 +1084,15 @@ export declare const filterNodes: <N, E, T extends Kind = "directed">(mutable: M
|
|
|
969
1084
|
* console.log(Graph.edgeCount(graph)) // 2 (edge with weight 5 removed)
|
|
970
1085
|
* ```
|
|
971
1086
|
*
|
|
972
|
-
* @since 4.0.0
|
|
973
1087
|
* @category transformations
|
|
1088
|
+
* @since 4.0.0
|
|
974
1089
|
*/
|
|
975
1090
|
export declare const filterEdges: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, predicate: (data: E) => boolean) => void;
|
|
976
1091
|
/**
|
|
977
1092
|
* Adds a new edge to a mutable graph and returns its index.
|
|
978
1093
|
*
|
|
979
|
-
*
|
|
1094
|
+
* **Example** (Adding edges)
|
|
1095
|
+
*
|
|
980
1096
|
* ```ts
|
|
981
1097
|
* import { Graph } from "effect"
|
|
982
1098
|
*
|
|
@@ -988,14 +1104,15 @@ export declare const filterEdges: <N, E, T extends Kind = "directed">(mutable: M
|
|
|
988
1104
|
* })
|
|
989
1105
|
* ```
|
|
990
1106
|
*
|
|
991
|
-
* @since 4.0.0
|
|
992
1107
|
* @category mutations
|
|
1108
|
+
* @since 4.0.0
|
|
993
1109
|
*/
|
|
994
1110
|
export declare const addEdge: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, source: NodeIndex, target: NodeIndex, data: E) => EdgeIndex;
|
|
995
1111
|
/**
|
|
996
1112
|
* Removes a node and all its incident edges from a mutable graph.
|
|
997
1113
|
*
|
|
998
|
-
*
|
|
1114
|
+
* **Example** (Removing a node)
|
|
1115
|
+
*
|
|
999
1116
|
* ```ts
|
|
1000
1117
|
* import { Graph } from "effect"
|
|
1001
1118
|
*
|
|
@@ -1009,14 +1126,15 @@ export declare const addEdge: <N, E, T extends Kind = "directed">(mutable: Mutab
|
|
|
1009
1126
|
* })
|
|
1010
1127
|
* ```
|
|
1011
1128
|
*
|
|
1012
|
-
* @since 4.0.0
|
|
1013
1129
|
* @category mutations
|
|
1130
|
+
* @since 4.0.0
|
|
1014
1131
|
*/
|
|
1015
1132
|
export declare const removeNode: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, nodeIndex: NodeIndex) => void;
|
|
1016
1133
|
/**
|
|
1017
1134
|
* Removes an edge from a mutable graph.
|
|
1018
1135
|
*
|
|
1019
|
-
*
|
|
1136
|
+
* **Example** (Removing an edge)
|
|
1137
|
+
*
|
|
1020
1138
|
* ```ts
|
|
1021
1139
|
* import { Graph } from "effect"
|
|
1022
1140
|
*
|
|
@@ -1030,14 +1148,15 @@ export declare const removeNode: <N, E, T extends Kind = "directed">(mutable: Mu
|
|
|
1030
1148
|
* })
|
|
1031
1149
|
* ```
|
|
1032
1150
|
*
|
|
1033
|
-
* @since 4.0.0
|
|
1034
1151
|
* @category mutations
|
|
1152
|
+
* @since 4.0.0
|
|
1035
1153
|
*/
|
|
1036
1154
|
export declare const removeEdge: <N, E, T extends Kind = "directed">(mutable: MutableGraph<N, E, T>, edgeIndex: EdgeIndex) => void;
|
|
1037
1155
|
/**
|
|
1038
1156
|
* Gets the edge data associated with an edge index, if it exists.
|
|
1039
1157
|
*
|
|
1040
|
-
*
|
|
1158
|
+
* **Example** (Getting edge data)
|
|
1159
|
+
*
|
|
1041
1160
|
* ```ts
|
|
1042
1161
|
* import { Graph } from "effect"
|
|
1043
1162
|
*
|
|
@@ -1052,19 +1171,20 @@ export declare const removeEdge: <N, E, T extends Kind = "directed">(mutable: Mu
|
|
|
1052
1171
|
*
|
|
1053
1172
|
* if (edgeData._tag === "Some") {
|
|
1054
1173
|
* console.log(edgeData.value.data) // 42
|
|
1055
|
-
* console.log(edgeData.value.source) //
|
|
1056
|
-
* console.log(edgeData.value.target) //
|
|
1174
|
+
* console.log(edgeData.value.source) // 0
|
|
1175
|
+
* console.log(edgeData.value.target) // 1
|
|
1057
1176
|
* }
|
|
1058
1177
|
* ```
|
|
1059
1178
|
*
|
|
1060
|
-
* @since 4.0.0
|
|
1061
1179
|
* @category getters
|
|
1180
|
+
* @since 4.0.0
|
|
1062
1181
|
*/
|
|
1063
1182
|
export declare const getEdge: {
|
|
1064
1183
|
/**
|
|
1065
1184
|
* Gets the edge data associated with an edge index, if it exists.
|
|
1066
1185
|
*
|
|
1067
|
-
*
|
|
1186
|
+
* **Example** (Getting edge data)
|
|
1187
|
+
*
|
|
1068
1188
|
* ```ts
|
|
1069
1189
|
* import { Graph } from "effect"
|
|
1070
1190
|
*
|
|
@@ -1079,19 +1199,20 @@ export declare const getEdge: {
|
|
|
1079
1199
|
*
|
|
1080
1200
|
* if (edgeData._tag === "Some") {
|
|
1081
1201
|
* console.log(edgeData.value.data) // 42
|
|
1082
|
-
* console.log(edgeData.value.source) //
|
|
1083
|
-
* console.log(edgeData.value.target) //
|
|
1202
|
+
* console.log(edgeData.value.source) // 0
|
|
1203
|
+
* console.log(edgeData.value.target) // 1
|
|
1084
1204
|
* }
|
|
1085
1205
|
* ```
|
|
1086
1206
|
*
|
|
1087
|
-
* @since 4.0.0
|
|
1088
1207
|
* @category getters
|
|
1208
|
+
* @since 4.0.0
|
|
1089
1209
|
*/
|
|
1090
1210
|
<E>(edgeIndex: EdgeIndex): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<Edge<E>>;
|
|
1091
1211
|
/**
|
|
1092
1212
|
* Gets the edge data associated with an edge index, if it exists.
|
|
1093
1213
|
*
|
|
1094
|
-
*
|
|
1214
|
+
* **Example** (Getting edge data)
|
|
1215
|
+
*
|
|
1095
1216
|
* ```ts
|
|
1096
1217
|
* import { Graph } from "effect"
|
|
1097
1218
|
*
|
|
@@ -1106,20 +1227,21 @@ export declare const getEdge: {
|
|
|
1106
1227
|
*
|
|
1107
1228
|
* if (edgeData._tag === "Some") {
|
|
1108
1229
|
* console.log(edgeData.value.data) // 42
|
|
1109
|
-
* console.log(edgeData.value.source) //
|
|
1110
|
-
* console.log(edgeData.value.target) //
|
|
1230
|
+
* console.log(edgeData.value.source) // 0
|
|
1231
|
+
* console.log(edgeData.value.target) // 1
|
|
1111
1232
|
* }
|
|
1112
1233
|
* ```
|
|
1113
1234
|
*
|
|
1114
|
-
* @since 4.0.0
|
|
1115
1235
|
* @category getters
|
|
1236
|
+
* @since 4.0.0
|
|
1116
1237
|
*/
|
|
1117
1238
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, edgeIndex: EdgeIndex): Option.Option<Edge<E>>;
|
|
1118
1239
|
};
|
|
1119
1240
|
/**
|
|
1120
1241
|
* Checks if an edge exists between two nodes in the graph.
|
|
1121
1242
|
*
|
|
1122
|
-
*
|
|
1243
|
+
* **Example** (Checking edge existence)
|
|
1244
|
+
*
|
|
1123
1245
|
* ```ts
|
|
1124
1246
|
* import { Graph } from "effect"
|
|
1125
1247
|
*
|
|
@@ -1141,14 +1263,15 @@ export declare const getEdge: {
|
|
|
1141
1263
|
* console.log(hasAC) // false
|
|
1142
1264
|
* ```
|
|
1143
1265
|
*
|
|
1144
|
-
* @since 4.0.0
|
|
1145
1266
|
* @category getters
|
|
1267
|
+
* @since 4.0.0
|
|
1146
1268
|
*/
|
|
1147
1269
|
export declare const hasEdge: {
|
|
1148
1270
|
/**
|
|
1149
1271
|
* Checks if an edge exists between two nodes in the graph.
|
|
1150
1272
|
*
|
|
1151
|
-
*
|
|
1273
|
+
* **Example** (Checking edge existence)
|
|
1274
|
+
*
|
|
1152
1275
|
* ```ts
|
|
1153
1276
|
* import { Graph } from "effect"
|
|
1154
1277
|
*
|
|
@@ -1170,14 +1293,15 @@ export declare const hasEdge: {
|
|
|
1170
1293
|
* console.log(hasAC) // false
|
|
1171
1294
|
* ```
|
|
1172
1295
|
*
|
|
1173
|
-
* @since 4.0.0
|
|
1174
1296
|
* @category getters
|
|
1297
|
+
* @since 4.0.0
|
|
1175
1298
|
*/
|
|
1176
1299
|
(source: NodeIndex, target: NodeIndex): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => boolean;
|
|
1177
1300
|
/**
|
|
1178
1301
|
* Checks if an edge exists between two nodes in the graph.
|
|
1179
1302
|
*
|
|
1180
|
-
*
|
|
1303
|
+
* **Example** (Checking edge existence)
|
|
1304
|
+
*
|
|
1181
1305
|
* ```ts
|
|
1182
1306
|
* import { Graph } from "effect"
|
|
1183
1307
|
*
|
|
@@ -1199,15 +1323,16 @@ export declare const hasEdge: {
|
|
|
1199
1323
|
* console.log(hasAC) // false
|
|
1200
1324
|
* ```
|
|
1201
1325
|
*
|
|
1202
|
-
* @since 4.0.0
|
|
1203
1326
|
* @category getters
|
|
1327
|
+
* @since 4.0.0
|
|
1204
1328
|
*/
|
|
1205
1329
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, source: NodeIndex, target: NodeIndex): boolean;
|
|
1206
1330
|
};
|
|
1207
1331
|
/**
|
|
1208
1332
|
* Returns the number of edges in the graph.
|
|
1209
1333
|
*
|
|
1210
|
-
*
|
|
1334
|
+
* **Example** (Counting edges)
|
|
1335
|
+
*
|
|
1211
1336
|
* ```ts
|
|
1212
1337
|
* import { Graph } from "effect"
|
|
1213
1338
|
*
|
|
@@ -1226,14 +1351,20 @@ export declare const hasEdge: {
|
|
|
1226
1351
|
* console.log(Graph.edgeCount(graphWithEdges)) // 3
|
|
1227
1352
|
* ```
|
|
1228
1353
|
*
|
|
1229
|
-
* @since 4.0.0
|
|
1230
1354
|
* @category getters
|
|
1355
|
+
* @since 4.0.0
|
|
1231
1356
|
*/
|
|
1232
1357
|
export declare const edgeCount: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => number;
|
|
1233
1358
|
/**
|
|
1234
|
-
* Returns the neighboring
|
|
1359
|
+
* Returns the neighboring node indices for a node.
|
|
1360
|
+
*
|
|
1361
|
+
* **Details**
|
|
1362
|
+
*
|
|
1363
|
+
* For directed graphs, neighbors are the targets of outgoing edges. For
|
|
1364
|
+
* undirected graphs, neighbors are the other endpoints of incident edges.
|
|
1365
|
+
*
|
|
1366
|
+
* **Example** (Getting outgoing neighbors)
|
|
1235
1367
|
*
|
|
1236
|
-
* @example
|
|
1237
1368
|
* ```ts
|
|
1238
1369
|
* import { Graph } from "effect"
|
|
1239
1370
|
*
|
|
@@ -1250,20 +1381,26 @@ export declare const edgeCount: <N, E, T extends Kind = "directed">(graph: Graph
|
|
|
1250
1381
|
* const nodeC = 2
|
|
1251
1382
|
*
|
|
1252
1383
|
* const neighborsA = Graph.neighbors(graph, nodeA)
|
|
1253
|
-
* console.log(neighborsA) // [
|
|
1384
|
+
* console.log(neighborsA) // [1, 2]
|
|
1254
1385
|
*
|
|
1255
1386
|
* const neighborsB = Graph.neighbors(graph, nodeB)
|
|
1256
1387
|
* console.log(neighborsB) // []
|
|
1257
1388
|
* ```
|
|
1258
1389
|
*
|
|
1259
|
-
* @since 4.0.0
|
|
1260
1390
|
* @category getters
|
|
1391
|
+
* @since 4.0.0
|
|
1261
1392
|
*/
|
|
1262
1393
|
export declare const neighbors: {
|
|
1263
1394
|
/**
|
|
1264
|
-
* Returns the neighboring
|
|
1395
|
+
* Returns the neighboring node indices for a node.
|
|
1396
|
+
*
|
|
1397
|
+
* **Details**
|
|
1398
|
+
*
|
|
1399
|
+
* For directed graphs, neighbors are the targets of outgoing edges. For
|
|
1400
|
+
* undirected graphs, neighbors are the other endpoints of incident edges.
|
|
1401
|
+
*
|
|
1402
|
+
* **Example** (Getting outgoing neighbors)
|
|
1265
1403
|
*
|
|
1266
|
-
* @example
|
|
1267
1404
|
* ```ts
|
|
1268
1405
|
* import { Graph } from "effect"
|
|
1269
1406
|
*
|
|
@@ -1280,20 +1417,26 @@ export declare const neighbors: {
|
|
|
1280
1417
|
* const nodeC = 2
|
|
1281
1418
|
*
|
|
1282
1419
|
* const neighborsA = Graph.neighbors(graph, nodeA)
|
|
1283
|
-
* console.log(neighborsA) // [
|
|
1420
|
+
* console.log(neighborsA) // [1, 2]
|
|
1284
1421
|
*
|
|
1285
1422
|
* const neighborsB = Graph.neighbors(graph, nodeB)
|
|
1286
1423
|
* console.log(neighborsB) // []
|
|
1287
1424
|
* ```
|
|
1288
1425
|
*
|
|
1289
|
-
* @since 4.0.0
|
|
1290
1426
|
* @category getters
|
|
1427
|
+
* @since 4.0.0
|
|
1291
1428
|
*/
|
|
1292
1429
|
(nodeIndex: NodeIndex): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<NodeIndex>;
|
|
1293
1430
|
/**
|
|
1294
|
-
* Returns the neighboring
|
|
1431
|
+
* Returns the neighboring node indices for a node.
|
|
1432
|
+
*
|
|
1433
|
+
* **Details**
|
|
1434
|
+
*
|
|
1435
|
+
* For directed graphs, neighbors are the targets of outgoing edges. For
|
|
1436
|
+
* undirected graphs, neighbors are the other endpoints of incident edges.
|
|
1437
|
+
*
|
|
1438
|
+
* **Example** (Getting outgoing neighbors)
|
|
1295
1439
|
*
|
|
1296
|
-
* @example
|
|
1297
1440
|
* ```ts
|
|
1298
1441
|
* import { Graph } from "effect"
|
|
1299
1442
|
*
|
|
@@ -1310,21 +1453,22 @@ export declare const neighbors: {
|
|
|
1310
1453
|
* const nodeC = 2
|
|
1311
1454
|
*
|
|
1312
1455
|
* const neighborsA = Graph.neighbors(graph, nodeA)
|
|
1313
|
-
* console.log(neighborsA) // [
|
|
1456
|
+
* console.log(neighborsA) // [1, 2]
|
|
1314
1457
|
*
|
|
1315
1458
|
* const neighborsB = Graph.neighbors(graph, nodeB)
|
|
1316
1459
|
* console.log(neighborsB) // []
|
|
1317
1460
|
* ```
|
|
1318
1461
|
*
|
|
1319
|
-
* @since 4.0.0
|
|
1320
1462
|
* @category getters
|
|
1463
|
+
* @since 4.0.0
|
|
1321
1464
|
*/
|
|
1322
1465
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex): Array<NodeIndex>;
|
|
1323
1466
|
};
|
|
1324
1467
|
/**
|
|
1325
1468
|
* Get neighbors of a node in a specific direction for bidirectional traversal.
|
|
1326
1469
|
*
|
|
1327
|
-
*
|
|
1470
|
+
* **Example** (Traversing directed neighbors)
|
|
1471
|
+
*
|
|
1328
1472
|
* ```ts
|
|
1329
1473
|
* import { Graph } from "effect"
|
|
1330
1474
|
*
|
|
@@ -1344,14 +1488,15 @@ export declare const neighbors: {
|
|
|
1344
1488
|
* const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
|
|
1345
1489
|
* ```
|
|
1346
1490
|
*
|
|
1347
|
-
* @since 4.0.0
|
|
1348
1491
|
* @category queries
|
|
1492
|
+
* @since 4.0.0
|
|
1349
1493
|
*/
|
|
1350
1494
|
export declare const neighborsDirected: {
|
|
1351
1495
|
/**
|
|
1352
1496
|
* Get neighbors of a node in a specific direction for bidirectional traversal.
|
|
1353
1497
|
*
|
|
1354
|
-
*
|
|
1498
|
+
* **Example** (Traversing directed neighbors)
|
|
1499
|
+
*
|
|
1355
1500
|
* ```ts
|
|
1356
1501
|
* import { Graph } from "effect"
|
|
1357
1502
|
*
|
|
@@ -1371,14 +1516,15 @@ export declare const neighborsDirected: {
|
|
|
1371
1516
|
* const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
|
|
1372
1517
|
* ```
|
|
1373
1518
|
*
|
|
1374
|
-
* @since 4.0.0
|
|
1375
1519
|
* @category queries
|
|
1520
|
+
* @since 4.0.0
|
|
1376
1521
|
*/
|
|
1377
1522
|
(nodeIndex: NodeIndex, direction: Direction): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<NodeIndex>;
|
|
1378
1523
|
/**
|
|
1379
1524
|
* Get neighbors of a node in a specific direction for bidirectional traversal.
|
|
1380
1525
|
*
|
|
1381
|
-
*
|
|
1526
|
+
* **Example** (Traversing directed neighbors)
|
|
1527
|
+
*
|
|
1382
1528
|
* ```ts
|
|
1383
1529
|
* import { Graph } from "effect"
|
|
1384
1530
|
*
|
|
@@ -1398,8 +1544,8 @@ export declare const neighborsDirected: {
|
|
|
1398
1544
|
* const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
|
|
1399
1545
|
* ```
|
|
1400
1546
|
*
|
|
1401
|
-
* @since 4.0.0
|
|
1402
1547
|
* @category queries
|
|
1548
|
+
* @since 4.0.0
|
|
1403
1549
|
*/
|
|
1404
1550
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex, direction: Direction): Array<NodeIndex>;
|
|
1405
1551
|
};
|
|
@@ -1409,7 +1555,8 @@ export declare const neighborsDirected: {
|
|
|
1409
1555
|
* Provides customization for node labels, edge labels, and graph naming
|
|
1410
1556
|
* in DOT format compatible with GraphViz tools.
|
|
1411
1557
|
*
|
|
1412
|
-
*
|
|
1558
|
+
* **Example** (Configuring GraphViz labels)
|
|
1559
|
+
*
|
|
1413
1560
|
* ```ts
|
|
1414
1561
|
* import type * as Graph from "effect/Graph"
|
|
1415
1562
|
*
|
|
@@ -1427,8 +1574,8 @@ export declare const neighborsDirected: {
|
|
|
1427
1574
|
* }
|
|
1428
1575
|
* ```
|
|
1429
1576
|
*
|
|
1430
|
-
* @since 4.0.0
|
|
1431
1577
|
* @category models
|
|
1578
|
+
* @since 4.0.0
|
|
1432
1579
|
*/
|
|
1433
1580
|
export interface GraphVizOptions<N, E> {
|
|
1434
1581
|
/**
|
|
@@ -1450,7 +1597,8 @@ export interface GraphVizOptions<N, E> {
|
|
|
1450
1597
|
/**
|
|
1451
1598
|
* Exports a graph to GraphViz DOT format for visualization.
|
|
1452
1599
|
*
|
|
1453
|
-
*
|
|
1600
|
+
* **Example** (Exporting GraphViz DOT)
|
|
1601
|
+
*
|
|
1454
1602
|
* ```ts
|
|
1455
1603
|
* import { Graph } from "effect"
|
|
1456
1604
|
*
|
|
@@ -1475,14 +1623,15 @@ export interface GraphVizOptions<N, E> {
|
|
|
1475
1623
|
* // }
|
|
1476
1624
|
* ```
|
|
1477
1625
|
*
|
|
1478
|
-
* @since 4.0.0
|
|
1479
1626
|
* @category utils
|
|
1627
|
+
* @since 4.0.0
|
|
1480
1628
|
*/
|
|
1481
1629
|
export declare const toGraphViz: {
|
|
1482
1630
|
/**
|
|
1483
1631
|
* Exports a graph to GraphViz DOT format for visualization.
|
|
1484
1632
|
*
|
|
1485
|
-
*
|
|
1633
|
+
* **Example** (Exporting GraphViz DOT)
|
|
1634
|
+
*
|
|
1486
1635
|
* ```ts
|
|
1487
1636
|
* import { Graph } from "effect"
|
|
1488
1637
|
*
|
|
@@ -1507,14 +1656,15 @@ export declare const toGraphViz: {
|
|
|
1507
1656
|
* // }
|
|
1508
1657
|
* ```
|
|
1509
1658
|
*
|
|
1510
|
-
* @since 4.0.0
|
|
1511
1659
|
* @category utils
|
|
1660
|
+
* @since 4.0.0
|
|
1512
1661
|
*/
|
|
1513
1662
|
<N, E>(options?: GraphVizOptions<N, E>): <T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => string;
|
|
1514
1663
|
/**
|
|
1515
1664
|
* Exports a graph to GraphViz DOT format for visualization.
|
|
1516
1665
|
*
|
|
1517
|
-
*
|
|
1666
|
+
* **Example** (Exporting GraphViz DOT)
|
|
1667
|
+
*
|
|
1518
1668
|
* ```ts
|
|
1519
1669
|
* import { Graph } from "effect"
|
|
1520
1670
|
*
|
|
@@ -1539,8 +1689,8 @@ export declare const toGraphViz: {
|
|
|
1539
1689
|
* // }
|
|
1540
1690
|
* ```
|
|
1541
1691
|
*
|
|
1542
|
-
* @since 4.0.0
|
|
1543
1692
|
* @category utils
|
|
1693
|
+
* @since 4.0.0
|
|
1544
1694
|
*/
|
|
1545
1695
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, options?: GraphVizOptions<N, E>): string;
|
|
1546
1696
|
};
|
|
@@ -1557,7 +1707,8 @@ export declare const toGraphViz: {
|
|
|
1557
1707
|
* - `subroutine`: Subroutine-style nodes `A[["label"]]`
|
|
1558
1708
|
* - `cylindrical`: Cylindrical database-style nodes `A[("label")]`
|
|
1559
1709
|
*
|
|
1560
|
-
*
|
|
1710
|
+
* **Example** (Selecting Mermaid node shapes)
|
|
1711
|
+
*
|
|
1561
1712
|
* ```ts
|
|
1562
1713
|
* import type * as Graph from "effect/Graph"
|
|
1563
1714
|
*
|
|
@@ -1575,8 +1726,8 @@ export declare const toGraphViz: {
|
|
|
1575
1726
|
* }
|
|
1576
1727
|
* ```
|
|
1577
1728
|
*
|
|
1578
|
-
* @since 4.0.0
|
|
1579
1729
|
* @category models
|
|
1730
|
+
* @since 4.0.0
|
|
1580
1731
|
*/
|
|
1581
1732
|
export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" | "hexagon" | "stadium" | "subroutine" | "cylindrical";
|
|
1582
1733
|
/**
|
|
@@ -1588,7 +1739,8 @@ export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" |
|
|
|
1588
1739
|
* - `LR`: Left to Right (horizontal layout)
|
|
1589
1740
|
* - `RL`: Right to Left (reverse horizontal)
|
|
1590
1741
|
*
|
|
1591
|
-
*
|
|
1742
|
+
* **Example** (Configuring Mermaid directions)
|
|
1743
|
+
*
|
|
1592
1744
|
* ```ts
|
|
1593
1745
|
* import type * as Graph from "effect/Graph"
|
|
1594
1746
|
*
|
|
@@ -1608,8 +1760,8 @@ export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" |
|
|
|
1608
1760
|
* }
|
|
1609
1761
|
* ```
|
|
1610
1762
|
*
|
|
1611
|
-
* @since 4.0.0
|
|
1612
1763
|
* @category models
|
|
1764
|
+
* @since 4.0.0
|
|
1613
1765
|
*/
|
|
1614
1766
|
export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
|
|
1615
1767
|
/**
|
|
@@ -1622,7 +1774,8 @@ export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
|
|
|
1622
1774
|
* When not specified, automatically selects based on graph type:
|
|
1623
1775
|
* directed graphs use "flowchart", undirected graphs use "graph".
|
|
1624
1776
|
*
|
|
1625
|
-
*
|
|
1777
|
+
* **Example** (Selecting Mermaid diagram types)
|
|
1778
|
+
*
|
|
1626
1779
|
* ```ts
|
|
1627
1780
|
* import type * as Graph from "effect/Graph"
|
|
1628
1781
|
*
|
|
@@ -1640,15 +1793,15 @@ export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
|
|
|
1640
1793
|
* const autoOptions: Graph.MermaidOptions<string, string> = {}
|
|
1641
1794
|
* ```
|
|
1642
1795
|
*
|
|
1643
|
-
* @since 4.0.0
|
|
1644
1796
|
* @category models
|
|
1797
|
+
* @since 4.0.0
|
|
1645
1798
|
*/
|
|
1646
1799
|
export type MermaidDiagramType = "flowchart" | "graph";
|
|
1647
1800
|
/**
|
|
1648
1801
|
* Configuration options for Mermaid diagram generation, following GraphViz pattern.
|
|
1649
1802
|
*
|
|
1650
|
-
* @since 4.0.0
|
|
1651
1803
|
* @category models
|
|
1804
|
+
* @since 4.0.0
|
|
1652
1805
|
*/
|
|
1653
1806
|
/**
|
|
1654
1807
|
* Configuration options for Mermaid diagram generation from graphs.
|
|
@@ -1656,7 +1809,8 @@ export type MermaidDiagramType = "flowchart" | "graph";
|
|
|
1656
1809
|
* Provides customization for node labels, edge labels, diagram type,
|
|
1657
1810
|
* layout direction, node shapes, and graph naming in Mermaid format.
|
|
1658
1811
|
*
|
|
1659
|
-
*
|
|
1812
|
+
* **Example** (Configuring Mermaid output)
|
|
1813
|
+
*
|
|
1660
1814
|
* ```ts
|
|
1661
1815
|
* import type * as Graph from "effect/Graph"
|
|
1662
1816
|
*
|
|
@@ -1676,8 +1830,8 @@ export type MermaidDiagramType = "flowchart" | "graph";
|
|
|
1676
1830
|
* }
|
|
1677
1831
|
* ```
|
|
1678
1832
|
*
|
|
1679
|
-
* @since 4.0.0
|
|
1680
1833
|
* @category models
|
|
1834
|
+
* @since 4.0.0
|
|
1681
1835
|
*/
|
|
1682
1836
|
export interface MermaidOptions<N, E> {
|
|
1683
1837
|
/**
|
|
@@ -1715,7 +1869,8 @@ export interface MermaidOptions<N, E> {
|
|
|
1715
1869
|
* structures to valid Mermaid syntax for use in documentation, web applications,
|
|
1716
1870
|
* and visualization tools.
|
|
1717
1871
|
*
|
|
1718
|
-
*
|
|
1872
|
+
* **Example** (Exporting a directed Mermaid diagram)
|
|
1873
|
+
*
|
|
1719
1874
|
* ```ts
|
|
1720
1875
|
* import * as Graph from "effect/Graph"
|
|
1721
1876
|
*
|
|
@@ -1738,7 +1893,8 @@ export interface MermaidOptions<N, E> {
|
|
|
1738
1893
|
* // 0 -->|"2"| 2
|
|
1739
1894
|
* ```
|
|
1740
1895
|
*
|
|
1741
|
-
*
|
|
1896
|
+
* **Example** (Exporting an undirected Mermaid diagram)
|
|
1897
|
+
*
|
|
1742
1898
|
* ```ts
|
|
1743
1899
|
* import * as Graph from "effect/Graph"
|
|
1744
1900
|
*
|
|
@@ -1765,7 +1921,8 @@ export interface MermaidOptions<N, E> {
|
|
|
1765
1921
|
* // 1 ---|"colleagues"| 2
|
|
1766
1922
|
* ```
|
|
1767
1923
|
*
|
|
1768
|
-
*
|
|
1924
|
+
* **Example** (Customizing Mermaid node shapes)
|
|
1925
|
+
*
|
|
1769
1926
|
* ```ts
|
|
1770
1927
|
* import * as Graph from "effect/Graph"
|
|
1771
1928
|
*
|
|
@@ -1816,7 +1973,8 @@ export interface MermaidOptions<N, E> {
|
|
|
1816
1973
|
* // 2 --> 3
|
|
1817
1974
|
* ```
|
|
1818
1975
|
*
|
|
1819
|
-
*
|
|
1976
|
+
* **Example** (Visualizing dependency graphs)
|
|
1977
|
+
*
|
|
1820
1978
|
* ```ts
|
|
1821
1979
|
* import * as Graph from "effect/Graph"
|
|
1822
1980
|
*
|
|
@@ -1881,8 +2039,8 @@ export interface MermaidOptions<N, E> {
|
|
|
1881
2039
|
* @param options - Optional configuration for the Mermaid output
|
|
1882
2040
|
* @returns Mermaid diagram syntax as a string
|
|
1883
2041
|
*
|
|
1884
|
-
* @since 4.0.0
|
|
1885
2042
|
* @category utils
|
|
2043
|
+
* @since 4.0.0
|
|
1886
2044
|
*/
|
|
1887
2045
|
export declare const toMermaid: {
|
|
1888
2046
|
/**
|
|
@@ -1893,7 +2051,8 @@ export declare const toMermaid: {
|
|
|
1893
2051
|
* structures to valid Mermaid syntax for use in documentation, web applications,
|
|
1894
2052
|
* and visualization tools.
|
|
1895
2053
|
*
|
|
1896
|
-
*
|
|
2054
|
+
* **Example** (Exporting a directed Mermaid diagram)
|
|
2055
|
+
*
|
|
1897
2056
|
* ```ts
|
|
1898
2057
|
* import * as Graph from "effect/Graph"
|
|
1899
2058
|
*
|
|
@@ -1916,7 +2075,8 @@ export declare const toMermaid: {
|
|
|
1916
2075
|
* // 0 -->|"2"| 2
|
|
1917
2076
|
* ```
|
|
1918
2077
|
*
|
|
1919
|
-
*
|
|
2078
|
+
* **Example** (Exporting an undirected Mermaid diagram)
|
|
2079
|
+
*
|
|
1920
2080
|
* ```ts
|
|
1921
2081
|
* import * as Graph from "effect/Graph"
|
|
1922
2082
|
*
|
|
@@ -1943,7 +2103,8 @@ export declare const toMermaid: {
|
|
|
1943
2103
|
* // 1 ---|"colleagues"| 2
|
|
1944
2104
|
* ```
|
|
1945
2105
|
*
|
|
1946
|
-
*
|
|
2106
|
+
* **Example** (Customizing Mermaid node shapes)
|
|
2107
|
+
*
|
|
1947
2108
|
* ```ts
|
|
1948
2109
|
* import * as Graph from "effect/Graph"
|
|
1949
2110
|
*
|
|
@@ -1994,7 +2155,8 @@ export declare const toMermaid: {
|
|
|
1994
2155
|
* // 2 --> 3
|
|
1995
2156
|
* ```
|
|
1996
2157
|
*
|
|
1997
|
-
*
|
|
2158
|
+
* **Example** (Visualizing dependency graphs)
|
|
2159
|
+
*
|
|
1998
2160
|
* ```ts
|
|
1999
2161
|
* import * as Graph from "effect/Graph"
|
|
2000
2162
|
*
|
|
@@ -2059,8 +2221,8 @@ export declare const toMermaid: {
|
|
|
2059
2221
|
* @param options - Optional configuration for the Mermaid output
|
|
2060
2222
|
* @returns Mermaid diagram syntax as a string
|
|
2061
2223
|
*
|
|
2062
|
-
* @since 4.0.0
|
|
2063
2224
|
* @category utils
|
|
2225
|
+
* @since 4.0.0
|
|
2064
2226
|
*/
|
|
2065
2227
|
<N, E>(options?: MermaidOptions<N, E>): <T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => string;
|
|
2066
2228
|
/**
|
|
@@ -2071,7 +2233,8 @@ export declare const toMermaid: {
|
|
|
2071
2233
|
* structures to valid Mermaid syntax for use in documentation, web applications,
|
|
2072
2234
|
* and visualization tools.
|
|
2073
2235
|
*
|
|
2074
|
-
*
|
|
2236
|
+
* **Example** (Exporting a directed Mermaid diagram)
|
|
2237
|
+
*
|
|
2075
2238
|
* ```ts
|
|
2076
2239
|
* import * as Graph from "effect/Graph"
|
|
2077
2240
|
*
|
|
@@ -2094,7 +2257,8 @@ export declare const toMermaid: {
|
|
|
2094
2257
|
* // 0 -->|"2"| 2
|
|
2095
2258
|
* ```
|
|
2096
2259
|
*
|
|
2097
|
-
*
|
|
2260
|
+
* **Example** (Exporting an undirected Mermaid diagram)
|
|
2261
|
+
*
|
|
2098
2262
|
* ```ts
|
|
2099
2263
|
* import * as Graph from "effect/Graph"
|
|
2100
2264
|
*
|
|
@@ -2121,7 +2285,8 @@ export declare const toMermaid: {
|
|
|
2121
2285
|
* // 1 ---|"colleagues"| 2
|
|
2122
2286
|
* ```
|
|
2123
2287
|
*
|
|
2124
|
-
*
|
|
2288
|
+
* **Example** (Customizing Mermaid node shapes)
|
|
2289
|
+
*
|
|
2125
2290
|
* ```ts
|
|
2126
2291
|
* import * as Graph from "effect/Graph"
|
|
2127
2292
|
*
|
|
@@ -2172,7 +2337,8 @@ export declare const toMermaid: {
|
|
|
2172
2337
|
* // 2 --> 3
|
|
2173
2338
|
* ```
|
|
2174
2339
|
*
|
|
2175
|
-
*
|
|
2340
|
+
* **Example** (Visualizing dependency graphs)
|
|
2341
|
+
*
|
|
2176
2342
|
* ```ts
|
|
2177
2343
|
* import * as Graph from "effect/Graph"
|
|
2178
2344
|
*
|
|
@@ -2237,15 +2403,16 @@ export declare const toMermaid: {
|
|
|
2237
2403
|
* @param options - Optional configuration for the Mermaid output
|
|
2238
2404
|
* @returns Mermaid diagram syntax as a string
|
|
2239
2405
|
*
|
|
2240
|
-
* @since 4.0.0
|
|
2241
2406
|
* @category utils
|
|
2407
|
+
* @since 4.0.0
|
|
2242
2408
|
*/
|
|
2243
2409
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, options?: MermaidOptions<N, E>): string;
|
|
2244
2410
|
};
|
|
2245
2411
|
/**
|
|
2246
2412
|
* Direction for graph traversal, indicating which edges to follow.
|
|
2247
2413
|
*
|
|
2248
|
-
*
|
|
2414
|
+
* **Example** (Traversing by direction)
|
|
2415
|
+
*
|
|
2249
2416
|
* ```ts
|
|
2250
2417
|
* import { Graph } from "effect"
|
|
2251
2418
|
*
|
|
@@ -2266,8 +2433,8 @@ export declare const toMermaid: {
|
|
|
2266
2433
|
* )
|
|
2267
2434
|
* ```
|
|
2268
2435
|
*
|
|
2269
|
-
* @since 4.0.0
|
|
2270
2436
|
* @category models
|
|
2437
|
+
* @since 4.0.0
|
|
2271
2438
|
*/
|
|
2272
2439
|
export type Direction = "outgoing" | "incoming";
|
|
2273
2440
|
/**
|
|
@@ -2277,7 +2444,8 @@ export type Direction = "outgoing" | "incoming";
|
|
|
2277
2444
|
* For directed graphs, any back edge creates a cycle. For undirected graphs,
|
|
2278
2445
|
* a back edge that doesn't go to the immediate parent creates a cycle.
|
|
2279
2446
|
*
|
|
2280
|
-
*
|
|
2447
|
+
* **Example** (Checking cycles)
|
|
2448
|
+
*
|
|
2281
2449
|
* ```ts
|
|
2282
2450
|
* import { Graph } from "effect"
|
|
2283
2451
|
*
|
|
@@ -2301,8 +2469,8 @@ export type Direction = "outgoing" | "incoming";
|
|
|
2301
2469
|
* console.log(Graph.isAcyclic(cyclic)) // false
|
|
2302
2470
|
* ```
|
|
2303
2471
|
*
|
|
2304
|
-
* @since 4.0.0
|
|
2305
2472
|
* @category algorithms
|
|
2473
|
+
* @since 4.0.0
|
|
2306
2474
|
*/
|
|
2307
2475
|
export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => boolean;
|
|
2308
2476
|
/**
|
|
@@ -2312,7 +2480,8 @@ export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph
|
|
|
2312
2480
|
* such that no two vertices within the same set are adjacent. Uses BFS coloring
|
|
2313
2481
|
* to determine bipartiteness.
|
|
2314
2482
|
*
|
|
2315
|
-
*
|
|
2483
|
+
* **Example** (Checking bipartite graphs)
|
|
2484
|
+
*
|
|
2316
2485
|
* ```ts
|
|
2317
2486
|
* import { Graph } from "effect"
|
|
2318
2487
|
*
|
|
@@ -2340,15 +2509,16 @@ export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph
|
|
|
2340
2509
|
* console.log(Graph.isBipartite(triangle)) // false
|
|
2341
2510
|
* ```
|
|
2342
2511
|
*
|
|
2343
|
-
* @since 4.0.0
|
|
2344
2512
|
* @category algorithms
|
|
2513
|
+
* @since 4.0.0
|
|
2345
2514
|
*/
|
|
2346
2515
|
export declare const isBipartite: <N, E>(graph: Graph<N, E, "undirected"> | MutableGraph<N, E, "undirected">) => boolean;
|
|
2347
2516
|
/**
|
|
2348
2517
|
* Find connected components in an undirected graph.
|
|
2349
2518
|
* Each component is represented as an array of node indices.
|
|
2350
2519
|
*
|
|
2351
|
-
*
|
|
2520
|
+
* **Example** (Finding connected components)
|
|
2521
|
+
*
|
|
2352
2522
|
* ```ts
|
|
2353
2523
|
* import { Graph } from "effect"
|
|
2354
2524
|
*
|
|
@@ -2365,15 +2535,16 @@ export declare const isBipartite: <N, E>(graph: Graph<N, E, "undirected"> | Muta
|
|
|
2365
2535
|
* console.log(components) // [[0, 1], [2, 3]]
|
|
2366
2536
|
* ```
|
|
2367
2537
|
*
|
|
2368
|
-
* @since 4.0.0
|
|
2369
2538
|
* @category algorithms
|
|
2539
|
+
* @since 4.0.0
|
|
2370
2540
|
*/
|
|
2371
2541
|
export declare const connectedComponents: <N, E>(graph: Graph<N, E, "undirected"> | MutableGraph<N, E, "undirected">) => Array<Array<NodeIndex>>;
|
|
2372
2542
|
/**
|
|
2373
2543
|
* Find strongly connected components in a directed graph using Kosaraju's algorithm.
|
|
2374
2544
|
* Each SCC is represented as an array of node indices.
|
|
2375
2545
|
*
|
|
2376
|
-
*
|
|
2546
|
+
* **Example** (Finding strongly connected components)
|
|
2547
|
+
*
|
|
2377
2548
|
* ```ts
|
|
2378
2549
|
* import { Graph } from "effect"
|
|
2379
2550
|
*
|
|
@@ -2390,15 +2561,20 @@ export declare const connectedComponents: <N, E>(graph: Graph<N, E, "undirected"
|
|
|
2390
2561
|
* console.log(sccs) // [[0, 1, 2]]
|
|
2391
2562
|
* ```
|
|
2392
2563
|
*
|
|
2393
|
-
* @since 4.0.0
|
|
2394
2564
|
* @category algorithms
|
|
2565
|
+
* @since 4.0.0
|
|
2395
2566
|
*/
|
|
2396
2567
|
export declare const stronglyConnectedComponents: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Array<Array<NodeIndex>>;
|
|
2397
2568
|
/**
|
|
2398
|
-
* Result of a shortest path computation
|
|
2569
|
+
* Result of a shortest path computation.
|
|
2570
|
+
*
|
|
2571
|
+
* **Details**
|
|
2572
|
+
*
|
|
2573
|
+
* Contains the node-index path, the total numeric distance, and the edge data
|
|
2574
|
+
* encountered along the path.
|
|
2399
2575
|
*
|
|
2400
|
-
* @since 4.0.0
|
|
2401
2576
|
* @category models
|
|
2577
|
+
* @since 4.0.0
|
|
2402
2578
|
*/
|
|
2403
2579
|
export interface PathResult<E> {
|
|
2404
2580
|
readonly path: Array<NodeIndex>;
|
|
@@ -2406,10 +2582,15 @@ export interface PathResult<E> {
|
|
|
2406
2582
|
readonly costs: Array<E>;
|
|
2407
2583
|
}
|
|
2408
2584
|
/**
|
|
2409
|
-
* Configuration for Dijkstra's algorithm.
|
|
2585
|
+
* Configuration for finding a shortest path with Dijkstra's algorithm.
|
|
2586
|
+
*
|
|
2587
|
+
* **Details**
|
|
2588
|
+
*
|
|
2589
|
+
* Specifies the source and target node indices, plus a cost function that maps
|
|
2590
|
+
* each edge's data to a non-negative numeric weight.
|
|
2410
2591
|
*
|
|
2411
|
-
* @since 4.0.0
|
|
2412
2592
|
* @category models
|
|
2593
|
+
* @since 4.0.0
|
|
2413
2594
|
*/
|
|
2414
2595
|
export interface DijkstraConfig<E> {
|
|
2415
2596
|
source: NodeIndex;
|
|
@@ -2417,12 +2598,17 @@ export interface DijkstraConfig<E> {
|
|
|
2417
2598
|
cost: (edgeData: E) => number;
|
|
2418
2599
|
}
|
|
2419
2600
|
/**
|
|
2420
|
-
*
|
|
2601
|
+
* Finds the shortest path from the configured source node to the target node
|
|
2602
|
+
* using Dijkstra's algorithm.
|
|
2603
|
+
*
|
|
2604
|
+
* **Details**
|
|
2605
|
+
*
|
|
2606
|
+
* Edge costs must be non-negative. Returns `Option.none()` when the target is
|
|
2607
|
+
* not reachable, and throws a `GraphError` when either endpoint is missing or a
|
|
2608
|
+
* negative edge cost is encountered.
|
|
2421
2609
|
*
|
|
2422
|
-
*
|
|
2423
|
-
* path from a source node to a target node in O((V + E) log V) time complexity.
|
|
2610
|
+
* **Example** (Finding shortest paths with Dijkstra)
|
|
2424
2611
|
*
|
|
2425
|
-
* @example
|
|
2426
2612
|
* ```ts
|
|
2427
2613
|
* import { Graph } from "effect"
|
|
2428
2614
|
*
|
|
@@ -2447,17 +2633,22 @@ export interface DijkstraConfig<E> {
|
|
|
2447
2633
|
* }
|
|
2448
2634
|
* ```
|
|
2449
2635
|
*
|
|
2450
|
-
* @since 4.0.0
|
|
2451
2636
|
* @category algorithms
|
|
2637
|
+
* @since 4.0.0
|
|
2452
2638
|
*/
|
|
2453
2639
|
export declare const dijkstra: {
|
|
2454
2640
|
/**
|
|
2455
|
-
*
|
|
2641
|
+
* Finds the shortest path from the configured source node to the target node
|
|
2642
|
+
* using Dijkstra's algorithm.
|
|
2643
|
+
*
|
|
2644
|
+
* **Details**
|
|
2456
2645
|
*
|
|
2457
|
-
*
|
|
2458
|
-
*
|
|
2646
|
+
* Edge costs must be non-negative. Returns `Option.none()` when the target is
|
|
2647
|
+
* not reachable, and throws a `GraphError` when either endpoint is missing or a
|
|
2648
|
+
* negative edge cost is encountered.
|
|
2649
|
+
*
|
|
2650
|
+
* **Example** (Finding shortest paths with Dijkstra)
|
|
2459
2651
|
*
|
|
2460
|
-
* @example
|
|
2461
2652
|
* ```ts
|
|
2462
2653
|
* import { Graph } from "effect"
|
|
2463
2654
|
*
|
|
@@ -2482,17 +2673,22 @@ export declare const dijkstra: {
|
|
|
2482
2673
|
* }
|
|
2483
2674
|
* ```
|
|
2484
2675
|
*
|
|
2485
|
-
* @since 4.0.0
|
|
2486
2676
|
* @category algorithms
|
|
2677
|
+
* @since 4.0.0
|
|
2487
2678
|
*/
|
|
2488
2679
|
<E>(config: DijkstraConfig<E>): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<PathResult<E>>;
|
|
2489
2680
|
/**
|
|
2490
|
-
*
|
|
2681
|
+
* Finds the shortest path from the configured source node to the target node
|
|
2682
|
+
* using Dijkstra's algorithm.
|
|
2491
2683
|
*
|
|
2492
|
-
*
|
|
2493
|
-
*
|
|
2684
|
+
* **Details**
|
|
2685
|
+
*
|
|
2686
|
+
* Edge costs must be non-negative. Returns `Option.none()` when the target is
|
|
2687
|
+
* not reachable, and throws a `GraphError` when either endpoint is missing or a
|
|
2688
|
+
* negative edge cost is encountered.
|
|
2689
|
+
*
|
|
2690
|
+
* **Example** (Finding shortest paths with Dijkstra)
|
|
2494
2691
|
*
|
|
2495
|
-
* @example
|
|
2496
2692
|
* ```ts
|
|
2497
2693
|
* import { Graph } from "effect"
|
|
2498
2694
|
*
|
|
@@ -2517,16 +2713,21 @@ export declare const dijkstra: {
|
|
|
2517
2713
|
* }
|
|
2518
2714
|
* ```
|
|
2519
2715
|
*
|
|
2520
|
-
* @since 4.0.0
|
|
2521
2716
|
* @category algorithms
|
|
2717
|
+
* @since 4.0.0
|
|
2522
2718
|
*/
|
|
2523
2719
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config: DijkstraConfig<E>): Option.Option<PathResult<E>>;
|
|
2524
2720
|
};
|
|
2525
2721
|
/**
|
|
2526
|
-
* Result of all-pairs shortest path computation.
|
|
2722
|
+
* Result of an all-pairs shortest path computation.
|
|
2723
|
+
*
|
|
2724
|
+
* **Details**
|
|
2725
|
+
*
|
|
2726
|
+
* Contains distance, node-path, and edge-data maps keyed by source and target
|
|
2727
|
+
* node indices.
|
|
2527
2728
|
*
|
|
2528
|
-
* @since 4.0.0
|
|
2529
2729
|
* @category models
|
|
2730
|
+
* @since 4.0.0
|
|
2530
2731
|
*/
|
|
2531
2732
|
export interface AllPairsResult<E> {
|
|
2532
2733
|
readonly distances: Map<NodeIndex, Map<NodeIndex, number>>;
|
|
@@ -2534,14 +2735,17 @@ export interface AllPairsResult<E> {
|
|
|
2534
2735
|
readonly costs: Map<NodeIndex, Map<NodeIndex, Array<E>>>;
|
|
2535
2736
|
}
|
|
2536
2737
|
/**
|
|
2537
|
-
*
|
|
2738
|
+
* Finds shortest paths between all pairs of nodes using the Floyd-Warshall
|
|
2739
|
+
* algorithm.
|
|
2740
|
+
*
|
|
2741
|
+
* **Details**
|
|
2538
2742
|
*
|
|
2539
|
-
*
|
|
2540
|
-
*
|
|
2743
|
+
* Computes distances, reconstructed node paths, and edge-data paths for every
|
|
2744
|
+
* source and target pair in O(V^3) time. Negative edge weights are allowed, but
|
|
2745
|
+
* a `GraphError` is thrown if any negative cycle is detected.
|
|
2541
2746
|
*
|
|
2542
|
-
*
|
|
2747
|
+
* **Example** (Finding all-pairs shortest paths)
|
|
2543
2748
|
*
|
|
2544
|
-
* @example
|
|
2545
2749
|
* ```ts
|
|
2546
2750
|
* import { Graph } from "effect"
|
|
2547
2751
|
*
|
|
@@ -2559,19 +2763,22 @@ export interface AllPairsResult<E> {
|
|
|
2559
2763
|
* const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
|
|
2560
2764
|
* ```
|
|
2561
2765
|
*
|
|
2562
|
-
* @since 4.0.0
|
|
2563
2766
|
* @category algorithms
|
|
2767
|
+
* @since 4.0.0
|
|
2564
2768
|
*/
|
|
2565
2769
|
export declare const floydWarshall: {
|
|
2566
2770
|
/**
|
|
2567
|
-
*
|
|
2771
|
+
* Finds shortest paths between all pairs of nodes using the Floyd-Warshall
|
|
2772
|
+
* algorithm.
|
|
2773
|
+
*
|
|
2774
|
+
* **Details**
|
|
2568
2775
|
*
|
|
2569
|
-
*
|
|
2570
|
-
*
|
|
2776
|
+
* Computes distances, reconstructed node paths, and edge-data paths for every
|
|
2777
|
+
* source and target pair in O(V^3) time. Negative edge weights are allowed, but
|
|
2778
|
+
* a `GraphError` is thrown if any negative cycle is detected.
|
|
2571
2779
|
*
|
|
2572
|
-
*
|
|
2780
|
+
* **Example** (Finding all-pairs shortest paths)
|
|
2573
2781
|
*
|
|
2574
|
-
* @example
|
|
2575
2782
|
* ```ts
|
|
2576
2783
|
* import { Graph } from "effect"
|
|
2577
2784
|
*
|
|
@@ -2589,19 +2796,22 @@ export declare const floydWarshall: {
|
|
|
2589
2796
|
* const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
|
|
2590
2797
|
* ```
|
|
2591
2798
|
*
|
|
2592
|
-
* @since 4.0.0
|
|
2593
2799
|
* @category algorithms
|
|
2800
|
+
* @since 4.0.0
|
|
2594
2801
|
*/
|
|
2595
2802
|
<E>(cost: (edgeData: E) => number): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => AllPairsResult<E>;
|
|
2596
2803
|
/**
|
|
2597
|
-
*
|
|
2804
|
+
* Finds shortest paths between all pairs of nodes using the Floyd-Warshall
|
|
2805
|
+
* algorithm.
|
|
2806
|
+
*
|
|
2807
|
+
* **Details**
|
|
2598
2808
|
*
|
|
2599
|
-
*
|
|
2600
|
-
*
|
|
2809
|
+
* Computes distances, reconstructed node paths, and edge-data paths for every
|
|
2810
|
+
* source and target pair in O(V^3) time. Negative edge weights are allowed, but
|
|
2811
|
+
* a `GraphError` is thrown if any negative cycle is detected.
|
|
2601
2812
|
*
|
|
2602
|
-
*
|
|
2813
|
+
* **Example** (Finding all-pairs shortest paths)
|
|
2603
2814
|
*
|
|
2604
|
-
* @example
|
|
2605
2815
|
* ```ts
|
|
2606
2816
|
* import { Graph } from "effect"
|
|
2607
2817
|
*
|
|
@@ -2619,16 +2829,21 @@ export declare const floydWarshall: {
|
|
|
2619
2829
|
* const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
|
|
2620
2830
|
* ```
|
|
2621
2831
|
*
|
|
2622
|
-
* @since 4.0.0
|
|
2623
2832
|
* @category algorithms
|
|
2833
|
+
* @since 4.0.0
|
|
2624
2834
|
*/
|
|
2625
2835
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, cost: (edgeData: E) => number): AllPairsResult<E>;
|
|
2626
2836
|
};
|
|
2627
2837
|
/**
|
|
2628
|
-
* Configuration for A*
|
|
2838
|
+
* Configuration for finding a shortest path with the A* algorithm.
|
|
2839
|
+
*
|
|
2840
|
+
* **Details**
|
|
2841
|
+
*
|
|
2842
|
+
* Specifies the source and target node indices, an edge-cost function, and a
|
|
2843
|
+
* heuristic that estimates the remaining cost from a node to the target.
|
|
2629
2844
|
*
|
|
2630
|
-
* @since 4.0.0
|
|
2631
2845
|
* @category models
|
|
2846
|
+
* @since 4.0.0
|
|
2632
2847
|
*/
|
|
2633
2848
|
export interface AstarConfig<E, N> {
|
|
2634
2849
|
source: NodeIndex;
|
|
@@ -2637,13 +2852,18 @@ export interface AstarConfig<E, N> {
|
|
|
2637
2852
|
heuristic: (sourceNodeData: N, targetNodeData: N) => number;
|
|
2638
2853
|
}
|
|
2639
2854
|
/**
|
|
2640
|
-
*
|
|
2855
|
+
* Finds the shortest path from the configured source node to the target node
|
|
2856
|
+
* using the A* pathfinding algorithm.
|
|
2857
|
+
*
|
|
2858
|
+
* **Details**
|
|
2859
|
+
*
|
|
2860
|
+
* The edge-cost function must return non-negative weights, and the heuristic
|
|
2861
|
+
* should be admissible to preserve shortest-path guarantees. Returns
|
|
2862
|
+
* `Option.none()` when the target is not reachable, and throws a `GraphError`
|
|
2863
|
+
* when either endpoint is missing or a negative edge cost is encountered.
|
|
2641
2864
|
*
|
|
2642
|
-
*
|
|
2643
|
-
* the search towards the target, potentially finding paths faster than Dijkstra's.
|
|
2644
|
-
* The heuristic must be admissible (never overestimate the actual cost).
|
|
2865
|
+
* **Example** (Finding shortest paths with A-star)
|
|
2645
2866
|
*
|
|
2646
|
-
* @example
|
|
2647
2867
|
* ```ts
|
|
2648
2868
|
* import { Graph } from "effect"
|
|
2649
2869
|
*
|
|
@@ -2674,18 +2894,23 @@ export interface AstarConfig<E, N> {
|
|
|
2674
2894
|
* }
|
|
2675
2895
|
* ```
|
|
2676
2896
|
*
|
|
2677
|
-
* @since 4.0.0
|
|
2678
2897
|
* @category algorithms
|
|
2898
|
+
* @since 4.0.0
|
|
2679
2899
|
*/
|
|
2680
2900
|
export declare const astar: {
|
|
2681
2901
|
/**
|
|
2682
|
-
*
|
|
2902
|
+
* Finds the shortest path from the configured source node to the target node
|
|
2903
|
+
* using the A* pathfinding algorithm.
|
|
2904
|
+
*
|
|
2905
|
+
* **Details**
|
|
2683
2906
|
*
|
|
2684
|
-
*
|
|
2685
|
-
*
|
|
2686
|
-
*
|
|
2907
|
+
* The edge-cost function must return non-negative weights, and the heuristic
|
|
2908
|
+
* should be admissible to preserve shortest-path guarantees. Returns
|
|
2909
|
+
* `Option.none()` when the target is not reachable, and throws a `GraphError`
|
|
2910
|
+
* when either endpoint is missing or a negative edge cost is encountered.
|
|
2911
|
+
*
|
|
2912
|
+
* **Example** (Finding shortest paths with A-star)
|
|
2687
2913
|
*
|
|
2688
|
-
* @example
|
|
2689
2914
|
* ```ts
|
|
2690
2915
|
* import { Graph } from "effect"
|
|
2691
2916
|
*
|
|
@@ -2716,18 +2941,23 @@ export declare const astar: {
|
|
|
2716
2941
|
* }
|
|
2717
2942
|
* ```
|
|
2718
2943
|
*
|
|
2719
|
-
* @since 4.0.0
|
|
2720
2944
|
* @category algorithms
|
|
2945
|
+
* @since 4.0.0
|
|
2721
2946
|
*/
|
|
2722
2947
|
<E, N>(config: AstarConfig<E, N>): <T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<PathResult<E>>;
|
|
2723
2948
|
/**
|
|
2724
|
-
*
|
|
2949
|
+
* Finds the shortest path from the configured source node to the target node
|
|
2950
|
+
* using the A* pathfinding algorithm.
|
|
2951
|
+
*
|
|
2952
|
+
* **Details**
|
|
2725
2953
|
*
|
|
2726
|
-
*
|
|
2727
|
-
*
|
|
2728
|
-
*
|
|
2954
|
+
* The edge-cost function must return non-negative weights, and the heuristic
|
|
2955
|
+
* should be admissible to preserve shortest-path guarantees. Returns
|
|
2956
|
+
* `Option.none()` when the target is not reachable, and throws a `GraphError`
|
|
2957
|
+
* when either endpoint is missing or a negative edge cost is encountered.
|
|
2958
|
+
*
|
|
2959
|
+
* **Example** (Finding shortest paths with A-star)
|
|
2729
2960
|
*
|
|
2730
|
-
* @example
|
|
2731
2961
|
* ```ts
|
|
2732
2962
|
* import { Graph } from "effect"
|
|
2733
2963
|
*
|
|
@@ -2758,16 +2988,21 @@ export declare const astar: {
|
|
|
2758
2988
|
* }
|
|
2759
2989
|
* ```
|
|
2760
2990
|
*
|
|
2761
|
-
* @since 4.0.0
|
|
2762
2991
|
* @category algorithms
|
|
2992
|
+
* @since 4.0.0
|
|
2763
2993
|
*/
|
|
2764
2994
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config: AstarConfig<E, N>): Option.Option<PathResult<E>>;
|
|
2765
2995
|
};
|
|
2766
2996
|
/**
|
|
2767
|
-
* Configuration for Bellman-Ford algorithm.
|
|
2997
|
+
* Configuration for finding a shortest path with the Bellman-Ford algorithm.
|
|
2998
|
+
*
|
|
2999
|
+
* **Details**
|
|
3000
|
+
*
|
|
3001
|
+
* Specifies the source and target node indices, plus a cost function that maps
|
|
3002
|
+
* each edge's data to a numeric weight.
|
|
2768
3003
|
*
|
|
2769
|
-
* @since 4.0.0
|
|
2770
3004
|
* @category models
|
|
3005
|
+
* @since 4.0.0
|
|
2771
3006
|
*/
|
|
2772
3007
|
export interface BellmanFordConfig<E> {
|
|
2773
3008
|
source: NodeIndex;
|
|
@@ -2775,13 +3010,17 @@ export interface BellmanFordConfig<E> {
|
|
|
2775
3010
|
cost: (edgeData: E) => number;
|
|
2776
3011
|
}
|
|
2777
3012
|
/**
|
|
2778
|
-
*
|
|
3013
|
+
* Finds the shortest path from the configured source node to the target node
|
|
3014
|
+
* using the Bellman-Ford algorithm.
|
|
3015
|
+
*
|
|
3016
|
+
* **Details**
|
|
3017
|
+
*
|
|
3018
|
+
* Negative edge weights are allowed. Returns `Option.none()` when the target is
|
|
3019
|
+
* unreachable or when a negative cycle affects the path to the target. Throws a
|
|
3020
|
+
* `GraphError` when either endpoint is missing.
|
|
2779
3021
|
*
|
|
2780
|
-
*
|
|
2781
|
-
* It has O(VE) time complexity, slower than Dijkstra's but more versatile.
|
|
2782
|
-
* Returns Option.none() if a negative cycle is detected that affects the path.
|
|
3022
|
+
* **Example** (Finding shortest paths with Bellman-Ford)
|
|
2783
3023
|
*
|
|
2784
|
-
* @example
|
|
2785
3024
|
* ```ts
|
|
2786
3025
|
* import { Graph } from "effect"
|
|
2787
3026
|
*
|
|
@@ -2806,18 +3045,22 @@ export interface BellmanFordConfig<E> {
|
|
|
2806
3045
|
* }
|
|
2807
3046
|
* ```
|
|
2808
3047
|
*
|
|
2809
|
-
* @since 4.0.0
|
|
2810
3048
|
* @category algorithms
|
|
3049
|
+
* @since 4.0.0
|
|
2811
3050
|
*/
|
|
2812
3051
|
export declare const bellmanFord: {
|
|
2813
3052
|
/**
|
|
2814
|
-
*
|
|
3053
|
+
* Finds the shortest path from the configured source node to the target node
|
|
3054
|
+
* using the Bellman-Ford algorithm.
|
|
3055
|
+
*
|
|
3056
|
+
* **Details**
|
|
3057
|
+
*
|
|
3058
|
+
* Negative edge weights are allowed. Returns `Option.none()` when the target is
|
|
3059
|
+
* unreachable or when a negative cycle affects the path to the target. Throws a
|
|
3060
|
+
* `GraphError` when either endpoint is missing.
|
|
2815
3061
|
*
|
|
2816
|
-
*
|
|
2817
|
-
* It has O(VE) time complexity, slower than Dijkstra's but more versatile.
|
|
2818
|
-
* Returns Option.none() if a negative cycle is detected that affects the path.
|
|
3062
|
+
* **Example** (Finding shortest paths with Bellman-Ford)
|
|
2819
3063
|
*
|
|
2820
|
-
* @example
|
|
2821
3064
|
* ```ts
|
|
2822
3065
|
* import { Graph } from "effect"
|
|
2823
3066
|
*
|
|
@@ -2842,18 +3085,22 @@ export declare const bellmanFord: {
|
|
|
2842
3085
|
* }
|
|
2843
3086
|
* ```
|
|
2844
3087
|
*
|
|
2845
|
-
* @since 4.0.0
|
|
2846
3088
|
* @category algorithms
|
|
3089
|
+
* @since 4.0.0
|
|
2847
3090
|
*/
|
|
2848
3091
|
<E>(config: BellmanFordConfig<E>): <N, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => Option.Option<PathResult<E>>;
|
|
2849
3092
|
/**
|
|
2850
|
-
*
|
|
3093
|
+
* Finds the shortest path from the configured source node to the target node
|
|
3094
|
+
* using the Bellman-Ford algorithm.
|
|
3095
|
+
*
|
|
3096
|
+
* **Details**
|
|
2851
3097
|
*
|
|
2852
|
-
*
|
|
2853
|
-
*
|
|
2854
|
-
*
|
|
3098
|
+
* Negative edge weights are allowed. Returns `Option.none()` when the target is
|
|
3099
|
+
* unreachable or when a negative cycle affects the path to the target. Throws a
|
|
3100
|
+
* `GraphError` when either endpoint is missing.
|
|
3101
|
+
*
|
|
3102
|
+
* **Example** (Finding shortest paths with Bellman-Ford)
|
|
2855
3103
|
*
|
|
2856
|
-
* @example
|
|
2857
3104
|
* ```ts
|
|
2858
3105
|
* import { Graph } from "effect"
|
|
2859
3106
|
*
|
|
@@ -2878,19 +3125,22 @@ export declare const bellmanFord: {
|
|
|
2878
3125
|
* }
|
|
2879
3126
|
* ```
|
|
2880
3127
|
*
|
|
2881
|
-
* @since 4.0.0
|
|
2882
3128
|
* @category algorithms
|
|
3129
|
+
* @since 4.0.0
|
|
2883
3130
|
*/
|
|
2884
3131
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config: BellmanFordConfig<E>): Option.Option<PathResult<E>>;
|
|
2885
3132
|
};
|
|
2886
3133
|
/**
|
|
2887
|
-
*
|
|
3134
|
+
* Iterable wrapper used by graph traversal and listing APIs.
|
|
3135
|
+
*
|
|
3136
|
+
* **Details**
|
|
2888
3137
|
*
|
|
2889
|
-
*
|
|
2890
|
-
*
|
|
2891
|
-
*
|
|
3138
|
+
* A `Walker` yields `[index, data]` pairs lazily and can be viewed as just the
|
|
3139
|
+
* indices, just the values, or mapped entries with `indices`, `values`,
|
|
3140
|
+
* `entries`, and `visit`.
|
|
3141
|
+
*
|
|
3142
|
+
* **Example** (Working with node walkers)
|
|
2892
3143
|
*
|
|
2893
|
-
* @example
|
|
2894
3144
|
* ```ts
|
|
2895
3145
|
* import { Graph } from "effect"
|
|
2896
3146
|
*
|
|
@@ -2914,8 +3164,8 @@ export declare const bellmanFord: {
|
|
|
2914
3164
|
* const nodeEntries = Array.from(Graph.entries(allNodes)) // [[0, "A"], [1, "B"]]
|
|
2915
3165
|
* ```
|
|
2916
3166
|
*
|
|
2917
|
-
* @since 4.0.0
|
|
2918
3167
|
* @category models
|
|
3168
|
+
* @since 4.0.0
|
|
2919
3169
|
*/
|
|
2920
3170
|
export declare class Walker<T, N> implements Iterable<[T, N]> {
|
|
2921
3171
|
readonly [Symbol.iterator]: () => Iterator<[T, N]>;
|
|
@@ -2926,7 +3176,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
|
|
|
2926
3176
|
* and returns an iterable of the mapped values. Skips elements that
|
|
2927
3177
|
* no longer exist in the graph.
|
|
2928
3178
|
*
|
|
2929
|
-
*
|
|
3179
|
+
* **Example** (Visiting walker elements)
|
|
3180
|
+
*
|
|
2930
3181
|
* ```ts
|
|
2931
3182
|
* import { Graph } from "effect"
|
|
2932
3183
|
*
|
|
@@ -2949,8 +3200,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
|
|
|
2949
3200
|
* console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }]
|
|
2950
3201
|
* ```
|
|
2951
3202
|
*
|
|
2952
|
-
* @since 4.0.0
|
|
2953
3203
|
* @category iterators
|
|
3204
|
+
* @since 4.0.0
|
|
2954
3205
|
*/
|
|
2955
3206
|
readonly visit: <U>(f: (index: T, data: N) => U) => Iterable<U>;
|
|
2956
3207
|
constructor(
|
|
@@ -2961,7 +3212,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
|
|
|
2961
3212
|
* and returns an iterable of the mapped values. Skips elements that
|
|
2962
3213
|
* no longer exist in the graph.
|
|
2963
3214
|
*
|
|
2964
|
-
*
|
|
3215
|
+
* **Example** (Visiting walker elements)
|
|
3216
|
+
*
|
|
2965
3217
|
* ```ts
|
|
2966
3218
|
* import { Graph } from "effect"
|
|
2967
3219
|
*
|
|
@@ -2984,8 +3236,8 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
|
|
|
2984
3236
|
* console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }]
|
|
2985
3237
|
* ```
|
|
2986
3238
|
*
|
|
2987
|
-
* @since 4.0.0
|
|
2988
3239
|
* @category iterators
|
|
3240
|
+
* @since 4.0.0
|
|
2989
3241
|
*/
|
|
2990
3242
|
visit: <U>(f: (index: T, data: N) => U) => Iterable<U>);
|
|
2991
3243
|
}
|
|
@@ -2993,22 +3245,23 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
|
|
|
2993
3245
|
* Type alias for node iteration using Walker.
|
|
2994
3246
|
* NodeWalker is represented as Walker<NodeIndex, N>.
|
|
2995
3247
|
*
|
|
2996
|
-
* @since 4.0.0
|
|
2997
3248
|
* @category models
|
|
3249
|
+
* @since 4.0.0
|
|
2998
3250
|
*/
|
|
2999
3251
|
export type NodeWalker<N> = Walker<NodeIndex, N>;
|
|
3000
3252
|
/**
|
|
3001
3253
|
* Type alias for edge iteration using Walker.
|
|
3002
3254
|
* EdgeWalker is represented as Walker<EdgeIndex, Edge<E>>.
|
|
3003
3255
|
*
|
|
3004
|
-
* @since 4.0.0
|
|
3005
3256
|
* @category models
|
|
3257
|
+
* @since 4.0.0
|
|
3006
3258
|
*/
|
|
3007
3259
|
export type EdgeWalker<E> = Walker<EdgeIndex, Edge<E>>;
|
|
3008
3260
|
/**
|
|
3009
3261
|
* Returns an iterator over the indices in the walker.
|
|
3010
3262
|
*
|
|
3011
|
-
*
|
|
3263
|
+
* **Example** (Iterating walker indices)
|
|
3264
|
+
*
|
|
3012
3265
|
* ```ts
|
|
3013
3266
|
* import { Graph } from "effect"
|
|
3014
3267
|
*
|
|
@@ -3023,14 +3276,15 @@ export type EdgeWalker<E> = Walker<EdgeIndex, Edge<E>>;
|
|
|
3023
3276
|
* console.log(indices) // [0, 1]
|
|
3024
3277
|
* ```
|
|
3025
3278
|
*
|
|
3026
|
-
* @since 4.0.0
|
|
3027
3279
|
* @category utilities
|
|
3280
|
+
* @since 4.0.0
|
|
3028
3281
|
*/
|
|
3029
3282
|
export declare const indices: <T, N>(walker: Walker<T, N>) => Iterable<T>;
|
|
3030
3283
|
/**
|
|
3031
3284
|
* Returns an iterator over the values (data) in the walker.
|
|
3032
3285
|
*
|
|
3033
|
-
*
|
|
3286
|
+
* **Example** (Iterating walker values)
|
|
3287
|
+
*
|
|
3034
3288
|
* ```ts
|
|
3035
3289
|
* import { Graph } from "effect"
|
|
3036
3290
|
*
|
|
@@ -3045,14 +3299,15 @@ export declare const indices: <T, N>(walker: Walker<T, N>) => Iterable<T>;
|
|
|
3045
3299
|
* console.log(values) // ["A", "B"]
|
|
3046
3300
|
* ```
|
|
3047
3301
|
*
|
|
3048
|
-
* @since 4.0.0
|
|
3049
3302
|
* @category utilities
|
|
3303
|
+
* @since 4.0.0
|
|
3050
3304
|
*/
|
|
3051
3305
|
export declare const values: <T, N>(walker: Walker<T, N>) => Iterable<N>;
|
|
3052
3306
|
/**
|
|
3053
3307
|
* Returns an iterator over [index, data] entries in the walker.
|
|
3054
3308
|
*
|
|
3055
|
-
*
|
|
3309
|
+
* **Example** (Iterating walker entries)
|
|
3310
|
+
*
|
|
3056
3311
|
* ```ts
|
|
3057
3312
|
* import { Graph } from "effect"
|
|
3058
3313
|
*
|
|
@@ -3067,27 +3322,38 @@ export declare const values: <T, N>(walker: Walker<T, N>) => Iterable<N>;
|
|
|
3067
3322
|
* console.log(entries) // [[0, "A"], [1, "B"]]
|
|
3068
3323
|
* ```
|
|
3069
3324
|
*
|
|
3070
|
-
* @since 4.0.0
|
|
3071
3325
|
* @category utilities
|
|
3326
|
+
* @since 4.0.0
|
|
3072
3327
|
*/
|
|
3073
3328
|
export declare const entries: <T, N>(walker: Walker<T, N>) => Iterable<[T, N]>;
|
|
3074
3329
|
/**
|
|
3075
|
-
* Configuration
|
|
3330
|
+
* Configuration for DFS, BFS, and postorder graph traversals.
|
|
3331
|
+
*
|
|
3332
|
+
* **Details**
|
|
3333
|
+
*
|
|
3334
|
+
* `start` supplies the node indices where traversal begins. If it is omitted,
|
|
3335
|
+
* the iterator is empty. `direction` chooses whether traversal follows
|
|
3336
|
+
* outgoing or incoming edges.
|
|
3076
3337
|
*
|
|
3077
|
-
* @since 4.0.0
|
|
3078
3338
|
* @category models
|
|
3339
|
+
* @since 4.0.0
|
|
3079
3340
|
*/
|
|
3080
3341
|
export interface SearchConfig {
|
|
3081
3342
|
readonly start?: Array<NodeIndex>;
|
|
3082
3343
|
readonly direction?: Direction;
|
|
3083
3344
|
}
|
|
3084
3345
|
/**
|
|
3085
|
-
* Creates a
|
|
3346
|
+
* Creates a lazy depth-first traversal iterator from the configured start
|
|
3347
|
+
* nodes.
|
|
3086
3348
|
*
|
|
3087
|
-
*
|
|
3088
|
-
*
|
|
3349
|
+
* **Details**
|
|
3350
|
+
*
|
|
3351
|
+
* If no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3352
|
+
* chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
|
|
3353
|
+
* if any configured start node does not exist.
|
|
3354
|
+
*
|
|
3355
|
+
* **Example** (Traversing depth-first)
|
|
3089
3356
|
*
|
|
3090
|
-
* @example
|
|
3091
3357
|
* ```ts
|
|
3092
3358
|
* import { Graph } from "effect"
|
|
3093
3359
|
*
|
|
@@ -3110,17 +3376,22 @@ export interface SearchConfig {
|
|
|
3110
3376
|
* // Can be used programmatically
|
|
3111
3377
|
* ```
|
|
3112
3378
|
*
|
|
3113
|
-
* @since 4.0.0
|
|
3114
3379
|
* @category iterators
|
|
3380
|
+
* @since 4.0.0
|
|
3115
3381
|
*/
|
|
3116
3382
|
export declare const dfs: {
|
|
3117
3383
|
/**
|
|
3118
|
-
* Creates a
|
|
3384
|
+
* Creates a lazy depth-first traversal iterator from the configured start
|
|
3385
|
+
* nodes.
|
|
3386
|
+
*
|
|
3387
|
+
* **Details**
|
|
3119
3388
|
*
|
|
3120
|
-
*
|
|
3121
|
-
*
|
|
3389
|
+
* If no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3390
|
+
* chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
|
|
3391
|
+
* if any configured start node does not exist.
|
|
3392
|
+
*
|
|
3393
|
+
* **Example** (Traversing depth-first)
|
|
3122
3394
|
*
|
|
3123
|
-
* @example
|
|
3124
3395
|
* ```ts
|
|
3125
3396
|
* import { Graph } from "effect"
|
|
3126
3397
|
*
|
|
@@ -3143,17 +3414,22 @@ export declare const dfs: {
|
|
|
3143
3414
|
* // Can be used programmatically
|
|
3144
3415
|
* ```
|
|
3145
3416
|
*
|
|
3146
|
-
* @since 4.0.0
|
|
3147
3417
|
* @category iterators
|
|
3418
|
+
* @since 4.0.0
|
|
3148
3419
|
*/
|
|
3149
3420
|
(config?: SearchConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
|
|
3150
3421
|
/**
|
|
3151
|
-
* Creates a
|
|
3422
|
+
* Creates a lazy depth-first traversal iterator from the configured start
|
|
3423
|
+
* nodes.
|
|
3424
|
+
*
|
|
3425
|
+
* **Details**
|
|
3426
|
+
*
|
|
3427
|
+
* If no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3428
|
+
* chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
|
|
3429
|
+
* if any configured start node does not exist.
|
|
3152
3430
|
*
|
|
3153
|
-
*
|
|
3154
|
-
* It provides lazy evaluation of the depth-first search.
|
|
3431
|
+
* **Example** (Traversing depth-first)
|
|
3155
3432
|
*
|
|
3156
|
-
* @example
|
|
3157
3433
|
* ```ts
|
|
3158
3434
|
* import { Graph } from "effect"
|
|
3159
3435
|
*
|
|
@@ -3176,18 +3452,23 @@ export declare const dfs: {
|
|
|
3176
3452
|
* // Can be used programmatically
|
|
3177
3453
|
* ```
|
|
3178
3454
|
*
|
|
3179
|
-
* @since 4.0.0
|
|
3180
3455
|
* @category iterators
|
|
3456
|
+
* @since 4.0.0
|
|
3181
3457
|
*/
|
|
3182
3458
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: SearchConfig): NodeWalker<N>;
|
|
3183
3459
|
};
|
|
3184
3460
|
/**
|
|
3185
|
-
* Creates a
|
|
3461
|
+
* Creates a lazy breadth-first traversal iterator from the configured start
|
|
3462
|
+
* nodes.
|
|
3463
|
+
*
|
|
3464
|
+
* **Details**
|
|
3186
3465
|
*
|
|
3187
|
-
*
|
|
3188
|
-
*
|
|
3466
|
+
* If no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3467
|
+
* chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
|
|
3468
|
+
* if any configured start node does not exist.
|
|
3469
|
+
*
|
|
3470
|
+
* **Example** (Traversing breadth-first)
|
|
3189
3471
|
*
|
|
3190
|
-
* @example
|
|
3191
3472
|
* ```ts
|
|
3192
3473
|
* import { Graph } from "effect"
|
|
3193
3474
|
*
|
|
@@ -3210,17 +3491,22 @@ export declare const dfs: {
|
|
|
3210
3491
|
* // Can be used programmatically
|
|
3211
3492
|
* ```
|
|
3212
3493
|
*
|
|
3213
|
-
* @since 4.0.0
|
|
3214
3494
|
* @category iterators
|
|
3495
|
+
* @since 4.0.0
|
|
3215
3496
|
*/
|
|
3216
3497
|
export declare const bfs: {
|
|
3217
3498
|
/**
|
|
3218
|
-
* Creates a
|
|
3499
|
+
* Creates a lazy breadth-first traversal iterator from the configured start
|
|
3500
|
+
* nodes.
|
|
3219
3501
|
*
|
|
3220
|
-
*
|
|
3221
|
-
*
|
|
3502
|
+
* **Details**
|
|
3503
|
+
*
|
|
3504
|
+
* If no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3505
|
+
* chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
|
|
3506
|
+
* if any configured start node does not exist.
|
|
3507
|
+
*
|
|
3508
|
+
* **Example** (Traversing breadth-first)
|
|
3222
3509
|
*
|
|
3223
|
-
* @example
|
|
3224
3510
|
* ```ts
|
|
3225
3511
|
* import { Graph } from "effect"
|
|
3226
3512
|
*
|
|
@@ -3243,17 +3529,22 @@ export declare const bfs: {
|
|
|
3243
3529
|
* // Can be used programmatically
|
|
3244
3530
|
* ```
|
|
3245
3531
|
*
|
|
3246
|
-
* @since 4.0.0
|
|
3247
3532
|
* @category iterators
|
|
3533
|
+
* @since 4.0.0
|
|
3248
3534
|
*/
|
|
3249
3535
|
(config?: SearchConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
|
|
3250
3536
|
/**
|
|
3251
|
-
* Creates a
|
|
3537
|
+
* Creates a lazy breadth-first traversal iterator from the configured start
|
|
3538
|
+
* nodes.
|
|
3252
3539
|
*
|
|
3253
|
-
*
|
|
3254
|
-
*
|
|
3540
|
+
* **Details**
|
|
3541
|
+
*
|
|
3542
|
+
* If no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3543
|
+
* chooses whether to follow outgoing or incoming edges. Throws a `GraphError`
|
|
3544
|
+
* if any configured start node does not exist.
|
|
3545
|
+
*
|
|
3546
|
+
* **Example** (Traversing breadth-first)
|
|
3255
3547
|
*
|
|
3256
|
-
* @example
|
|
3257
3548
|
* ```ts
|
|
3258
3549
|
* import { Graph } from "effect"
|
|
3259
3550
|
*
|
|
@@ -3276,16 +3567,22 @@ export declare const bfs: {
|
|
|
3276
3567
|
* // Can be used programmatically
|
|
3277
3568
|
* ```
|
|
3278
3569
|
*
|
|
3279
|
-
* @since 4.0.0
|
|
3280
3570
|
* @category iterators
|
|
3571
|
+
* @since 4.0.0
|
|
3281
3572
|
*/
|
|
3282
3573
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: SearchConfig): NodeWalker<N>;
|
|
3283
3574
|
};
|
|
3284
3575
|
/**
|
|
3285
|
-
* Configuration
|
|
3576
|
+
* Configuration for the topological sort iterator.
|
|
3577
|
+
*
|
|
3578
|
+
* **Details**
|
|
3579
|
+
*
|
|
3580
|
+
* `initials` optionally supplies the node indices used as initial queue
|
|
3581
|
+
* entries. When omitted, topological sorting starts from all nodes with zero
|
|
3582
|
+
* in-degree.
|
|
3286
3583
|
*
|
|
3287
|
-
* @since 4.0.0
|
|
3288
3584
|
* @category models
|
|
3585
|
+
* @since 4.0.0
|
|
3289
3586
|
*/
|
|
3290
3587
|
export interface TopoConfig {
|
|
3291
3588
|
readonly initials?: Array<NodeIndex>;
|
|
@@ -3296,7 +3593,8 @@ export interface TopoConfig {
|
|
|
3296
3593
|
* The iterator uses Kahn's algorithm to lazily produce nodes in topological order.
|
|
3297
3594
|
* Throws an error if the graph contains cycles.
|
|
3298
3595
|
*
|
|
3299
|
-
*
|
|
3596
|
+
* **Example** (Sorting topologically)
|
|
3597
|
+
*
|
|
3300
3598
|
* ```ts
|
|
3301
3599
|
* import { Graph } from "effect"
|
|
3302
3600
|
*
|
|
@@ -3317,7 +3615,7 @@ export interface TopoConfig {
|
|
|
3317
3615
|
* // With initial nodes
|
|
3318
3616
|
* const topo2 = Graph.topo(graph, { initials: [0] })
|
|
3319
3617
|
*
|
|
3320
|
-
* //
|
|
3618
|
+
* // Check before sorting a cyclic graph
|
|
3321
3619
|
* const cyclicGraph = Graph.directed<string, number>((mutable) => {
|
|
3322
3620
|
* const a = Graph.addNode(mutable, "A")
|
|
3323
3621
|
* const b = Graph.addNode(mutable, "B")
|
|
@@ -3325,15 +3623,13 @@ export interface TopoConfig {
|
|
|
3325
3623
|
* Graph.addEdge(mutable, b, a, 2) // Creates cycle
|
|
3326
3624
|
* })
|
|
3327
3625
|
*
|
|
3328
|
-
*
|
|
3329
|
-
*
|
|
3330
|
-
* } catch (error) {
|
|
3331
|
-
* console.log((error as Error).message)
|
|
3626
|
+
* if (!Graph.isAcyclic(cyclicGraph)) {
|
|
3627
|
+
* console.log("cyclic graph") // cyclic graph
|
|
3332
3628
|
* }
|
|
3333
3629
|
* ```
|
|
3334
3630
|
*
|
|
3335
|
-
* @since 4.0.0
|
|
3336
3631
|
* @category iterators
|
|
3632
|
+
* @since 4.0.0
|
|
3337
3633
|
*/
|
|
3338
3634
|
export declare const topo: {
|
|
3339
3635
|
/**
|
|
@@ -3342,7 +3638,8 @@ export declare const topo: {
|
|
|
3342
3638
|
* The iterator uses Kahn's algorithm to lazily produce nodes in topological order.
|
|
3343
3639
|
* Throws an error if the graph contains cycles.
|
|
3344
3640
|
*
|
|
3345
|
-
*
|
|
3641
|
+
* **Example** (Sorting topologically)
|
|
3642
|
+
*
|
|
3346
3643
|
* ```ts
|
|
3347
3644
|
* import { Graph } from "effect"
|
|
3348
3645
|
*
|
|
@@ -3363,7 +3660,7 @@ export declare const topo: {
|
|
|
3363
3660
|
* // With initial nodes
|
|
3364
3661
|
* const topo2 = Graph.topo(graph, { initials: [0] })
|
|
3365
3662
|
*
|
|
3366
|
-
* //
|
|
3663
|
+
* // Check before sorting a cyclic graph
|
|
3367
3664
|
* const cyclicGraph = Graph.directed<string, number>((mutable) => {
|
|
3368
3665
|
* const a = Graph.addNode(mutable, "A")
|
|
3369
3666
|
* const b = Graph.addNode(mutable, "B")
|
|
@@ -3371,15 +3668,13 @@ export declare const topo: {
|
|
|
3371
3668
|
* Graph.addEdge(mutable, b, a, 2) // Creates cycle
|
|
3372
3669
|
* })
|
|
3373
3670
|
*
|
|
3374
|
-
*
|
|
3375
|
-
*
|
|
3376
|
-
* } catch (error) {
|
|
3377
|
-
* console.log((error as Error).message)
|
|
3671
|
+
* if (!Graph.isAcyclic(cyclicGraph)) {
|
|
3672
|
+
* console.log("cyclic graph") // cyclic graph
|
|
3378
3673
|
* }
|
|
3379
3674
|
* ```
|
|
3380
3675
|
*
|
|
3381
|
-
* @since 4.0.0
|
|
3382
3676
|
* @category iterators
|
|
3677
|
+
* @since 4.0.0
|
|
3383
3678
|
*/
|
|
3384
3679
|
(config?: TopoConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
|
|
3385
3680
|
/**
|
|
@@ -3388,7 +3683,8 @@ export declare const topo: {
|
|
|
3388
3683
|
* The iterator uses Kahn's algorithm to lazily produce nodes in topological order.
|
|
3389
3684
|
* Throws an error if the graph contains cycles.
|
|
3390
3685
|
*
|
|
3391
|
-
*
|
|
3686
|
+
* **Example** (Sorting topologically)
|
|
3687
|
+
*
|
|
3392
3688
|
* ```ts
|
|
3393
3689
|
* import { Graph } from "effect"
|
|
3394
3690
|
*
|
|
@@ -3409,7 +3705,7 @@ export declare const topo: {
|
|
|
3409
3705
|
* // With initial nodes
|
|
3410
3706
|
* const topo2 = Graph.topo(graph, { initials: [0] })
|
|
3411
3707
|
*
|
|
3412
|
-
* //
|
|
3708
|
+
* // Check before sorting a cyclic graph
|
|
3413
3709
|
* const cyclicGraph = Graph.directed<string, number>((mutable) => {
|
|
3414
3710
|
* const a = Graph.addNode(mutable, "A")
|
|
3415
3711
|
* const b = Graph.addNode(mutable, "B")
|
|
@@ -3417,26 +3713,28 @@ export declare const topo: {
|
|
|
3417
3713
|
* Graph.addEdge(mutable, b, a, 2) // Creates cycle
|
|
3418
3714
|
* })
|
|
3419
3715
|
*
|
|
3420
|
-
*
|
|
3421
|
-
*
|
|
3422
|
-
* } catch (error) {
|
|
3423
|
-
* console.log((error as Error).message)
|
|
3716
|
+
* if (!Graph.isAcyclic(cyclicGraph)) {
|
|
3717
|
+
* console.log("cyclic graph") // cyclic graph
|
|
3424
3718
|
* }
|
|
3425
3719
|
* ```
|
|
3426
3720
|
*
|
|
3427
|
-
* @since 4.0.0
|
|
3428
3721
|
* @category iterators
|
|
3722
|
+
* @since 4.0.0
|
|
3429
3723
|
*/
|
|
3430
3724
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: TopoConfig): NodeWalker<N>;
|
|
3431
3725
|
};
|
|
3432
3726
|
/**
|
|
3433
|
-
* Creates a
|
|
3727
|
+
* Creates a lazy depth-first postorder traversal iterator from the configured
|
|
3728
|
+
* start nodes.
|
|
3729
|
+
*
|
|
3730
|
+
* **Details**
|
|
3731
|
+
*
|
|
3732
|
+
* Nodes are emitted after their reachable descendants have been processed. If
|
|
3733
|
+
* no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3734
|
+
* chooses whether to follow outgoing or incoming edges.
|
|
3434
3735
|
*
|
|
3435
|
-
*
|
|
3436
|
-
* in postorder (after all descendants have been processed). Essential for
|
|
3437
|
-
* dependency resolution and tree destruction algorithms.
|
|
3736
|
+
* **Example** (Traversing in postorder)
|
|
3438
3737
|
*
|
|
3439
|
-
* @example
|
|
3440
3738
|
* ```ts
|
|
3441
3739
|
* import { Graph } from "effect"
|
|
3442
3740
|
*
|
|
@@ -3455,18 +3753,22 @@ export declare const topo: {
|
|
|
3455
3753
|
* }
|
|
3456
3754
|
* ```
|
|
3457
3755
|
*
|
|
3458
|
-
* @since 4.0.0
|
|
3459
3756
|
* @category iterators
|
|
3757
|
+
* @since 4.0.0
|
|
3460
3758
|
*/
|
|
3461
3759
|
export declare const dfsPostOrder: {
|
|
3462
3760
|
/**
|
|
3463
|
-
* Creates a
|
|
3761
|
+
* Creates a lazy depth-first postorder traversal iterator from the configured
|
|
3762
|
+
* start nodes.
|
|
3763
|
+
*
|
|
3764
|
+
* **Details**
|
|
3464
3765
|
*
|
|
3465
|
-
*
|
|
3466
|
-
*
|
|
3467
|
-
*
|
|
3766
|
+
* Nodes are emitted after their reachable descendants have been processed. If
|
|
3767
|
+
* no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3768
|
+
* chooses whether to follow outgoing or incoming edges.
|
|
3769
|
+
*
|
|
3770
|
+
* **Example** (Traversing in postorder)
|
|
3468
3771
|
*
|
|
3469
|
-
* @example
|
|
3470
3772
|
* ```ts
|
|
3471
3773
|
* import { Graph } from "effect"
|
|
3472
3774
|
*
|
|
@@ -3485,18 +3787,22 @@ export declare const dfsPostOrder: {
|
|
|
3485
3787
|
* }
|
|
3486
3788
|
* ```
|
|
3487
3789
|
*
|
|
3488
|
-
* @since 4.0.0
|
|
3489
3790
|
* @category iterators
|
|
3791
|
+
* @since 4.0.0
|
|
3490
3792
|
*/
|
|
3491
3793
|
(config?: SearchConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
|
|
3492
3794
|
/**
|
|
3493
|
-
* Creates a
|
|
3795
|
+
* Creates a lazy depth-first postorder traversal iterator from the configured
|
|
3796
|
+
* start nodes.
|
|
3797
|
+
*
|
|
3798
|
+
* **Details**
|
|
3494
3799
|
*
|
|
3495
|
-
*
|
|
3496
|
-
*
|
|
3497
|
-
*
|
|
3800
|
+
* Nodes are emitted after their reachable descendants have been processed. If
|
|
3801
|
+
* no start nodes are supplied, the iterator is empty. The `direction` option
|
|
3802
|
+
* chooses whether to follow outgoing or incoming edges.
|
|
3803
|
+
*
|
|
3804
|
+
* **Example** (Traversing in postorder)
|
|
3498
3805
|
*
|
|
3499
|
-
* @example
|
|
3500
3806
|
* ```ts
|
|
3501
3807
|
* import { Graph } from "effect"
|
|
3502
3808
|
*
|
|
@@ -3515,8 +3821,8 @@ export declare const dfsPostOrder: {
|
|
|
3515
3821
|
* }
|
|
3516
3822
|
* ```
|
|
3517
3823
|
*
|
|
3518
|
-
* @since 4.0.0
|
|
3519
3824
|
* @category iterators
|
|
3825
|
+
* @since 4.0.0
|
|
3520
3826
|
*/
|
|
3521
3827
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: SearchConfig): NodeWalker<N>;
|
|
3522
3828
|
};
|
|
@@ -3526,7 +3832,8 @@ export declare const dfsPostOrder: {
|
|
|
3526
3832
|
* The iterator produces node indices in the order they were added to the graph.
|
|
3527
3833
|
* This provides access to all nodes regardless of connectivity.
|
|
3528
3834
|
*
|
|
3529
|
-
*
|
|
3835
|
+
* **Example** (Iterating all nodes)
|
|
3836
|
+
*
|
|
3530
3837
|
* ```ts
|
|
3531
3838
|
* import { Graph } from "effect"
|
|
3532
3839
|
*
|
|
@@ -3541,8 +3848,8 @@ export declare const dfsPostOrder: {
|
|
|
3541
3848
|
* console.log(indices) // [0, 1, 2]
|
|
3542
3849
|
* ```
|
|
3543
3850
|
*
|
|
3544
|
-
* @since 4.0.0
|
|
3545
3851
|
* @category iterators
|
|
3852
|
+
* @since 4.0.0
|
|
3546
3853
|
*/
|
|
3547
3854
|
export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
|
|
3548
3855
|
/**
|
|
@@ -3551,7 +3858,8 @@ export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N,
|
|
|
3551
3858
|
* The iterator produces edge indices in the order they were added to the graph.
|
|
3552
3859
|
* This provides access to all edges regardless of connectivity.
|
|
3553
3860
|
*
|
|
3554
|
-
*
|
|
3861
|
+
* **Example** (Iterating all edges)
|
|
3862
|
+
*
|
|
3555
3863
|
* ```ts
|
|
3556
3864
|
* import { Graph } from "effect"
|
|
3557
3865
|
*
|
|
@@ -3567,15 +3875,21 @@ export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N,
|
|
|
3567
3875
|
* console.log(indices) // [0, 1]
|
|
3568
3876
|
* ```
|
|
3569
3877
|
*
|
|
3570
|
-
* @since 4.0.0
|
|
3571
3878
|
* @category iterators
|
|
3879
|
+
* @since 4.0.0
|
|
3572
3880
|
*/
|
|
3573
3881
|
export declare const edges: <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => EdgeWalker<E>;
|
|
3574
3882
|
/**
|
|
3575
|
-
* Configuration for
|
|
3883
|
+
* Configuration for selecting external nodes.
|
|
3884
|
+
*
|
|
3885
|
+
* **Details**
|
|
3886
|
+
*
|
|
3887
|
+
* `direction` chooses which missing edge direction makes a node external:
|
|
3888
|
+
* `"outgoing"` selects nodes with no outgoing edges, and `"incoming"` selects
|
|
3889
|
+
* nodes with no incoming edges.
|
|
3576
3890
|
*
|
|
3577
|
-
* @since 4.0.0
|
|
3578
3891
|
* @category models
|
|
3892
|
+
* @since 4.0.0
|
|
3579
3893
|
*/
|
|
3580
3894
|
export interface ExternalsConfig {
|
|
3581
3895
|
readonly direction?: Direction;
|
|
@@ -3587,7 +3901,8 @@ export interface ExternalsConfig {
|
|
|
3587
3901
|
* no incoming edges (direction="incoming"). These are useful for finding
|
|
3588
3902
|
* sources, sinks, or isolated nodes.
|
|
3589
3903
|
*
|
|
3590
|
-
*
|
|
3904
|
+
* **Example** (Iterating external nodes)
|
|
3905
|
+
*
|
|
3591
3906
|
* ```ts
|
|
3592
3907
|
* import { Graph } from "effect"
|
|
3593
3908
|
*
|
|
@@ -3614,8 +3929,8 @@ export interface ExternalsConfig {
|
|
|
3614
3929
|
* console.log(sources) // [0, 3]
|
|
3615
3930
|
* ```
|
|
3616
3931
|
*
|
|
3617
|
-
* @since 4.0.0
|
|
3618
3932
|
* @category iterators
|
|
3933
|
+
* @since 4.0.0
|
|
3619
3934
|
*/
|
|
3620
3935
|
export declare const externals: {
|
|
3621
3936
|
/**
|
|
@@ -3625,7 +3940,8 @@ export declare const externals: {
|
|
|
3625
3940
|
* no incoming edges (direction="incoming"). These are useful for finding
|
|
3626
3941
|
* sources, sinks, or isolated nodes.
|
|
3627
3942
|
*
|
|
3628
|
-
*
|
|
3943
|
+
* **Example** (Iterating external nodes)
|
|
3944
|
+
*
|
|
3629
3945
|
* ```ts
|
|
3630
3946
|
* import { Graph } from "effect"
|
|
3631
3947
|
*
|
|
@@ -3652,8 +3968,8 @@ export declare const externals: {
|
|
|
3652
3968
|
* console.log(sources) // [0, 3]
|
|
3653
3969
|
* ```
|
|
3654
3970
|
*
|
|
3655
|
-
* @since 4.0.0
|
|
3656
3971
|
* @category iterators
|
|
3972
|
+
* @since 4.0.0
|
|
3657
3973
|
*/
|
|
3658
3974
|
(config?: ExternalsConfig): <N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>) => NodeWalker<N>;
|
|
3659
3975
|
/**
|
|
@@ -3663,7 +3979,8 @@ export declare const externals: {
|
|
|
3663
3979
|
* no incoming edges (direction="incoming"). These are useful for finding
|
|
3664
3980
|
* sources, sinks, or isolated nodes.
|
|
3665
3981
|
*
|
|
3666
|
-
*
|
|
3982
|
+
* **Example** (Iterating external nodes)
|
|
3983
|
+
*
|
|
3667
3984
|
* ```ts
|
|
3668
3985
|
* import { Graph } from "effect"
|
|
3669
3986
|
*
|
|
@@ -3690,8 +4007,8 @@ export declare const externals: {
|
|
|
3690
4007
|
* console.log(sources) // [0, 3]
|
|
3691
4008
|
* ```
|
|
3692
4009
|
*
|
|
3693
|
-
* @since 4.0.0
|
|
3694
4010
|
* @category iterators
|
|
4011
|
+
* @since 4.0.0
|
|
3695
4012
|
*/
|
|
3696
4013
|
<N, E, T extends Kind = "directed">(graph: Graph<N, E, T> | MutableGraph<N, E, T>, config?: ExternalsConfig): NodeWalker<N>;
|
|
3697
4014
|
};
|