effect 4.0.0-beta.65 → 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 +77 -65
- 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 +5 -4
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +9 -8
- 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 +386 -138
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +144 -62
- 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 +875 -444
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +376 -217
- 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 +2445 -2356
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +906 -758
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +38 -3
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -3
- 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 +96 -12
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +21 -6
- 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 +119 -58
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +122 -40
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +288 -160
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +176 -74
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +93 -52
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +97 -34
- 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 +262 -181
- 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 +58 -14
- 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 +38 -53
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +87 -11
- 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 +26 -16
- 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 +261 -247
- 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 +815 -294
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +287 -193
- 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 +24 -11
- 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/SchemaRepresentation.d.ts +2 -2
- 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 +1899 -1186
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +868 -525
- 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 +35 -20
- 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/concurrency.js +2 -2
- package/dist/internal/concurrency.js.map +1 -1
- package/dist/internal/core.js +8 -20
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +20 -19
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/executionPlan.js +2 -2
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/option.js +5 -8
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/result.js +5 -8
- package/dist/internal/result.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 +36 -30
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +21 -15
- 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 +65 -17
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +13 -7
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +11 -9
- 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 +33 -42
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +35 -36
- 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 +218 -117
- 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 +42 -14
- 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 +161 -99
- 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 +178 -47
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +111 -31
- 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 +7 -7
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +12 -10
- 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 +36 -3
- 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 +78 -13
- 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 +71 -11
- 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 +67 -10
- 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 +96 -22
- 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 +100 -22
- 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 +85 -39
- 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 +153 -47
- 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 +70 -31
- 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 +35 -4
- 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 +122 -28
- 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 +77 -12
- 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 +112 -31
- 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 +209 -38
- 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 +130 -20
- 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 +47 -9
- 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 +43 -7
- 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 +113 -22
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -6
- 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 +9 -2
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +28 -3
- 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 +82 -17
- 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 +89 -109
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +74 -23
- 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 +256 -62
- 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 +53 -13
- 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 +70 -23
- 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 +17 -5
- 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 +124 -29
- 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 +45 -5
- 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 +21 -6
- 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 +145 -0
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -0
- package/dist/unstable/workflow/DurableQueue.js +200 -0
- package/dist/unstable/workflow/DurableQueue.js.map +1 -0
- 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 +76 -20
- 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/dist/unstable/workflow/index.d.ts +4 -0
- package/dist/unstable/workflow/index.d.ts.map +1 -1
- package/dist/unstable/workflow/index.js +4 -0
- package/dist/unstable/workflow/index.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 +77 -65
- 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 +12 -10
- package/src/ConfigProvider.ts +1 -1
- package/src/Console.ts +88 -58
- package/src/Context.ts +397 -149
- package/src/Cron.ts +111 -48
- package/src/Data.ts +3 -2
- package/src/DateTime.ts +876 -445
- package/src/Deferred.ts +367 -174
- package/src/Differ.ts +42 -0
- package/src/Duration.ts +329 -185
- package/src/Effect.ts +2474 -2395
- package/src/Effectable.ts +39 -4
- package/src/Encoding.ts +78 -28
- package/src/Equivalence.ts +14 -19
- package/src/ErrorReporter.ts +66 -82
- package/src/ExecutionPlan.ts +97 -13
- package/src/Exit.ts +7 -5
- package/src/Fiber.ts +72 -40
- package/src/FiberHandle.ts +158 -58
- package/src/FiberMap.ts +329 -164
- package/src/FiberSet.ts +130 -52
- 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 +488 -345
- package/src/LayerMap.ts +98 -25
- 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 +41 -53
- 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 +31 -18
- package/src/Runtime.ts +45 -19
- package/src/Schedule.ts +575 -600
- package/src/Scheduler.ts +43 -6
- package/src/Schema.ts +845 -319
- package/src/SchemaAST.ts +25 -16
- package/src/SchemaGetter.ts +32 -17
- 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 +2043 -1256
- 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 +70 -41
- 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/concurrency.ts +2 -2
- package/src/internal/core.ts +12 -23
- package/src/internal/effect.ts +25 -29
- package/src/internal/executionPlan.ts +2 -2
- package/src/internal/option.ts +5 -8
- package/src/internal/result.ts +5 -8
- 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 +47 -46
- package/src/unstable/ai/McpSchema.ts +339 -119
- package/src/unstable/ai/McpServer.ts +78 -21
- package/src/unstable/ai/Model.ts +23 -18
- 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 +81 -84
- 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 +225 -125
- package/src/unstable/cli/Completions.ts +7 -7
- package/src/unstable/cli/Flag.ts +235 -142
- package/src/unstable/cli/GlobalFlag.ts +42 -14
- package/src/unstable/cli/HelpDoc.ts +35 -10
- package/src/unstable/cli/Param.ts +328 -190
- package/src/unstable/cli/Primitive.ts +79 -42
- package/src/unstable/cli/Prompt.ts +210 -58
- package/src/unstable/cli/internal/ansi.ts +13 -0
- package/src/unstable/cli/internal/command.ts +17 -15
- 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 +36 -3
- package/src/unstable/cluster/DeliverAt.ts +39 -4
- package/src/unstable/cluster/Entity.ts +110 -19
- 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 +128 -22
- 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 +76 -11
- 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 +130 -28
- package/src/unstable/http/HttpClient.ts +206 -97
- package/src/unstable/http/HttpClientError.ts +80 -12
- package/src/unstable/http/HttpClientRequest.ts +320 -102
- 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 +63 -16
- package/src/unstable/http/HttpPlatform.ts +35 -4
- package/src/unstable/http/HttpRouter.ts +221 -57
- package/src/unstable/http/HttpServer.ts +152 -23
- package/src/unstable/http/HttpServerError.ts +90 -10
- package/src/unstable/http/HttpServerRequest.ts +136 -32
- package/src/unstable/http/HttpServerRespondable.ts +49 -6
- package/src/unstable/http/HttpServerResponse.ts +395 -72
- package/src/unstable/http/HttpStaticServer.ts +22 -4
- package/src/unstable/http/HttpTraceContext.ts +53 -6
- package/src/unstable/http/Multipart.ts +179 -29
- 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 +86 -20
- package/src/unstable/httpapi/HttpApiClient.ts +80 -16
- 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 +113 -23
- 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 +31 -3
- 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 +98 -22
- package/src/unstable/persistence/Redis.ts +42 -5
- package/src/unstable/process/ChildProcess.ts +100 -79
- 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 +597 -143
- 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 +108 -20
- 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 +108 -25
- package/src/unstable/rpc/RpcTest.ts +20 -1
- package/src/unstable/rpc/RpcWorker.ts +42 -8
- 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 +168 -35
- package/src/unstable/socket/SocketServer.ts +58 -10
- package/src/unstable/sql/Migrator.ts +57 -5
- 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 +62 -11
- package/src/unstable/workflow/DurableClock.ts +26 -3
- package/src/unstable/workflow/DurableDeferred.ts +146 -31
- package/src/unstable/workflow/DurableQueue.ts +366 -0
- package/src/unstable/workflow/Workflow.ts +122 -32
- 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/src/unstable/workflow/index.ts +5 -0
package/dist/DateTime.d.ts
CHANGED
|
@@ -1,4 +1,53 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* The `DateTime` module provides immutable data types and utilities for working
|
|
3
|
+
* with instants, UTC date-times, zoned date-times, and time zones. A
|
|
4
|
+
* `DateTime` is always an absolute point in time, represented internally by
|
|
5
|
+
* epoch milliseconds, and may also carry a `TimeZone` for zone-aware calendar
|
|
6
|
+
* parts and formatting.
|
|
7
|
+
*
|
|
8
|
+
* **Mental model**
|
|
9
|
+
*
|
|
10
|
+
* - `DateTime` is a discriminated union: `Utc | Zoned`
|
|
11
|
+
* - `Utc` stores an absolute instant without an associated time zone
|
|
12
|
+
* - `Zoned` stores the same kind of absolute instant plus a `TimeZone`
|
|
13
|
+
* - Time zones can be fixed offsets or named IANA zones such as `"Europe/Rome"`
|
|
14
|
+
* - Comparison and ordering use the instant, so two values in different zones
|
|
15
|
+
* can still be equivalent
|
|
16
|
+
* - Calendar parts and formatted output depend on whether you ask for UTC parts
|
|
17
|
+
* or zone-adjusted parts
|
|
18
|
+
*
|
|
19
|
+
* **Common tasks**
|
|
20
|
+
*
|
|
21
|
+
* - Construct values: {@link make}, {@link makeUnsafe}, {@link makeZoned}, {@link makeZonedUnsafe}
|
|
22
|
+
* - Get the current instant: {@link now}, {@link nowInCurrentZone}
|
|
23
|
+
* - Create time zones: {@link zoneMakeOffset}, {@link zoneMakeNamed}, {@link zoneFromString}
|
|
24
|
+
* - Attach or change zones: {@link setZone}, {@link setZoneNamed}, {@link setZoneCurrent}, {@link toUtc}
|
|
25
|
+
* - Convert to platform values or parts: {@link toDate}, {@link toDateUtc}, {@link toEpochMillis}, {@link toParts}, {@link toPartsUtc}
|
|
26
|
+
* - Compare and bound values: {@link Equivalence}, {@link Order}, {@link distance}, {@link min}, {@link max}, {@link clamp}, {@link between}
|
|
27
|
+
* - Transform values: {@link add}, {@link subtract}, {@link startOf}, {@link endOf}, {@link nearest}, {@link setParts}, {@link mutate}
|
|
28
|
+
* - Format values: {@link format}, {@link formatUtc}, {@link formatLocal}, {@link formatIntl}, {@link formatIso}, {@link formatIsoZoned}
|
|
29
|
+
* - Provide an application time zone: {@link CurrentTimeZone}, {@link withCurrentZone}, {@link layerCurrentZone}
|
|
30
|
+
*
|
|
31
|
+
* **Gotchas**
|
|
32
|
+
*
|
|
33
|
+
* - `make` and `makeZoned` return `Option`; unsafe constructors throw on invalid
|
|
34
|
+
* input
|
|
35
|
+
* - `DateTime` equality is instant-based, not display-time-based
|
|
36
|
+
* - `setZone` changes the zone used for local parts and formatting without
|
|
37
|
+
* changing the represented instant
|
|
38
|
+
* - Use `adjustForTimeZone` with {@link makeZoned} when input parts should be
|
|
39
|
+
* interpreted as wall-clock time in the target zone
|
|
40
|
+
* - Daylight-saving gaps and repeated local times are resolved with
|
|
41
|
+
* `Disambiguation`
|
|
42
|
+
* - Prefer the Clock-backed {@link now} and `CurrentTimeZone` services in
|
|
43
|
+
* Effect workflows; unsafe helpers read from the host environment directly
|
|
44
|
+
*
|
|
45
|
+
* **See also**
|
|
46
|
+
*
|
|
47
|
+
* - {@link DateTime} for the UTC/zoned data model
|
|
48
|
+
* - {@link TimeZone} for offset and named time-zone values
|
|
49
|
+
* - {@link Disambiguation} for daylight-saving ambiguity handling
|
|
50
|
+
*
|
|
2
51
|
* @since 3.6.0
|
|
3
52
|
*/
|
|
4
53
|
import type { IllegalArgumentError } from "./Cause.ts";
|
|
@@ -18,13 +67,18 @@ declare const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
|
18
67
|
* A `DateTime` represents a point in time. It can optionally have a time zone
|
|
19
68
|
* associated with it.
|
|
20
69
|
*
|
|
21
|
-
* @since 3.6.0
|
|
22
70
|
* @category models
|
|
71
|
+
* @since 3.6.0
|
|
23
72
|
*/
|
|
24
73
|
export type DateTime = Utc | Zoned;
|
|
25
74
|
/**
|
|
26
|
-
*
|
|
75
|
+
* Represents a `DateTime` stored as an absolute UTC instant with no associated
|
|
76
|
+
* time zone.
|
|
77
|
+
*
|
|
78
|
+
* Use `DateTime.isUtc` to narrow a `DateTime` to this variant.
|
|
79
|
+
*
|
|
27
80
|
* @category models
|
|
81
|
+
* @since 3.6.0
|
|
28
82
|
*/
|
|
29
83
|
export interface Utc extends DateTime.Proto {
|
|
30
84
|
readonly _tag: "Utc";
|
|
@@ -32,8 +86,14 @@ export interface Utc extends DateTime.Proto {
|
|
|
32
86
|
partsUtc: DateTime.PartsWithWeekday | undefined;
|
|
33
87
|
}
|
|
34
88
|
/**
|
|
35
|
-
*
|
|
89
|
+
* Represents a `DateTime` with an associated `TimeZone`.
|
|
90
|
+
*
|
|
91
|
+
* A zoned value still represents an absolute instant through
|
|
92
|
+
* `epochMilliseconds`, while the time zone is used for wall-clock parts,
|
|
93
|
+
* formatting, and zone-aware transformations.
|
|
94
|
+
*
|
|
36
95
|
* @category models
|
|
96
|
+
* @since 3.6.0
|
|
37
97
|
*/
|
|
38
98
|
export interface Zoned extends DateTime.Proto {
|
|
39
99
|
readonly _tag: "Zoned";
|
|
@@ -44,38 +104,71 @@ export interface Zoned extends DateTime.Proto {
|
|
|
44
104
|
partsUtc: DateTime.PartsWithWeekday | undefined;
|
|
45
105
|
}
|
|
46
106
|
/**
|
|
47
|
-
*
|
|
107
|
+
* Companion namespace containing the public helper types used by `DateTime`
|
|
108
|
+
* constructors, parts APIs, formatting, and date/time arithmetic.
|
|
109
|
+
*
|
|
48
110
|
* @category models
|
|
111
|
+
* @since 3.6.0
|
|
49
112
|
*/
|
|
50
113
|
export declare namespace DateTime {
|
|
51
114
|
/**
|
|
52
|
-
*
|
|
115
|
+
* Input accepted by `DateTime.make`, `DateTime.makeUnsafe`, and the zoned
|
|
116
|
+
* constructors.
|
|
117
|
+
*
|
|
118
|
+
* Includes existing `DateTime` values, partial date parts, epoch-millisecond
|
|
119
|
+
* objects, epoch milliseconds, JavaScript `Date` instances, and parseable date
|
|
120
|
+
* strings.
|
|
121
|
+
*
|
|
53
122
|
* @category models
|
|
123
|
+
* @since 3.6.0
|
|
54
124
|
*/
|
|
55
125
|
type Input = DateTime | Partial<Parts> | Instant | InstantWithZone | Date | number | string;
|
|
56
126
|
/**
|
|
57
|
-
*
|
|
127
|
+
* Type-level helper used by constructors to preserve a zoned input.
|
|
128
|
+
*
|
|
129
|
+
* When the input type is `DateTime.Zoned`, the result type is
|
|
130
|
+
* `DateTime.Zoned`; otherwise the result type is `DateTime.Utc`.
|
|
131
|
+
*
|
|
58
132
|
* @category models
|
|
133
|
+
* @since 3.6.0
|
|
59
134
|
*/
|
|
60
135
|
type PreserveZone<A extends DateTime.Input> = A extends Zoned ? Zoned : Utc;
|
|
61
136
|
/**
|
|
62
|
-
*
|
|
137
|
+
* Date and time unit name accepted by `DateTime` rounding and arithmetic
|
|
138
|
+
* APIs.
|
|
139
|
+
*
|
|
140
|
+
* Includes both singular units, such as `"day"`, and plural units, such as
|
|
141
|
+
* `"days"`.
|
|
142
|
+
*
|
|
63
143
|
* @category models
|
|
144
|
+
* @since 3.6.0
|
|
64
145
|
*/
|
|
65
146
|
type Unit = UnitSingular | UnitPlural;
|
|
66
147
|
/**
|
|
67
|
-
*
|
|
148
|
+
* Singular date and time unit names used by rounding APIs such as
|
|
149
|
+
* `DateTime.startOf`, `DateTime.endOf`, and `DateTime.nearest`.
|
|
150
|
+
*
|
|
68
151
|
* @category models
|
|
152
|
+
* @since 3.6.0
|
|
69
153
|
*/
|
|
70
154
|
type UnitSingular = "millisecond" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year";
|
|
71
155
|
/**
|
|
72
|
-
*
|
|
156
|
+
* Plural date and time unit names used by `DateTime.PartsForMath` for
|
|
157
|
+
* amount-based arithmetic.
|
|
158
|
+
*
|
|
73
159
|
* @category models
|
|
160
|
+
* @since 3.6.0
|
|
74
161
|
*/
|
|
75
162
|
type UnitPlural = "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years";
|
|
76
163
|
/**
|
|
77
|
-
*
|
|
164
|
+
* Calendar and time components of a `DateTime`, including the weekday.
|
|
165
|
+
*
|
|
166
|
+
* `month` is one-based (`1` for January through `12` for December), and
|
|
167
|
+
* `weekDay` follows JavaScript `Date#getUTCDay` numbering (`0` for Sunday
|
|
168
|
+
* through `6` for Saturday).
|
|
169
|
+
*
|
|
78
170
|
* @category models
|
|
171
|
+
* @since 3.6.0
|
|
79
172
|
*/
|
|
80
173
|
interface PartsWithWeekday {
|
|
81
174
|
readonly millisecond: number;
|
|
@@ -88,8 +181,12 @@ export declare namespace DateTime {
|
|
|
88
181
|
readonly year: number;
|
|
89
182
|
}
|
|
90
183
|
/**
|
|
91
|
-
*
|
|
184
|
+
* Calendar and time components of a `DateTime`, without weekday information.
|
|
185
|
+
*
|
|
186
|
+
* `month` is one-based (`1` for January through `12` for December).
|
|
187
|
+
*
|
|
92
188
|
* @category models
|
|
189
|
+
* @since 3.6.0
|
|
93
190
|
*/
|
|
94
191
|
interface Parts {
|
|
95
192
|
readonly millisecond: number;
|
|
@@ -101,8 +198,12 @@ export declare namespace DateTime {
|
|
|
101
198
|
readonly year: number;
|
|
102
199
|
}
|
|
103
200
|
/**
|
|
104
|
-
*
|
|
201
|
+
* Plural amount fields accepted by `DateTime.add` and `DateTime.subtract`.
|
|
202
|
+
*
|
|
203
|
+
* Each field represents the number of units to add or subtract for that part.
|
|
204
|
+
*
|
|
105
205
|
* @category models
|
|
206
|
+
* @since 3.6.0
|
|
106
207
|
*/
|
|
107
208
|
interface PartsForMath {
|
|
108
209
|
readonly milliseconds: number;
|
|
@@ -115,56 +216,90 @@ export declare namespace DateTime {
|
|
|
115
216
|
readonly years: number;
|
|
116
217
|
}
|
|
117
218
|
/**
|
|
118
|
-
*
|
|
219
|
+
* Object input representing an absolute instant as milliseconds since the Unix
|
|
220
|
+
* epoch.
|
|
221
|
+
*
|
|
119
222
|
* @category models
|
|
223
|
+
* @since 4.0.0
|
|
120
224
|
*/
|
|
121
225
|
interface Instant {
|
|
122
226
|
readonly epochMilliseconds: number;
|
|
123
227
|
}
|
|
124
228
|
/**
|
|
125
|
-
*
|
|
229
|
+
* Object input representing an absolute instant plus a time zone identifier.
|
|
230
|
+
*
|
|
231
|
+
* `DateTime.makeZoned` and `DateTime.makeZonedUnsafe` use `timeZoneId` when
|
|
232
|
+
* no explicit `timeZone` option is supplied.
|
|
233
|
+
*
|
|
126
234
|
* @category models
|
|
235
|
+
* @since 4.0.0
|
|
127
236
|
*/
|
|
128
237
|
interface InstantWithZone {
|
|
129
238
|
readonly timeZoneId: string;
|
|
130
239
|
readonly epochMilliseconds: number;
|
|
131
240
|
}
|
|
132
241
|
/**
|
|
133
|
-
*
|
|
242
|
+
* Shared protocol implemented by all `DateTime` values.
|
|
243
|
+
*
|
|
244
|
+
* Provides the `DateTime` type identifier along with pipe and inspection
|
|
245
|
+
* support.
|
|
246
|
+
*
|
|
134
247
|
* @category models
|
|
248
|
+
* @since 3.6.0
|
|
135
249
|
*/
|
|
136
250
|
interface Proto extends Pipeable, Inspectable {
|
|
137
251
|
readonly [TypeId]: typeof TypeId;
|
|
138
252
|
}
|
|
139
253
|
}
|
|
140
254
|
/**
|
|
141
|
-
*
|
|
255
|
+
* Represents a time zone used by `DateTime.Zoned`.
|
|
256
|
+
*
|
|
257
|
+
* A `TimeZone` is either a fixed offset from UTC or a named IANA time zone.
|
|
258
|
+
*
|
|
142
259
|
* @category models
|
|
260
|
+
* @since 3.6.0
|
|
143
261
|
*/
|
|
144
262
|
export type TimeZone = TimeZone.Offset | TimeZone.Named;
|
|
145
263
|
/**
|
|
146
|
-
*
|
|
264
|
+
* Companion namespace containing the public variant and protocol types for
|
|
265
|
+
* `TimeZone`.
|
|
266
|
+
*
|
|
147
267
|
* @category models
|
|
268
|
+
* @since 3.6.0
|
|
148
269
|
*/
|
|
149
270
|
export declare namespace TimeZone {
|
|
150
271
|
/**
|
|
151
|
-
*
|
|
272
|
+
* Shared protocol implemented by all `TimeZone` values.
|
|
273
|
+
*
|
|
274
|
+
* Provides the `TimeZone` type identifier and inspection support.
|
|
275
|
+
*
|
|
152
276
|
* @category models
|
|
277
|
+
* @since 3.6.0
|
|
153
278
|
*/
|
|
154
279
|
interface Proto extends Inspectable {
|
|
155
280
|
readonly [TimeZoneTypeId]: typeof TimeZoneTypeId;
|
|
156
281
|
}
|
|
157
282
|
/**
|
|
158
|
-
*
|
|
283
|
+
* Fixed-offset time zone.
|
|
284
|
+
*
|
|
285
|
+
* The `offset` is measured in milliseconds from UTC. Positive offsets are
|
|
286
|
+
* ahead of UTC, and negative offsets are behind UTC.
|
|
287
|
+
*
|
|
159
288
|
* @category models
|
|
289
|
+
* @since 3.6.0
|
|
160
290
|
*/
|
|
161
291
|
interface Offset extends Proto {
|
|
162
292
|
readonly _tag: "Offset";
|
|
163
293
|
readonly offset: number;
|
|
164
294
|
}
|
|
165
295
|
/**
|
|
166
|
-
*
|
|
296
|
+
* Named IANA time zone.
|
|
297
|
+
*
|
|
298
|
+
* The `id` field contains the resolved time zone identifier, such as
|
|
299
|
+
* `"Europe/London"` or `"America/New_York"`.
|
|
300
|
+
*
|
|
167
301
|
* @category models
|
|
302
|
+
* @since 3.6.0
|
|
168
303
|
*/
|
|
169
304
|
interface Named extends Proto {
|
|
170
305
|
readonly _tag: "Named";
|
|
@@ -188,7 +323,8 @@ export declare namespace TimeZone {
|
|
|
188
323
|
*
|
|
189
324
|
* - `"reject"`: Throw an `RangeError` when encountering ambiguous or non-existent times.
|
|
190
325
|
*
|
|
191
|
-
*
|
|
326
|
+
* **Example** (Resolving ambiguous local times)
|
|
327
|
+
*
|
|
192
328
|
* ```ts
|
|
193
329
|
* import { DateTime } from "effect"
|
|
194
330
|
*
|
|
@@ -228,48 +364,50 @@ export declare namespace TimeZone {
|
|
|
228
364
|
* // Time after gap: 2025-03-09T07:30:00.000Z (03:30 EDT)
|
|
229
365
|
* ```
|
|
230
366
|
*
|
|
231
|
-
* @since 3.18.0
|
|
232
367
|
* @category models
|
|
368
|
+
* @since 3.18.0
|
|
233
369
|
*/
|
|
234
370
|
export type Disambiguation = "compatible" | "earlier" | "later" | "reject";
|
|
235
371
|
/**
|
|
236
|
-
*
|
|
372
|
+
* Checks whether a value is a `DateTime`.
|
|
373
|
+
*
|
|
237
374
|
* @category guards
|
|
375
|
+
* @since 3.6.0
|
|
238
376
|
*/
|
|
239
377
|
export declare const isDateTime: (u: unknown) => u is DateTime;
|
|
240
378
|
/**
|
|
241
379
|
* Checks if a value is a `TimeZone`.
|
|
242
380
|
*
|
|
243
|
-
* @since 3.6.0
|
|
244
381
|
* @category guards
|
|
382
|
+
* @since 3.6.0
|
|
245
383
|
*/
|
|
246
384
|
export declare const isTimeZone: (u: unknown) => u is TimeZone;
|
|
247
385
|
/**
|
|
248
386
|
* Checks if a value is an offset-based `TimeZone`.
|
|
249
387
|
*
|
|
250
|
-
* @since 3.6.0
|
|
251
388
|
* @category guards
|
|
389
|
+
* @since 3.6.0
|
|
252
390
|
*/
|
|
253
391
|
export declare const isTimeZoneOffset: (u: unknown) => u is TimeZone.Offset;
|
|
254
392
|
/**
|
|
255
393
|
* Checks if a value is a named `TimeZone` (IANA time zone).
|
|
256
394
|
*
|
|
257
|
-
* @since 3.6.0
|
|
258
395
|
* @category guards
|
|
396
|
+
* @since 3.6.0
|
|
259
397
|
*/
|
|
260
398
|
export declare const isTimeZoneNamed: (u: unknown) => u is TimeZone.Named;
|
|
261
399
|
/**
|
|
262
400
|
* Checks if a `DateTime` is a UTC `DateTime` (no time zone information).
|
|
263
401
|
*
|
|
264
|
-
* @since 3.6.0
|
|
265
402
|
* @category guards
|
|
403
|
+
* @since 3.6.0
|
|
266
404
|
*/
|
|
267
405
|
export declare const isUtc: (self: DateTime) => self is Utc;
|
|
268
406
|
/**
|
|
269
407
|
* Checks if a `DateTime` is a zoned `DateTime` (has time zone information).
|
|
270
408
|
*
|
|
271
|
-
* @since 3.6.0
|
|
272
409
|
* @category guards
|
|
410
|
+
* @since 3.6.0
|
|
273
411
|
*/
|
|
274
412
|
export declare const isZoned: (self: DateTime) => self is Zoned;
|
|
275
413
|
/**
|
|
@@ -278,7 +416,8 @@ export declare const isZoned: (self: DateTime) => self is Zoned;
|
|
|
278
416
|
* Two `DateTime` values are considered equivalent if they represent the same
|
|
279
417
|
* point in time, regardless of their time zone.
|
|
280
418
|
*
|
|
281
|
-
*
|
|
419
|
+
* **Example** (Comparing DateTime values for equivalence)
|
|
420
|
+
*
|
|
282
421
|
* ```ts
|
|
283
422
|
* import { DateTime } from "effect"
|
|
284
423
|
*
|
|
@@ -300,7 +439,8 @@ export declare const Equivalence: Equ.Equivalence<DateTime>;
|
|
|
300
439
|
* `DateTime` values are ordered by their epoch milliseconds, so earlier times
|
|
301
440
|
* come before later times regardless of time zone.
|
|
302
441
|
*
|
|
303
|
-
*
|
|
442
|
+
* **Example** (Sorting DateTime values chronologically)
|
|
443
|
+
*
|
|
304
444
|
* ```ts
|
|
305
445
|
* import { Array, DateTime } from "effect"
|
|
306
446
|
*
|
|
@@ -325,7 +465,8 @@ export declare const Order: order.Order<DateTime>;
|
|
|
325
465
|
* If the `DateTime` is after the maximum, the maximum is returned.
|
|
326
466
|
* Otherwise, the original `DateTime` is returned.
|
|
327
467
|
*
|
|
328
|
-
*
|
|
468
|
+
* **Example** (Clamping DateTime values)
|
|
469
|
+
*
|
|
329
470
|
* ```ts
|
|
330
471
|
* import { DateTime } from "effect"
|
|
331
472
|
*
|
|
@@ -348,7 +489,8 @@ export declare const clamp: {
|
|
|
348
489
|
* If the `DateTime` is after the maximum, the maximum is returned.
|
|
349
490
|
* Otherwise, the original `DateTime` is returned.
|
|
350
491
|
*
|
|
351
|
-
*
|
|
492
|
+
* **Example** (Clamping DateTime values)
|
|
493
|
+
*
|
|
352
494
|
* ```ts
|
|
353
495
|
* import { DateTime } from "effect"
|
|
354
496
|
*
|
|
@@ -374,7 +516,8 @@ export declare const clamp: {
|
|
|
374
516
|
* If the `DateTime` is after the maximum, the maximum is returned.
|
|
375
517
|
* Otherwise, the original `DateTime` is returned.
|
|
376
518
|
*
|
|
377
|
-
*
|
|
519
|
+
* **Example** (Clamping DateTime values)
|
|
520
|
+
*
|
|
378
521
|
* ```ts
|
|
379
522
|
* import { DateTime } from "effect"
|
|
380
523
|
*
|
|
@@ -399,7 +542,8 @@ export declare const clamp: {
|
|
|
399
542
|
*
|
|
400
543
|
* If the `Date` is invalid, an `IllegalArgumentError` will be thrown.
|
|
401
544
|
*
|
|
402
|
-
*
|
|
545
|
+
* **Example** (Creating DateTime values from Dates)
|
|
546
|
+
*
|
|
403
547
|
* ```ts
|
|
404
548
|
* import { DateTime } from "effect"
|
|
405
549
|
*
|
|
@@ -422,21 +566,26 @@ export declare const fromDateUnsafe: (date: Date) => Utc;
|
|
|
422
566
|
* - An object with the parts of a date
|
|
423
567
|
* - A `string` that can be parsed by `Date.parse`
|
|
424
568
|
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
* @example
|
|
569
|
+
* **Example** (Creating DateTime values unsafely)
|
|
570
|
+
*
|
|
428
571
|
* ```ts
|
|
429
572
|
* import { DateTime } from "effect"
|
|
430
573
|
*
|
|
431
574
|
* // from Date
|
|
432
|
-
* DateTime.makeUnsafe(new Date())
|
|
575
|
+
* const fromDate = DateTime.makeUnsafe(new Date("2024-01-01T12:00:00Z"))
|
|
576
|
+
* console.log(DateTime.formatIso(fromDate)) // "2024-01-01T12:00:00.000Z"
|
|
433
577
|
*
|
|
434
578
|
* // from parts
|
|
435
|
-
* DateTime.makeUnsafe({ year: 2024 })
|
|
579
|
+
* const fromParts = DateTime.makeUnsafe({ year: 2024 })
|
|
580
|
+
* console.log(DateTime.formatIso(fromParts)) // "2024-01-01T00:00:00.000Z"
|
|
436
581
|
*
|
|
437
582
|
* // from string
|
|
438
|
-
* DateTime.makeUnsafe("2024-01-01")
|
|
583
|
+
* const fromString = DateTime.makeUnsafe("2024-01-01")
|
|
584
|
+
* console.log(DateTime.formatIso(fromString)) // "2024-01-01T00:00:00.000Z"
|
|
439
585
|
* ```
|
|
586
|
+
*
|
|
587
|
+
* @category constructors
|
|
588
|
+
* @since 3.6.0
|
|
440
589
|
*/
|
|
441
590
|
export declare const makeUnsafe: <A extends DateTime.Input>(input: A) => DateTime.PreserveZone<A>;
|
|
442
591
|
/**
|
|
@@ -453,14 +602,20 @@ export declare const makeUnsafe: <A extends DateTime.Input>(input: A) => DateTim
|
|
|
453
602
|
* - `later`: Always choose the later of two possible times
|
|
454
603
|
* - `reject`: Throw an error when ambiguous times are encountered
|
|
455
604
|
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
* @example
|
|
605
|
+
* **Example** (Creating zoned DateTime values unsafely)
|
|
606
|
+
*
|
|
459
607
|
* ```ts
|
|
460
608
|
* import { DateTime } from "effect"
|
|
461
609
|
*
|
|
462
|
-
* DateTime.makeZonedUnsafe(
|
|
610
|
+
* const zoned = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
|
|
611
|
+
* timeZone: "Europe/London"
|
|
612
|
+
* })
|
|
613
|
+
*
|
|
614
|
+
* console.log(DateTime.formatIsoZoned(zoned)) // "2024-06-15T15:30:00.000+01:00[Europe/London]"
|
|
463
615
|
* ```
|
|
616
|
+
*
|
|
617
|
+
* @category constructors
|
|
618
|
+
* @since 3.6.0
|
|
464
619
|
*/
|
|
465
620
|
export declare const makeZonedUnsafe: (input: DateTime.Input, options?: {
|
|
466
621
|
readonly timeZone?: number | string | TimeZone | undefined;
|
|
@@ -468,29 +623,41 @@ export declare const makeZonedUnsafe: (input: DateTime.Input, options?: {
|
|
|
468
623
|
readonly disambiguation?: Disambiguation | undefined;
|
|
469
624
|
}) => Zoned;
|
|
470
625
|
/**
|
|
471
|
-
*
|
|
626
|
+
* Creates a `DateTime.Zoned` from an input and a time zone.
|
|
472
627
|
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
628
|
+
* By default, the input is interpreted as a UTC instant and the time zone is
|
|
629
|
+
* attached without changing that instant. When `adjustForTimeZone` is `true`,
|
|
630
|
+
* the input is interpreted as wall-clock time in the target zone.
|
|
476
631
|
*
|
|
477
|
-
* When `adjustForTimeZone` is true
|
|
478
|
-
*
|
|
479
|
-
* - `compatible` (default): Choose earlier time for repeated times, later for gaps
|
|
480
|
-
* - `earlier`: Always choose the earlier of two possible times
|
|
481
|
-
* - `later`: Always choose the later of two possible times
|
|
482
|
-
* - `reject`: Throw an error when ambiguous times are encountered
|
|
632
|
+
* When `adjustForTimeZone` is `true`, `disambiguation` controls
|
|
633
|
+
* daylight-saving gaps and repeated times:
|
|
483
634
|
*
|
|
484
|
-
*
|
|
635
|
+
* - `"compatible"` (default): chooses the earlier occurrence for repeated
|
|
636
|
+
* times and the later interpretation for gaps
|
|
637
|
+
* - `"earlier"`: chooses the earlier possible instant
|
|
638
|
+
* - `"later"`: chooses the later possible instant
|
|
639
|
+
* - `"reject"`: rejects ambiguous or nonexistent wall-clock times
|
|
640
|
+
*
|
|
641
|
+
* Returns `Some` when construction succeeds, or `None` when the input, time
|
|
642
|
+
* zone, or disambiguation cannot be resolved.
|
|
643
|
+
*
|
|
644
|
+
* **Example** (Creating optional zoned DateTime values)
|
|
485
645
|
*
|
|
486
|
-
* @since 3.6.0
|
|
487
|
-
* @category constructors
|
|
488
|
-
* @example
|
|
489
646
|
* ```ts
|
|
490
647
|
* import { DateTime } from "effect"
|
|
491
648
|
*
|
|
492
|
-
* DateTime.makeZoned(
|
|
649
|
+
* const result = DateTime.makeZoned("2024-06-15T14:30:00Z", {
|
|
650
|
+
* timeZone: "Europe/London"
|
|
651
|
+
* })
|
|
652
|
+
*
|
|
653
|
+
* console.log(result._tag) // "Some"
|
|
654
|
+
* if (result._tag === "Some") {
|
|
655
|
+
* console.log(DateTime.formatIsoZoned(result.value)) // "2024-06-15T15:30:00.000+01:00[Europe/London]"
|
|
656
|
+
* }
|
|
493
657
|
* ```
|
|
658
|
+
*
|
|
659
|
+
* @category constructors
|
|
660
|
+
* @since 3.6.0
|
|
494
661
|
*/
|
|
495
662
|
export declare const makeZoned: (input: DateTime.Input, options?: {
|
|
496
663
|
readonly timeZone?: number | string | TimeZone | undefined;
|
|
@@ -498,39 +665,53 @@ export declare const makeZoned: (input: DateTime.Input, options?: {
|
|
|
498
665
|
readonly disambiguation?: Disambiguation | undefined;
|
|
499
666
|
}) => Option.Option<Zoned>;
|
|
500
667
|
/**
|
|
501
|
-
*
|
|
668
|
+
* Creates a `DateTime` from one of the following:
|
|
502
669
|
*
|
|
503
670
|
* - A `DateTime`
|
|
504
|
-
* - A `Date`
|
|
505
|
-
* - The
|
|
506
|
-
* - An object with
|
|
507
|
-
* - A
|
|
671
|
+
* - A JavaScript `Date`
|
|
672
|
+
* - The number of milliseconds since the Unix epoch
|
|
673
|
+
* - An object with date and time parts
|
|
674
|
+
* - A string that can be parsed as a date
|
|
508
675
|
*
|
|
509
|
-
*
|
|
676
|
+
* Returns `Some` with the constructed `DateTime` when the input is valid, or
|
|
677
|
+
* `None` when construction would fail, including invalid `Date` instances or
|
|
678
|
+
* unparseable strings.
|
|
679
|
+
*
|
|
680
|
+
* **Example** (Creating optional DateTime values)
|
|
510
681
|
*
|
|
511
|
-
* @since 3.6.0
|
|
512
|
-
* @category constructors
|
|
513
|
-
* @example
|
|
514
682
|
* ```ts
|
|
515
683
|
* import { DateTime } from "effect"
|
|
516
684
|
*
|
|
517
685
|
* // from Date
|
|
518
|
-
* DateTime.make(new Date())
|
|
686
|
+
* const fromDate = DateTime.make(new Date("2024-01-01T12:00:00Z"))
|
|
687
|
+
* console.log(fromDate._tag) // "Some"
|
|
519
688
|
*
|
|
520
689
|
* // from parts
|
|
521
|
-
* DateTime.make({ year: 2024 })
|
|
690
|
+
* const fromParts = DateTime.make({ year: 2024 })
|
|
691
|
+
* console.log(fromParts._tag) // "Some"
|
|
522
692
|
*
|
|
523
693
|
* // from string
|
|
524
|
-
* DateTime.make("2024-01-01")
|
|
694
|
+
* const fromString = DateTime.make("2024-01-01")
|
|
695
|
+
* console.log(fromString._tag) // "Some"
|
|
696
|
+
*
|
|
697
|
+
* const invalid = DateTime.make("not a date")
|
|
698
|
+
* console.log(invalid._tag) // "None"
|
|
525
699
|
* ```
|
|
700
|
+
*
|
|
701
|
+
* @category constructors
|
|
702
|
+
* @since 3.6.0
|
|
526
703
|
*/
|
|
527
704
|
export declare const make: <A extends DateTime.Input>(input: A) => Option.Option<DateTime.PreserveZone<A>>;
|
|
528
705
|
/**
|
|
529
|
-
*
|
|
706
|
+
* Parses an ISO zoned date-time string into a `DateTime.Zoned`.
|
|
530
707
|
*
|
|
531
|
-
*
|
|
708
|
+
* Accepts named-zone strings such as
|
|
709
|
+
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]` and offset-only strings such as
|
|
710
|
+
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM`. Returns `None` when the input cannot be
|
|
711
|
+
* parsed.
|
|
712
|
+
*
|
|
713
|
+
* **Example** (Parsing zoned DateTime strings)
|
|
532
714
|
*
|
|
533
|
-
* @example
|
|
534
715
|
* ```ts
|
|
535
716
|
* import { DateTime } from "effect"
|
|
536
717
|
*
|
|
@@ -546,31 +727,34 @@ export declare const make: <A extends DateTime.Input>(input: A) => Option.Option
|
|
|
546
727
|
* console.log(invalid._tag === "None") // true
|
|
547
728
|
* ```
|
|
548
729
|
*
|
|
549
|
-
* @since 3.6.0
|
|
550
730
|
* @category constructors
|
|
731
|
+
* @since 3.6.0
|
|
551
732
|
*/
|
|
552
733
|
export declare const makeZonedFromString: (input: string) => Option.Option<Zoned>;
|
|
553
734
|
/**
|
|
554
735
|
* Get the current time using the `Clock` service and convert it to a `DateTime`.
|
|
555
736
|
*
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
* @example
|
|
737
|
+
* **Example** (Getting the current DateTime)
|
|
738
|
+
*
|
|
559
739
|
* ```ts
|
|
560
740
|
* import { DateTime, Effect } from "effect"
|
|
561
741
|
*
|
|
562
742
|
* Effect.gen(function*() {
|
|
563
|
-
* const now = yield* DateTime.
|
|
743
|
+
* const now = yield* DateTime.nowAsDate
|
|
744
|
+
* console.log(now instanceof Date) // true
|
|
564
745
|
* })
|
|
565
746
|
* ```
|
|
747
|
+
*
|
|
748
|
+
* @category constructors
|
|
749
|
+
* @since 3.6.0
|
|
566
750
|
*/
|
|
567
751
|
export declare const now: Effect.Effect<Utc>;
|
|
568
752
|
/**
|
|
569
|
-
*
|
|
753
|
+
* Gets the current time from the `Clock` service and returns it as a
|
|
754
|
+
* JavaScript `Date`.
|
|
755
|
+
*
|
|
756
|
+
* **Example** (Getting the current Date)
|
|
570
757
|
*
|
|
571
|
-
* @since 3.6.0
|
|
572
|
-
* @category constructors
|
|
573
|
-
* @example
|
|
574
758
|
* ```ts
|
|
575
759
|
* import { DateTime, Effect } from "effect"
|
|
576
760
|
*
|
|
@@ -578,6 +762,9 @@ export declare const now: Effect.Effect<Utc>;
|
|
|
578
762
|
* const now = yield* DateTime.now
|
|
579
763
|
* })
|
|
580
764
|
* ```
|
|
765
|
+
*
|
|
766
|
+
* @category constructors
|
|
767
|
+
* @since 3.6.0
|
|
581
768
|
*/
|
|
582
769
|
export declare const nowAsDate: Effect.Effect<Date>;
|
|
583
770
|
/**
|
|
@@ -586,7 +773,8 @@ export declare const nowAsDate: Effect.Effect<Date>;
|
|
|
586
773
|
* This is a synchronous version of `now` that directly uses `Date.now()`
|
|
587
774
|
* instead of the Effect `Clock` service.
|
|
588
775
|
*
|
|
589
|
-
*
|
|
776
|
+
* **Example** (Getting the current DateTime unsafely)
|
|
777
|
+
*
|
|
590
778
|
* ```ts
|
|
591
779
|
* import { DateTime } from "effect"
|
|
592
780
|
*
|
|
@@ -601,9 +789,8 @@ export declare const nowUnsafe: LazyArg<Utc>;
|
|
|
601
789
|
/**
|
|
602
790
|
* For a `DateTime` returns a new `DateTime.Utc`.
|
|
603
791
|
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
* @example
|
|
792
|
+
* **Example** (Converting DateTime values to UTC)
|
|
793
|
+
*
|
|
607
794
|
* ```ts
|
|
608
795
|
* import { DateTime } from "effect"
|
|
609
796
|
*
|
|
@@ -614,14 +801,16 @@ export declare const nowUnsafe: LazyArg<Utc>;
|
|
|
614
801
|
* // set as UTC
|
|
615
802
|
* const utc: DateTime.Utc = DateTime.toUtc(now)
|
|
616
803
|
* ```
|
|
804
|
+
*
|
|
805
|
+
* @category time zones
|
|
806
|
+
* @since 3.13.0
|
|
617
807
|
*/
|
|
618
808
|
export declare const toUtc: (self: DateTime) => Utc;
|
|
619
809
|
/**
|
|
620
810
|
* Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`.
|
|
621
811
|
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
* @example
|
|
812
|
+
* **Example** (Setting time zones)
|
|
813
|
+
*
|
|
625
814
|
* ```ts
|
|
626
815
|
* import { DateTime, Effect } from "effect"
|
|
627
816
|
*
|
|
@@ -633,14 +822,16 @@ export declare const toUtc: (self: DateTime) => Utc;
|
|
|
633
822
|
* const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
|
|
634
823
|
* })
|
|
635
824
|
* ```
|
|
825
|
+
*
|
|
826
|
+
* @category time zones
|
|
827
|
+
* @since 3.6.0
|
|
636
828
|
*/
|
|
637
829
|
export declare const setZone: {
|
|
638
830
|
/**
|
|
639
831
|
* Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`.
|
|
640
832
|
*
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
* @example
|
|
833
|
+
* **Example** (Setting time zones)
|
|
834
|
+
*
|
|
644
835
|
* ```ts
|
|
645
836
|
* import { DateTime, Effect } from "effect"
|
|
646
837
|
*
|
|
@@ -652,6 +843,9 @@ export declare const setZone: {
|
|
|
652
843
|
* const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
|
|
653
844
|
* })
|
|
654
845
|
* ```
|
|
846
|
+
*
|
|
847
|
+
* @category time zones
|
|
848
|
+
* @since 3.6.0
|
|
655
849
|
*/
|
|
656
850
|
(zone: TimeZone, options?: {
|
|
657
851
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -660,9 +854,8 @@ export declare const setZone: {
|
|
|
660
854
|
/**
|
|
661
855
|
* Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`.
|
|
662
856
|
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
* @example
|
|
857
|
+
* **Example** (Setting time zones)
|
|
858
|
+
*
|
|
666
859
|
* ```ts
|
|
667
860
|
* import { DateTime, Effect } from "effect"
|
|
668
861
|
*
|
|
@@ -674,6 +867,9 @@ export declare const setZone: {
|
|
|
674
867
|
* const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
|
|
675
868
|
* })
|
|
676
869
|
* ```
|
|
870
|
+
*
|
|
871
|
+
* @category time zones
|
|
872
|
+
* @since 3.6.0
|
|
677
873
|
*/
|
|
678
874
|
(self: DateTime, zone: TimeZone, options?: {
|
|
679
875
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -685,9 +881,8 @@ export declare const setZone: {
|
|
|
685
881
|
*
|
|
686
882
|
* The offset is in milliseconds.
|
|
687
883
|
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
* @example
|
|
884
|
+
* **Example** (Setting fixed-offset time zones)
|
|
885
|
+
*
|
|
691
886
|
* ```ts
|
|
692
887
|
* import { DateTime, Effect } from "effect"
|
|
693
888
|
*
|
|
@@ -698,6 +893,9 @@ export declare const setZone: {
|
|
|
698
893
|
* const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000)
|
|
699
894
|
* })
|
|
700
895
|
* ```
|
|
896
|
+
*
|
|
897
|
+
* @category time zones
|
|
898
|
+
* @since 3.6.0
|
|
701
899
|
*/
|
|
702
900
|
export declare const setZoneOffset: {
|
|
703
901
|
/**
|
|
@@ -705,9 +903,8 @@ export declare const setZoneOffset: {
|
|
|
705
903
|
*
|
|
706
904
|
* The offset is in milliseconds.
|
|
707
905
|
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
* @example
|
|
906
|
+
* **Example** (Setting fixed-offset time zones)
|
|
907
|
+
*
|
|
711
908
|
* ```ts
|
|
712
909
|
* import { DateTime, Effect } from "effect"
|
|
713
910
|
*
|
|
@@ -718,6 +915,9 @@ export declare const setZoneOffset: {
|
|
|
718
915
|
* const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000)
|
|
719
916
|
* })
|
|
720
917
|
* ```
|
|
918
|
+
*
|
|
919
|
+
* @category time zones
|
|
920
|
+
* @since 3.6.0
|
|
721
921
|
*/
|
|
722
922
|
(offset: number, options?: {
|
|
723
923
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -728,9 +928,8 @@ export declare const setZoneOffset: {
|
|
|
728
928
|
*
|
|
729
929
|
* The offset is in milliseconds.
|
|
730
930
|
*
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* @example
|
|
931
|
+
* **Example** (Setting fixed-offset time zones)
|
|
932
|
+
*
|
|
734
933
|
* ```ts
|
|
735
934
|
* import { DateTime, Effect } from "effect"
|
|
736
935
|
*
|
|
@@ -741,6 +940,9 @@ export declare const setZoneOffset: {
|
|
|
741
940
|
* const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000)
|
|
742
941
|
* })
|
|
743
942
|
* ```
|
|
943
|
+
*
|
|
944
|
+
* @category time zones
|
|
945
|
+
* @since 3.6.0
|
|
744
946
|
*/
|
|
745
947
|
(self: DateTime, offset: number, options?: {
|
|
746
948
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -752,7 +954,8 @@ export declare const setZoneOffset: {
|
|
|
752
954
|
*
|
|
753
955
|
* If the time zone is invalid, an `IllegalArgumentError` will be thrown.
|
|
754
956
|
*
|
|
755
|
-
*
|
|
957
|
+
* **Example** (Creating named time zones unsafely)
|
|
958
|
+
*
|
|
756
959
|
* ```ts
|
|
757
960
|
* import { DateTime } from "effect"
|
|
758
961
|
*
|
|
@@ -766,8 +969,8 @@ export declare const setZoneOffset: {
|
|
|
766
969
|
* // DateTime.zoneMakeNamedUnsafe("Invalid/Zone")
|
|
767
970
|
* ```
|
|
768
971
|
*
|
|
769
|
-
* @since 3.6.0
|
|
770
972
|
* @category time zones
|
|
973
|
+
* @since 3.6.0
|
|
771
974
|
*/
|
|
772
975
|
export declare const zoneMakeNamedUnsafe: (zoneId: string) => TimeZone.Named;
|
|
773
976
|
/**
|
|
@@ -776,7 +979,8 @@ export declare const zoneMakeNamedUnsafe: (zoneId: string) => TimeZone.Named;
|
|
|
776
979
|
* The offset is specified in milliseconds from UTC. Positive values are
|
|
777
980
|
* ahead of UTC, negative values are behind UTC.
|
|
778
981
|
*
|
|
779
|
-
*
|
|
982
|
+
* **Example** (Creating fixed-offset time zones)
|
|
983
|
+
*
|
|
780
984
|
* ```ts
|
|
781
985
|
* import { DateTime } from "effect"
|
|
782
986
|
*
|
|
@@ -797,7 +1001,8 @@ export declare const zoneMakeOffset: (offset: number) => TimeZone.Offset;
|
|
|
797
1001
|
*
|
|
798
1002
|
* If the time zone is invalid, `None` will be returned.
|
|
799
1003
|
*
|
|
800
|
-
*
|
|
1004
|
+
* **Example** (Creating optional named time zones)
|
|
1005
|
+
*
|
|
801
1006
|
* ```ts
|
|
802
1007
|
* import { DateTime } from "effect"
|
|
803
1008
|
*
|
|
@@ -817,7 +1022,8 @@ export declare const zoneMakeNamed: (zoneId: string) => Option.Option<TimeZone.N
|
|
|
817
1022
|
*
|
|
818
1023
|
* If the time zone is invalid, it will fail with an `IllegalArgumentError`.
|
|
819
1024
|
*
|
|
820
|
-
*
|
|
1025
|
+
* **Example** (Creating named time zones effectfully)
|
|
1026
|
+
*
|
|
821
1027
|
* ```ts
|
|
822
1028
|
* import { DateTime, Effect } from "effect"
|
|
823
1029
|
*
|
|
@@ -838,15 +1044,13 @@ export declare const zoneMakeNamedEffect: (zoneId: string) => Effect.Effect<Time
|
|
|
838
1044
|
* This uses the system's configured time zone, which may vary depending
|
|
839
1045
|
* on the runtime environment.
|
|
840
1046
|
*
|
|
841
|
-
*
|
|
1047
|
+
* **Example** (Creating local time zones)
|
|
1048
|
+
*
|
|
842
1049
|
* ```ts
|
|
843
1050
|
* import { DateTime } from "effect"
|
|
844
1051
|
*
|
|
845
1052
|
* const localZone = DateTime.zoneMakeLocal()
|
|
846
|
-
*
|
|
847
|
-
* const localTime = DateTime.setZone(now, localZone)
|
|
848
|
-
*
|
|
849
|
-
* console.log(DateTime.formatIsoZoned(localTime))
|
|
1053
|
+
* console.log(DateTime.zoneToString(localZone)) // Output depends on system time zone
|
|
850
1054
|
* ```
|
|
851
1055
|
*
|
|
852
1056
|
* @category time zones
|
|
@@ -858,7 +1062,8 @@ export declare const zoneMakeLocal: () => TimeZone.Named;
|
|
|
858
1062
|
*
|
|
859
1063
|
* Supports both IANA time zone identifiers and offset formats like "+03:00".
|
|
860
1064
|
*
|
|
861
|
-
*
|
|
1065
|
+
* **Example** (Parsing time zones)
|
|
1066
|
+
*
|
|
862
1067
|
* ```ts
|
|
863
1068
|
* import { DateTime } from "effect"
|
|
864
1069
|
*
|
|
@@ -878,9 +1083,8 @@ export declare const zoneFromString: (zone: string) => Option.Option<TimeZone>;
|
|
|
878
1083
|
/**
|
|
879
1084
|
* Format a `TimeZone` as a string.
|
|
880
1085
|
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
883
|
-
* @example
|
|
1086
|
+
* **Example** (Formatting time zones)
|
|
1087
|
+
*
|
|
884
1088
|
* ```ts
|
|
885
1089
|
* import { DateTime } from "effect"
|
|
886
1090
|
*
|
|
@@ -890,15 +1094,17 @@ export declare const zoneFromString: (zone: string) => Option.Option<TimeZone>;
|
|
|
890
1094
|
* // Outputs "Europe/London"
|
|
891
1095
|
* DateTime.zoneToString(DateTime.zoneMakeNamedUnsafe("Europe/London"))
|
|
892
1096
|
* ```
|
|
1097
|
+
*
|
|
1098
|
+
* @category time zones
|
|
1099
|
+
* @since 3.6.0
|
|
893
1100
|
*/
|
|
894
1101
|
export declare const zoneToString: (self: TimeZone) => string;
|
|
895
1102
|
/**
|
|
896
1103
|
* Set the time zone of a `DateTime` from an IANA time zone identifier. If the
|
|
897
1104
|
* time zone is invalid, `None` will be returned.
|
|
898
1105
|
*
|
|
899
|
-
*
|
|
900
|
-
*
|
|
901
|
-
* @example
|
|
1106
|
+
* **Example** (Setting named time zones safely)
|
|
1107
|
+
*
|
|
902
1108
|
* ```ts
|
|
903
1109
|
* import { DateTime, Effect } from "effect"
|
|
904
1110
|
*
|
|
@@ -908,15 +1114,17 @@ export declare const zoneToString: (self: TimeZone) => string;
|
|
|
908
1114
|
* DateTime.setZoneNamed(now, "Europe/London")
|
|
909
1115
|
* })
|
|
910
1116
|
* ```
|
|
1117
|
+
*
|
|
1118
|
+
* @category time zones
|
|
1119
|
+
* @since 3.6.0
|
|
911
1120
|
*/
|
|
912
1121
|
export declare const setZoneNamed: {
|
|
913
1122
|
/**
|
|
914
1123
|
* Set the time zone of a `DateTime` from an IANA time zone identifier. If the
|
|
915
1124
|
* time zone is invalid, `None` will be returned.
|
|
916
1125
|
*
|
|
917
|
-
*
|
|
918
|
-
*
|
|
919
|
-
* @example
|
|
1126
|
+
* **Example** (Setting named time zones safely)
|
|
1127
|
+
*
|
|
920
1128
|
* ```ts
|
|
921
1129
|
* import { DateTime, Effect } from "effect"
|
|
922
1130
|
*
|
|
@@ -926,6 +1134,9 @@ export declare const setZoneNamed: {
|
|
|
926
1134
|
* DateTime.setZoneNamed(now, "Europe/London")
|
|
927
1135
|
* })
|
|
928
1136
|
* ```
|
|
1137
|
+
*
|
|
1138
|
+
* @category time zones
|
|
1139
|
+
* @since 3.6.0
|
|
929
1140
|
*/
|
|
930
1141
|
(zoneId: string, options?: {
|
|
931
1142
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -935,9 +1146,8 @@ export declare const setZoneNamed: {
|
|
|
935
1146
|
* Set the time zone of a `DateTime` from an IANA time zone identifier. If the
|
|
936
1147
|
* time zone is invalid, `None` will be returned.
|
|
937
1148
|
*
|
|
938
|
-
*
|
|
939
|
-
*
|
|
940
|
-
* @example
|
|
1149
|
+
* **Example** (Setting named time zones safely)
|
|
1150
|
+
*
|
|
941
1151
|
* ```ts
|
|
942
1152
|
* import { DateTime, Effect } from "effect"
|
|
943
1153
|
*
|
|
@@ -947,6 +1157,9 @@ export declare const setZoneNamed: {
|
|
|
947
1157
|
* DateTime.setZoneNamed(now, "Europe/London")
|
|
948
1158
|
* })
|
|
949
1159
|
* ```
|
|
1160
|
+
*
|
|
1161
|
+
* @category time zones
|
|
1162
|
+
* @since 3.6.0
|
|
950
1163
|
*/
|
|
951
1164
|
(self: DateTime, zoneId: string, options?: {
|
|
952
1165
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -957,9 +1170,8 @@ export declare const setZoneNamed: {
|
|
|
957
1170
|
* Set the time zone of a `DateTime` from an IANA time zone identifier. If the
|
|
958
1171
|
* time zone is invalid, an `IllegalArgumentError` will be thrown.
|
|
959
1172
|
*
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
* @example
|
|
1173
|
+
* **Example** (Setting named time zones unsafely)
|
|
1174
|
+
*
|
|
963
1175
|
* ```ts
|
|
964
1176
|
* import { DateTime, Effect } from "effect"
|
|
965
1177
|
*
|
|
@@ -969,15 +1181,17 @@ export declare const setZoneNamed: {
|
|
|
969
1181
|
* DateTime.setZoneNamedUnsafe(now, "Europe/London")
|
|
970
1182
|
* })
|
|
971
1183
|
* ```
|
|
1184
|
+
*
|
|
1185
|
+
* @category time zones
|
|
1186
|
+
* @since 3.6.0
|
|
972
1187
|
*/
|
|
973
1188
|
export declare const setZoneNamedUnsafe: {
|
|
974
1189
|
/**
|
|
975
1190
|
* Set the time zone of a `DateTime` from an IANA time zone identifier. If the
|
|
976
1191
|
* time zone is invalid, an `IllegalArgumentError` will be thrown.
|
|
977
1192
|
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
* @example
|
|
1193
|
+
* **Example** (Setting named time zones unsafely)
|
|
1194
|
+
*
|
|
981
1195
|
* ```ts
|
|
982
1196
|
* import { DateTime, Effect } from "effect"
|
|
983
1197
|
*
|
|
@@ -987,6 +1201,9 @@ export declare const setZoneNamedUnsafe: {
|
|
|
987
1201
|
* DateTime.setZoneNamedUnsafe(now, "Europe/London")
|
|
988
1202
|
* })
|
|
989
1203
|
* ```
|
|
1204
|
+
*
|
|
1205
|
+
* @category time zones
|
|
1206
|
+
* @since 3.6.0
|
|
990
1207
|
*/
|
|
991
1208
|
(zoneId: string, options?: {
|
|
992
1209
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -996,9 +1213,8 @@ export declare const setZoneNamedUnsafe: {
|
|
|
996
1213
|
* Set the time zone of a `DateTime` from an IANA time zone identifier. If the
|
|
997
1214
|
* time zone is invalid, an `IllegalArgumentError` will be thrown.
|
|
998
1215
|
*
|
|
999
|
-
*
|
|
1000
|
-
*
|
|
1001
|
-
* @example
|
|
1216
|
+
* **Example** (Setting named time zones unsafely)
|
|
1217
|
+
*
|
|
1002
1218
|
* ```ts
|
|
1003
1219
|
* import { DateTime, Effect } from "effect"
|
|
1004
1220
|
*
|
|
@@ -1008,6 +1224,9 @@ export declare const setZoneNamedUnsafe: {
|
|
|
1008
1224
|
* DateTime.setZoneNamedUnsafe(now, "Europe/London")
|
|
1009
1225
|
* })
|
|
1010
1226
|
* ```
|
|
1227
|
+
*
|
|
1228
|
+
* @category time zones
|
|
1229
|
+
* @since 3.6.0
|
|
1011
1230
|
*/
|
|
1012
1231
|
(self: DateTime, zoneId: string, options?: {
|
|
1013
1232
|
readonly adjustForTimeZone?: boolean | undefined;
|
|
@@ -1022,9 +1241,8 @@ export declare const setZoneNamedUnsafe: {
|
|
|
1022
1241
|
* `other` is *before* `self`, the result will be a negative `Duration`. If they
|
|
1023
1242
|
* are equal, the result will be a `Duration` of zero.
|
|
1024
1243
|
*
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
* @example
|
|
1244
|
+
* **Example** (Measuring distance between DateTime values)
|
|
1245
|
+
*
|
|
1028
1246
|
* ```ts
|
|
1029
1247
|
* import { DateTime, Effect } from "effect"
|
|
1030
1248
|
*
|
|
@@ -1036,6 +1254,9 @@ export declare const setZoneNamedUnsafe: {
|
|
|
1036
1254
|
* DateTime.distance(now, other)
|
|
1037
1255
|
* })
|
|
1038
1256
|
* ```
|
|
1257
|
+
*
|
|
1258
|
+
* @category comparisons
|
|
1259
|
+
* @since 3.6.0
|
|
1039
1260
|
*/
|
|
1040
1261
|
export declare const distance: {
|
|
1041
1262
|
/**
|
|
@@ -1046,9 +1267,8 @@ export declare const distance: {
|
|
|
1046
1267
|
* `other` is *before* `self`, the result will be a negative `Duration`. If they
|
|
1047
1268
|
* are equal, the result will be a `Duration` of zero.
|
|
1048
1269
|
*
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1051
|
-
* @example
|
|
1270
|
+
* **Example** (Measuring distance between DateTime values)
|
|
1271
|
+
*
|
|
1052
1272
|
* ```ts
|
|
1053
1273
|
* import { DateTime, Effect } from "effect"
|
|
1054
1274
|
*
|
|
@@ -1060,6 +1280,9 @@ export declare const distance: {
|
|
|
1060
1280
|
* DateTime.distance(now, other)
|
|
1061
1281
|
* })
|
|
1062
1282
|
* ```
|
|
1283
|
+
*
|
|
1284
|
+
* @category comparisons
|
|
1285
|
+
* @since 3.6.0
|
|
1063
1286
|
*/
|
|
1064
1287
|
(other: DateTime): (self: DateTime) => Duration.Duration;
|
|
1065
1288
|
/**
|
|
@@ -1070,9 +1293,8 @@ export declare const distance: {
|
|
|
1070
1293
|
* `other` is *before* `self`, the result will be a negative `Duration`. If they
|
|
1071
1294
|
* are equal, the result will be a `Duration` of zero.
|
|
1072
1295
|
*
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1075
|
-
* @example
|
|
1296
|
+
* **Example** (Measuring distance between DateTime values)
|
|
1297
|
+
*
|
|
1076
1298
|
* ```ts
|
|
1077
1299
|
* import { DateTime, Effect } from "effect"
|
|
1078
1300
|
*
|
|
@@ -1084,13 +1306,17 @@ export declare const distance: {
|
|
|
1084
1306
|
* DateTime.distance(now, other)
|
|
1085
1307
|
* })
|
|
1086
1308
|
* ```
|
|
1309
|
+
*
|
|
1310
|
+
* @category comparisons
|
|
1311
|
+
* @since 3.6.0
|
|
1087
1312
|
*/
|
|
1088
1313
|
(self: DateTime, other: DateTime): Duration.Duration;
|
|
1089
1314
|
};
|
|
1090
1315
|
/**
|
|
1091
1316
|
* Returns the earlier of two `DateTime` values.
|
|
1092
1317
|
*
|
|
1093
|
-
*
|
|
1318
|
+
* **Example** (Selecting the earlier DateTime)
|
|
1319
|
+
*
|
|
1094
1320
|
* ```ts
|
|
1095
1321
|
* import { DateTime } from "effect"
|
|
1096
1322
|
*
|
|
@@ -1108,7 +1334,8 @@ export declare const min: {
|
|
|
1108
1334
|
/**
|
|
1109
1335
|
* Returns the earlier of two `DateTime` values.
|
|
1110
1336
|
*
|
|
1111
|
-
*
|
|
1337
|
+
* **Example** (Selecting the earlier DateTime)
|
|
1338
|
+
*
|
|
1112
1339
|
* ```ts
|
|
1113
1340
|
* import { DateTime } from "effect"
|
|
1114
1341
|
*
|
|
@@ -1126,7 +1353,8 @@ export declare const min: {
|
|
|
1126
1353
|
/**
|
|
1127
1354
|
* Returns the earlier of two `DateTime` values.
|
|
1128
1355
|
*
|
|
1129
|
-
*
|
|
1356
|
+
* **Example** (Selecting the earlier DateTime)
|
|
1357
|
+
*
|
|
1130
1358
|
* ```ts
|
|
1131
1359
|
* import { DateTime } from "effect"
|
|
1132
1360
|
*
|
|
@@ -1145,7 +1373,8 @@ export declare const min: {
|
|
|
1145
1373
|
/**
|
|
1146
1374
|
* Returns the later of two `DateTime` values.
|
|
1147
1375
|
*
|
|
1148
|
-
*
|
|
1376
|
+
* **Example** (Selecting the later DateTime)
|
|
1377
|
+
*
|
|
1149
1378
|
* ```ts
|
|
1150
1379
|
* import { DateTime } from "effect"
|
|
1151
1380
|
*
|
|
@@ -1163,7 +1392,8 @@ export declare const max: {
|
|
|
1163
1392
|
/**
|
|
1164
1393
|
* Returns the later of two `DateTime` values.
|
|
1165
1394
|
*
|
|
1166
|
-
*
|
|
1395
|
+
* **Example** (Selecting the later DateTime)
|
|
1396
|
+
*
|
|
1167
1397
|
* ```ts
|
|
1168
1398
|
* import { DateTime } from "effect"
|
|
1169
1399
|
*
|
|
@@ -1181,7 +1411,8 @@ export declare const max: {
|
|
|
1181
1411
|
/**
|
|
1182
1412
|
* Returns the later of two `DateTime` values.
|
|
1183
1413
|
*
|
|
1184
|
-
*
|
|
1414
|
+
* **Example** (Selecting the later DateTime)
|
|
1415
|
+
*
|
|
1185
1416
|
* ```ts
|
|
1186
1417
|
* import { DateTime } from "effect"
|
|
1187
1418
|
*
|
|
@@ -1200,7 +1431,8 @@ export declare const max: {
|
|
|
1200
1431
|
/**
|
|
1201
1432
|
* Checks if the first `DateTime` is after the second `DateTime`.
|
|
1202
1433
|
*
|
|
1203
|
-
*
|
|
1434
|
+
* **Example** (Checking whether a DateTime is later)
|
|
1435
|
+
*
|
|
1204
1436
|
* ```ts
|
|
1205
1437
|
* import { DateTime } from "effect"
|
|
1206
1438
|
*
|
|
@@ -1218,7 +1450,8 @@ export declare const isGreaterThan: {
|
|
|
1218
1450
|
/**
|
|
1219
1451
|
* Checks if the first `DateTime` is after the second `DateTime`.
|
|
1220
1452
|
*
|
|
1221
|
-
*
|
|
1453
|
+
* **Example** (Checking whether a DateTime is later)
|
|
1454
|
+
*
|
|
1222
1455
|
* ```ts
|
|
1223
1456
|
* import { DateTime } from "effect"
|
|
1224
1457
|
*
|
|
@@ -1236,7 +1469,8 @@ export declare const isGreaterThan: {
|
|
|
1236
1469
|
/**
|
|
1237
1470
|
* Checks if the first `DateTime` is after the second `DateTime`.
|
|
1238
1471
|
*
|
|
1239
|
-
*
|
|
1472
|
+
* **Example** (Checking whether a DateTime is later)
|
|
1473
|
+
*
|
|
1240
1474
|
* ```ts
|
|
1241
1475
|
* import { DateTime } from "effect"
|
|
1242
1476
|
*
|
|
@@ -1255,7 +1489,8 @@ export declare const isGreaterThan: {
|
|
|
1255
1489
|
/**
|
|
1256
1490
|
* Checks if the first `DateTime` is after or equal to the second `DateTime`.
|
|
1257
1491
|
*
|
|
1258
|
-
*
|
|
1492
|
+
* **Example** (Checking whether a DateTime is later or equal)
|
|
1493
|
+
*
|
|
1259
1494
|
* ```ts
|
|
1260
1495
|
* import { DateTime } from "effect"
|
|
1261
1496
|
*
|
|
@@ -1275,7 +1510,8 @@ export declare const isGreaterThanOrEqualTo: {
|
|
|
1275
1510
|
/**
|
|
1276
1511
|
* Checks if the first `DateTime` is after or equal to the second `DateTime`.
|
|
1277
1512
|
*
|
|
1278
|
-
*
|
|
1513
|
+
* **Example** (Checking whether a DateTime is later or equal)
|
|
1514
|
+
*
|
|
1279
1515
|
* ```ts
|
|
1280
1516
|
* import { DateTime } from "effect"
|
|
1281
1517
|
*
|
|
@@ -1295,7 +1531,8 @@ export declare const isGreaterThanOrEqualTo: {
|
|
|
1295
1531
|
/**
|
|
1296
1532
|
* Checks if the first `DateTime` is after or equal to the second `DateTime`.
|
|
1297
1533
|
*
|
|
1298
|
-
*
|
|
1534
|
+
* **Example** (Checking whether a DateTime is later or equal)
|
|
1535
|
+
*
|
|
1299
1536
|
* ```ts
|
|
1300
1537
|
* import { DateTime } from "effect"
|
|
1301
1538
|
*
|
|
@@ -1316,7 +1553,8 @@ export declare const isGreaterThanOrEqualTo: {
|
|
|
1316
1553
|
/**
|
|
1317
1554
|
* Checks if the first `DateTime` is before the second `DateTime`.
|
|
1318
1555
|
*
|
|
1319
|
-
*
|
|
1556
|
+
* **Example** (Checking whether a DateTime is earlier)
|
|
1557
|
+
*
|
|
1320
1558
|
* ```ts
|
|
1321
1559
|
* import { DateTime } from "effect"
|
|
1322
1560
|
*
|
|
@@ -1334,7 +1572,8 @@ export declare const isLessThan: {
|
|
|
1334
1572
|
/**
|
|
1335
1573
|
* Checks if the first `DateTime` is before the second `DateTime`.
|
|
1336
1574
|
*
|
|
1337
|
-
*
|
|
1575
|
+
* **Example** (Checking whether a DateTime is earlier)
|
|
1576
|
+
*
|
|
1338
1577
|
* ```ts
|
|
1339
1578
|
* import { DateTime } from "effect"
|
|
1340
1579
|
*
|
|
@@ -1352,7 +1591,8 @@ export declare const isLessThan: {
|
|
|
1352
1591
|
/**
|
|
1353
1592
|
* Checks if the first `DateTime` is before the second `DateTime`.
|
|
1354
1593
|
*
|
|
1355
|
-
*
|
|
1594
|
+
* **Example** (Checking whether a DateTime is earlier)
|
|
1595
|
+
*
|
|
1356
1596
|
* ```ts
|
|
1357
1597
|
* import { DateTime } from "effect"
|
|
1358
1598
|
*
|
|
@@ -1371,7 +1611,8 @@ export declare const isLessThan: {
|
|
|
1371
1611
|
/**
|
|
1372
1612
|
* Checks if the first `DateTime` is before or equal to the second `DateTime`.
|
|
1373
1613
|
*
|
|
1374
|
-
*
|
|
1614
|
+
* **Example** (Checking whether a DateTime is earlier or equal)
|
|
1615
|
+
*
|
|
1375
1616
|
* ```ts
|
|
1376
1617
|
* import { DateTime } from "effect"
|
|
1377
1618
|
*
|
|
@@ -1391,7 +1632,8 @@ export declare const isLessThanOrEqualTo: {
|
|
|
1391
1632
|
/**
|
|
1392
1633
|
* Checks if the first `DateTime` is before or equal to the second `DateTime`.
|
|
1393
1634
|
*
|
|
1394
|
-
*
|
|
1635
|
+
* **Example** (Checking whether a DateTime is earlier or equal)
|
|
1636
|
+
*
|
|
1395
1637
|
* ```ts
|
|
1396
1638
|
* import { DateTime } from "effect"
|
|
1397
1639
|
*
|
|
@@ -1411,7 +1653,8 @@ export declare const isLessThanOrEqualTo: {
|
|
|
1411
1653
|
/**
|
|
1412
1654
|
* Checks if the first `DateTime` is before or equal to the second `DateTime`.
|
|
1413
1655
|
*
|
|
1414
|
-
*
|
|
1656
|
+
* **Example** (Checking whether a DateTime is earlier or equal)
|
|
1657
|
+
*
|
|
1415
1658
|
* ```ts
|
|
1416
1659
|
* import { DateTime } from "effect"
|
|
1417
1660
|
*
|
|
@@ -1432,7 +1675,8 @@ export declare const isLessThanOrEqualTo: {
|
|
|
1432
1675
|
/**
|
|
1433
1676
|
* Checks if a `DateTime` is between two other `DateTime` values (inclusive).
|
|
1434
1677
|
*
|
|
1435
|
-
*
|
|
1678
|
+
* **Example** (Checking whether a DateTime is within bounds)
|
|
1679
|
+
*
|
|
1436
1680
|
* ```ts
|
|
1437
1681
|
* import { DateTime } from "effect"
|
|
1438
1682
|
*
|
|
@@ -1450,7 +1694,8 @@ export declare const between: {
|
|
|
1450
1694
|
/**
|
|
1451
1695
|
* Checks if a `DateTime` is between two other `DateTime` values (inclusive).
|
|
1452
1696
|
*
|
|
1453
|
-
*
|
|
1697
|
+
* **Example** (Checking whether a DateTime is within bounds)
|
|
1698
|
+
*
|
|
1454
1699
|
* ```ts
|
|
1455
1700
|
* import { DateTime } from "effect"
|
|
1456
1701
|
*
|
|
@@ -1471,7 +1716,8 @@ export declare const between: {
|
|
|
1471
1716
|
/**
|
|
1472
1717
|
* Checks if a `DateTime` is between two other `DateTime` values (inclusive).
|
|
1473
1718
|
*
|
|
1474
|
-
*
|
|
1719
|
+
* **Example** (Checking whether a DateTime is within bounds)
|
|
1720
|
+
*
|
|
1475
1721
|
* ```ts
|
|
1476
1722
|
* import { DateTime } from "effect"
|
|
1477
1723
|
*
|
|
@@ -1495,7 +1741,8 @@ export declare const between: {
|
|
|
1495
1741
|
*
|
|
1496
1742
|
* This is an effectful operation that uses the current time from the `Clock` service.
|
|
1497
1743
|
*
|
|
1498
|
-
*
|
|
1744
|
+
* **Example** (Checking future DateTime values effectfully)
|
|
1745
|
+
*
|
|
1499
1746
|
* ```ts
|
|
1500
1747
|
* import { DateTime, Effect } from "effect"
|
|
1501
1748
|
*
|
|
@@ -1515,7 +1762,8 @@ export declare const isFuture: (self: DateTime) => Effect.Effect<boolean>;
|
|
|
1515
1762
|
*
|
|
1516
1763
|
* This is a synchronous version that uses `Date.now()` directly.
|
|
1517
1764
|
*
|
|
1518
|
-
*
|
|
1765
|
+
* **Example** (Checking future DateTime values unsafely)
|
|
1766
|
+
*
|
|
1519
1767
|
* ```ts
|
|
1520
1768
|
* import { DateTime } from "effect"
|
|
1521
1769
|
*
|
|
@@ -1535,7 +1783,8 @@ export declare const isFutureUnsafe: (self: DateTime) => boolean;
|
|
|
1535
1783
|
*
|
|
1536
1784
|
* This is an effectful operation that uses the current time from the `Clock` service.
|
|
1537
1785
|
*
|
|
1538
|
-
*
|
|
1786
|
+
* **Example** (Checking past DateTime values effectfully)
|
|
1787
|
+
*
|
|
1539
1788
|
* ```ts
|
|
1540
1789
|
* import { DateTime, Effect } from "effect"
|
|
1541
1790
|
*
|
|
@@ -1555,7 +1804,8 @@ export declare const isPast: (self: DateTime) => Effect.Effect<boolean>;
|
|
|
1555
1804
|
*
|
|
1556
1805
|
* This is a synchronous version that uses `Date.now()` directly.
|
|
1557
1806
|
*
|
|
1558
|
-
*
|
|
1807
|
+
* **Example** (Checking past DateTime values unsafely)
|
|
1808
|
+
*
|
|
1559
1809
|
* ```ts
|
|
1560
1810
|
* import { DateTime } from "effect"
|
|
1561
1811
|
*
|
|
@@ -1575,7 +1825,8 @@ export declare const isPastUnsafe: (self: DateTime) => boolean;
|
|
|
1575
1825
|
*
|
|
1576
1826
|
* This always returns the UTC representation, ignoring any time zone information.
|
|
1577
1827
|
*
|
|
1578
|
-
*
|
|
1828
|
+
* **Example** (Converting DateTime values to UTC Dates)
|
|
1829
|
+
*
|
|
1579
1830
|
* ```ts
|
|
1580
1831
|
* import { DateTime } from "effect"
|
|
1581
1832
|
*
|
|
@@ -1597,7 +1848,8 @@ export declare const toDateUtc: (self: DateTime) => Date;
|
|
|
1597
1848
|
* For `DateTime.Zoned`, this adjusts for the time zone before converting.
|
|
1598
1849
|
* For `DateTime.Utc`, this is equivalent to `toDateUtc`.
|
|
1599
1850
|
*
|
|
1600
|
-
*
|
|
1851
|
+
* **Example** (Converting DateTime values to Dates)
|
|
1852
|
+
*
|
|
1601
1853
|
* ```ts
|
|
1602
1854
|
* import { DateTime } from "effect"
|
|
1603
1855
|
*
|
|
@@ -1620,7 +1872,8 @@ export declare const toDate: (self: DateTime) => Date;
|
|
|
1620
1872
|
* Returns the offset from UTC in milliseconds. Positive values indicate
|
|
1621
1873
|
* time zones ahead of UTC, negative values indicate time zones behind UTC.
|
|
1622
1874
|
*
|
|
1623
|
-
*
|
|
1875
|
+
* **Example** (Reading zoned offsets)
|
|
1876
|
+
*
|
|
1624
1877
|
* ```ts
|
|
1625
1878
|
* import { DateTime } from "effect"
|
|
1626
1879
|
*
|
|
@@ -1641,7 +1894,8 @@ export declare const zonedOffset: (self: Zoned) => number;
|
|
|
1641
1894
|
*
|
|
1642
1895
|
* The offset is formatted as "±HH:MM".
|
|
1643
1896
|
*
|
|
1644
|
-
*
|
|
1897
|
+
* **Example** (Formatting zoned offsets)
|
|
1898
|
+
*
|
|
1645
1899
|
* ```ts
|
|
1646
1900
|
* import { DateTime } from "effect"
|
|
1647
1901
|
*
|
|
@@ -1662,7 +1916,8 @@ export declare const zonedOffsetIso: (self: Zoned) => string;
|
|
|
1662
1916
|
*
|
|
1663
1917
|
* This returns the UTC timestamp regardless of any time zone information.
|
|
1664
1918
|
*
|
|
1665
|
-
*
|
|
1919
|
+
* **Example** (Reading epoch milliseconds)
|
|
1920
|
+
*
|
|
1666
1921
|
* ```ts
|
|
1667
1922
|
* import { DateTime } from "effect"
|
|
1668
1923
|
*
|
|
@@ -1670,7 +1925,6 @@ export declare const zonedOffsetIso: (self: Zoned) => string;
|
|
|
1670
1925
|
* const epochMillis = DateTime.toEpochMillis(dt)
|
|
1671
1926
|
*
|
|
1672
1927
|
* console.log(epochMillis) // 1704067200000
|
|
1673
|
-
* console.log(new Date(epochMillis).toISOString()) // "2024-01-01T00:00:00.000Z"
|
|
1674
1928
|
* ```
|
|
1675
1929
|
*
|
|
1676
1930
|
* @category conversions
|
|
@@ -1681,9 +1935,8 @@ export declare const toEpochMillis: (self: DateTime) => number;
|
|
|
1681
1935
|
* Remove the time aspect of a `DateTime`, first adjusting for the time
|
|
1682
1936
|
* zone. It will return a `DateTime.Utc` only containing the date.
|
|
1683
1937
|
*
|
|
1684
|
-
*
|
|
1685
|
-
*
|
|
1686
|
-
* @example
|
|
1938
|
+
* **Example** (Removing time components)
|
|
1939
|
+
*
|
|
1687
1940
|
* ```ts
|
|
1688
1941
|
* import { DateTime } from "effect"
|
|
1689
1942
|
*
|
|
@@ -1696,6 +1949,9 @@ export declare const toEpochMillis: (self: DateTime) => number;
|
|
|
1696
1949
|
* DateTime.formatIso
|
|
1697
1950
|
* )
|
|
1698
1951
|
* ```
|
|
1952
|
+
*
|
|
1953
|
+
* @category conversions
|
|
1954
|
+
* @since 3.6.0
|
|
1699
1955
|
*/
|
|
1700
1956
|
export declare const removeTime: (self: DateTime) => Utc;
|
|
1701
1957
|
/**
|
|
@@ -1703,7 +1959,8 @@ export declare const removeTime: (self: DateTime) => Utc;
|
|
|
1703
1959
|
*
|
|
1704
1960
|
* The parts will be time zone adjusted if the `DateTime` is zoned.
|
|
1705
1961
|
*
|
|
1706
|
-
*
|
|
1962
|
+
* **Example** (Reading DateTime parts)
|
|
1963
|
+
*
|
|
1707
1964
|
* ```ts
|
|
1708
1965
|
* import { DateTime } from "effect"
|
|
1709
1966
|
*
|
|
@@ -1732,7 +1989,8 @@ export declare const toParts: (self: DateTime) => DateTime.PartsWithWeekday;
|
|
|
1732
1989
|
*
|
|
1733
1990
|
* The parts will always be in UTC, ignoring any time zone information.
|
|
1734
1991
|
*
|
|
1735
|
-
*
|
|
1992
|
+
* **Example** (Reading UTC DateTime parts)
|
|
1993
|
+
*
|
|
1736
1994
|
* ```ts
|
|
1737
1995
|
* import { DateTime } from "effect"
|
|
1738
1996
|
*
|
|
@@ -1754,17 +2012,18 @@ export declare const toPartsUtc: (self: DateTime) => DateTime.PartsWithWeekday;
|
|
|
1754
2012
|
*
|
|
1755
2013
|
* The part will be in the UTC time zone.
|
|
1756
2014
|
*
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1759
|
-
* @example
|
|
2015
|
+
* **Example** (Reading UTC DateTime parts by key)
|
|
2016
|
+
*
|
|
1760
2017
|
* ```ts
|
|
1761
2018
|
* import { DateTime } from "effect"
|
|
1762
|
-
* import * as assert from "node:assert"
|
|
1763
2019
|
*
|
|
1764
|
-
* const
|
|
1765
|
-
* const year = DateTime.getPartUtc(
|
|
1766
|
-
*
|
|
2020
|
+
* const dateTime = DateTime.makeUnsafe({ year: 2024 })
|
|
2021
|
+
* const year = DateTime.getPartUtc(dateTime, "year")
|
|
2022
|
+
* console.log(year) // 2024
|
|
1767
2023
|
* ```
|
|
2024
|
+
*
|
|
2025
|
+
* @category parts
|
|
2026
|
+
* @since 3.6.0
|
|
1768
2027
|
*/
|
|
1769
2028
|
export declare const getPartUtc: {
|
|
1770
2029
|
/**
|
|
@@ -1772,17 +2031,18 @@ export declare const getPartUtc: {
|
|
|
1772
2031
|
*
|
|
1773
2032
|
* The part will be in the UTC time zone.
|
|
1774
2033
|
*
|
|
1775
|
-
*
|
|
1776
|
-
*
|
|
1777
|
-
* @example
|
|
2034
|
+
* **Example** (Reading UTC DateTime parts by key)
|
|
2035
|
+
*
|
|
1778
2036
|
* ```ts
|
|
1779
2037
|
* import { DateTime } from "effect"
|
|
1780
|
-
* import * as assert from "node:assert"
|
|
1781
2038
|
*
|
|
1782
|
-
* const
|
|
1783
|
-
* const year = DateTime.getPartUtc(
|
|
1784
|
-
*
|
|
2039
|
+
* const dateTime = DateTime.makeUnsafe({ year: 2024 })
|
|
2040
|
+
* const year = DateTime.getPartUtc(dateTime, "year")
|
|
2041
|
+
* console.log(year) // 2024
|
|
1785
2042
|
* ```
|
|
2043
|
+
*
|
|
2044
|
+
* @category parts
|
|
2045
|
+
* @since 3.6.0
|
|
1786
2046
|
*/
|
|
1787
2047
|
(part: keyof DateTime.PartsWithWeekday): (self: DateTime) => number;
|
|
1788
2048
|
/**
|
|
@@ -1790,17 +2050,18 @@ export declare const getPartUtc: {
|
|
|
1790
2050
|
*
|
|
1791
2051
|
* The part will be in the UTC time zone.
|
|
1792
2052
|
*
|
|
1793
|
-
*
|
|
1794
|
-
*
|
|
1795
|
-
* @example
|
|
2053
|
+
* **Example** (Reading UTC DateTime parts by key)
|
|
2054
|
+
*
|
|
1796
2055
|
* ```ts
|
|
1797
2056
|
* import { DateTime } from "effect"
|
|
1798
|
-
* import * as assert from "node:assert"
|
|
1799
2057
|
*
|
|
1800
|
-
* const
|
|
1801
|
-
* const year = DateTime.getPartUtc(
|
|
1802
|
-
*
|
|
2058
|
+
* const dateTime = DateTime.makeUnsafe({ year: 2024 })
|
|
2059
|
+
* const year = DateTime.getPartUtc(dateTime, "year")
|
|
2060
|
+
* console.log(year) // 2024
|
|
1803
2061
|
* ```
|
|
2062
|
+
*
|
|
2063
|
+
* @category parts
|
|
2064
|
+
* @since 3.6.0
|
|
1804
2065
|
*/
|
|
1805
2066
|
(self: DateTime, part: keyof DateTime.PartsWithWeekday): number;
|
|
1806
2067
|
};
|
|
@@ -1809,19 +2070,20 @@ export declare const getPartUtc: {
|
|
|
1809
2070
|
*
|
|
1810
2071
|
* The part will be time zone adjusted.
|
|
1811
2072
|
*
|
|
1812
|
-
*
|
|
1813
|
-
*
|
|
1814
|
-
* @example
|
|
2073
|
+
* **Example** (Reading DateTime parts by key)
|
|
2074
|
+
*
|
|
1815
2075
|
* ```ts
|
|
1816
2076
|
* import { DateTime } from "effect"
|
|
1817
|
-
* import * as assert from "node:assert"
|
|
1818
2077
|
*
|
|
1819
|
-
* const
|
|
2078
|
+
* const dateTime = DateTime.makeZonedUnsafe({ year: 2024 }, {
|
|
1820
2079
|
* timeZone: "Europe/London"
|
|
1821
2080
|
* })
|
|
1822
|
-
* const year = DateTime.getPart(
|
|
1823
|
-
*
|
|
2081
|
+
* const year = DateTime.getPart(dateTime, "year")
|
|
2082
|
+
* console.log(year) // 2024
|
|
1824
2083
|
* ```
|
|
2084
|
+
*
|
|
2085
|
+
* @category parts
|
|
2086
|
+
* @since 3.6.0
|
|
1825
2087
|
*/
|
|
1826
2088
|
export declare const getPart: {
|
|
1827
2089
|
/**
|
|
@@ -1829,19 +2091,20 @@ export declare const getPart: {
|
|
|
1829
2091
|
*
|
|
1830
2092
|
* The part will be time zone adjusted.
|
|
1831
2093
|
*
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1834
|
-
* @example
|
|
2094
|
+
* **Example** (Reading DateTime parts by key)
|
|
2095
|
+
*
|
|
1835
2096
|
* ```ts
|
|
1836
2097
|
* import { DateTime } from "effect"
|
|
1837
|
-
* import * as assert from "node:assert"
|
|
1838
2098
|
*
|
|
1839
|
-
* const
|
|
2099
|
+
* const dateTime = DateTime.makeZonedUnsafe({ year: 2024 }, {
|
|
1840
2100
|
* timeZone: "Europe/London"
|
|
1841
2101
|
* })
|
|
1842
|
-
* const year = DateTime.getPart(
|
|
1843
|
-
*
|
|
2102
|
+
* const year = DateTime.getPart(dateTime, "year")
|
|
2103
|
+
* console.log(year) // 2024
|
|
1844
2104
|
* ```
|
|
2105
|
+
*
|
|
2106
|
+
* @category parts
|
|
2107
|
+
* @since 3.6.0
|
|
1845
2108
|
*/
|
|
1846
2109
|
(part: keyof DateTime.PartsWithWeekday): (self: DateTime) => number;
|
|
1847
2110
|
/**
|
|
@@ -1849,19 +2112,20 @@ export declare const getPart: {
|
|
|
1849
2112
|
*
|
|
1850
2113
|
* The part will be time zone adjusted.
|
|
1851
2114
|
*
|
|
1852
|
-
*
|
|
1853
|
-
*
|
|
1854
|
-
* @example
|
|
2115
|
+
* **Example** (Reading DateTime parts by key)
|
|
2116
|
+
*
|
|
1855
2117
|
* ```ts
|
|
1856
2118
|
* import { DateTime } from "effect"
|
|
1857
|
-
* import * as assert from "node:assert"
|
|
1858
2119
|
*
|
|
1859
|
-
* const
|
|
2120
|
+
* const dateTime = DateTime.makeZonedUnsafe({ year: 2024 }, {
|
|
1860
2121
|
* timeZone: "Europe/London"
|
|
1861
2122
|
* })
|
|
1862
|
-
* const year = DateTime.getPart(
|
|
1863
|
-
*
|
|
2123
|
+
* const year = DateTime.getPart(dateTime, "year")
|
|
2124
|
+
* console.log(year) // 2024
|
|
1864
2125
|
* ```
|
|
2126
|
+
*
|
|
2127
|
+
* @category parts
|
|
2128
|
+
* @since 3.6.0
|
|
1865
2129
|
*/
|
|
1866
2130
|
(self: DateTime, part: keyof DateTime.PartsWithWeekday): number;
|
|
1867
2131
|
};
|
|
@@ -1870,7 +2134,8 @@ export declare const getPart: {
|
|
|
1870
2134
|
*
|
|
1871
2135
|
* The date will be time zone adjusted for `DateTime.Zoned`.
|
|
1872
2136
|
*
|
|
1873
|
-
*
|
|
2137
|
+
* **Example** (Updating DateTime parts)
|
|
2138
|
+
*
|
|
1874
2139
|
* ```ts
|
|
1875
2140
|
* import { DateTime } from "effect"
|
|
1876
2141
|
*
|
|
@@ -1893,7 +2158,8 @@ export declare const setParts: {
|
|
|
1893
2158
|
*
|
|
1894
2159
|
* The date will be time zone adjusted for `DateTime.Zoned`.
|
|
1895
2160
|
*
|
|
1896
|
-
*
|
|
2161
|
+
* **Example** (Updating DateTime parts)
|
|
2162
|
+
*
|
|
1897
2163
|
* ```ts
|
|
1898
2164
|
* import { DateTime } from "effect"
|
|
1899
2165
|
*
|
|
@@ -1916,7 +2182,8 @@ export declare const setParts: {
|
|
|
1916
2182
|
*
|
|
1917
2183
|
* The date will be time zone adjusted for `DateTime.Zoned`.
|
|
1918
2184
|
*
|
|
1919
|
-
*
|
|
2185
|
+
* **Example** (Updating DateTime parts)
|
|
2186
|
+
*
|
|
1920
2187
|
* ```ts
|
|
1921
2188
|
* import { DateTime } from "effect"
|
|
1922
2189
|
*
|
|
@@ -1940,7 +2207,8 @@ export declare const setParts: {
|
|
|
1940
2207
|
*
|
|
1941
2208
|
* The parts are always interpreted as UTC, ignoring any time zone information.
|
|
1942
2209
|
*
|
|
1943
|
-
*
|
|
2210
|
+
* **Example** (Updating UTC DateTime parts)
|
|
2211
|
+
*
|
|
1944
2212
|
* ```ts
|
|
1945
2213
|
* import { DateTime } from "effect"
|
|
1946
2214
|
*
|
|
@@ -1962,7 +2230,8 @@ export declare const setPartsUtc: {
|
|
|
1962
2230
|
*
|
|
1963
2231
|
* The parts are always interpreted as UTC, ignoring any time zone information.
|
|
1964
2232
|
*
|
|
1965
|
-
*
|
|
2233
|
+
* **Example** (Updating UTC DateTime parts)
|
|
2234
|
+
*
|
|
1966
2235
|
* ```ts
|
|
1967
2236
|
* import { DateTime } from "effect"
|
|
1968
2237
|
*
|
|
@@ -1984,7 +2253,8 @@ export declare const setPartsUtc: {
|
|
|
1984
2253
|
*
|
|
1985
2254
|
* The parts are always interpreted as UTC, ignoring any time zone information.
|
|
1986
2255
|
*
|
|
1987
|
-
*
|
|
2256
|
+
* **Example** (Updating UTC DateTime parts)
|
|
2257
|
+
*
|
|
1988
2258
|
* ```ts
|
|
1989
2259
|
* import { DateTime } from "effect"
|
|
1990
2260
|
*
|
|
@@ -2004,13 +2274,21 @@ export declare const setPartsUtc: {
|
|
|
2004
2274
|
};
|
|
2005
2275
|
declare const CurrentTimeZone_base: Context.ServiceClass<CurrentTimeZone, "effect/DateTime/CurrentTimeZone", TimeZone>;
|
|
2006
2276
|
/**
|
|
2007
|
-
*
|
|
2277
|
+
* Context service that supplies the ambient `TimeZone` for APIs that work in
|
|
2278
|
+
* the current zone, such as `DateTime.setZoneCurrent` and
|
|
2279
|
+
* `DateTime.nowInCurrentZone`.
|
|
2280
|
+
*
|
|
2281
|
+
* Provide it with `DateTime.withCurrentZone`, one of the `withCurrentZone*`
|
|
2282
|
+
* helpers, or one of the `layerCurrentZone*` layers.
|
|
2283
|
+
*
|
|
2284
|
+
* **Example** (Accessing the current time zone service)
|
|
2285
|
+
*
|
|
2008
2286
|
* ```ts
|
|
2009
2287
|
* import { DateTime, Effect } from "effect"
|
|
2010
2288
|
*
|
|
2011
2289
|
* const program = Effect.gen(function*() {
|
|
2012
2290
|
* // Access the current time zone service
|
|
2013
|
-
* const zone = yield* DateTime.CurrentTimeZone
|
|
2291
|
+
* const zone = yield* DateTime.CurrentTimeZone
|
|
2014
2292
|
* console.log(DateTime.zoneToString(zone))
|
|
2015
2293
|
* })
|
|
2016
2294
|
*
|
|
@@ -2019,8 +2297,8 @@ declare const CurrentTimeZone_base: Context.ServiceClass<CurrentTimeZone, "effec
|
|
|
2019
2297
|
* Effect.provide(program, layer)
|
|
2020
2298
|
* ```
|
|
2021
2299
|
*
|
|
2022
|
-
* @since 3.11.0
|
|
2023
2300
|
* @category current time zone
|
|
2301
|
+
* @since 3.11.0
|
|
2024
2302
|
*/
|
|
2025
2303
|
export declare class CurrentTimeZone extends CurrentTimeZone_base {
|
|
2026
2304
|
}
|
|
@@ -2028,9 +2306,8 @@ export declare class CurrentTimeZone extends CurrentTimeZone_base {
|
|
|
2028
2306
|
* Set the time zone of a `DateTime` to the current time zone, which is
|
|
2029
2307
|
* determined by the `CurrentTimeZone` service.
|
|
2030
2308
|
*
|
|
2031
|
-
*
|
|
2032
|
-
*
|
|
2033
|
-
* @example
|
|
2309
|
+
* **Example** (Setting the current time zone)
|
|
2310
|
+
*
|
|
2034
2311
|
* ```ts
|
|
2035
2312
|
* import { DateTime, Effect } from "effect"
|
|
2036
2313
|
*
|
|
@@ -2041,14 +2318,16 @@ export declare class CurrentTimeZone extends CurrentTimeZone_base {
|
|
|
2041
2318
|
* const zoned = yield* DateTime.setZoneCurrent(now)
|
|
2042
2319
|
* }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
|
|
2043
2320
|
* ```
|
|
2321
|
+
*
|
|
2322
|
+
* @category current time zone
|
|
2323
|
+
* @since 3.6.0
|
|
2044
2324
|
*/
|
|
2045
2325
|
export declare const setZoneCurrent: (self: DateTime) => Effect.Effect<Zoned, never, CurrentTimeZone>;
|
|
2046
2326
|
/**
|
|
2047
2327
|
* Provide the `CurrentTimeZone` to an effect.
|
|
2048
2328
|
*
|
|
2049
|
-
*
|
|
2050
|
-
*
|
|
2051
|
-
* @example
|
|
2329
|
+
* **Example** (Providing the current time zone)
|
|
2330
|
+
*
|
|
2052
2331
|
* ```ts
|
|
2053
2332
|
* import { DateTime, Effect } from "effect"
|
|
2054
2333
|
*
|
|
@@ -2058,14 +2337,16 @@ export declare const setZoneCurrent: (self: DateTime) => Effect.Effect<Zoned, ne
|
|
|
2058
2337
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2059
2338
|
* }).pipe(DateTime.withCurrentZone(zone))
|
|
2060
2339
|
* ```
|
|
2340
|
+
*
|
|
2341
|
+
* @category current time zone
|
|
2342
|
+
* @since 3.6.0
|
|
2061
2343
|
*/
|
|
2062
2344
|
export declare const withCurrentZone: {
|
|
2063
2345
|
/**
|
|
2064
2346
|
* Provide the `CurrentTimeZone` to an effect.
|
|
2065
2347
|
*
|
|
2066
|
-
*
|
|
2067
|
-
*
|
|
2068
|
-
* @example
|
|
2348
|
+
* **Example** (Providing the current time zone)
|
|
2349
|
+
*
|
|
2069
2350
|
* ```ts
|
|
2070
2351
|
* import { DateTime, Effect } from "effect"
|
|
2071
2352
|
*
|
|
@@ -2075,14 +2356,16 @@ export declare const withCurrentZone: {
|
|
|
2075
2356
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2076
2357
|
* }).pipe(DateTime.withCurrentZone(zone))
|
|
2077
2358
|
* ```
|
|
2359
|
+
*
|
|
2360
|
+
* @category current time zone
|
|
2361
|
+
* @since 3.6.0
|
|
2078
2362
|
*/
|
|
2079
2363
|
(value: TimeZone): <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>;
|
|
2080
2364
|
/**
|
|
2081
2365
|
* Provide the `CurrentTimeZone` to an effect.
|
|
2082
2366
|
*
|
|
2083
|
-
*
|
|
2084
|
-
*
|
|
2085
|
-
* @example
|
|
2367
|
+
* **Example** (Providing the current time zone)
|
|
2368
|
+
*
|
|
2086
2369
|
* ```ts
|
|
2087
2370
|
* import { DateTime, Effect } from "effect"
|
|
2088
2371
|
*
|
|
@@ -2092,6 +2375,9 @@ export declare const withCurrentZone: {
|
|
|
2092
2375
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2093
2376
|
* }).pipe(DateTime.withCurrentZone(zone))
|
|
2094
2377
|
* ```
|
|
2378
|
+
*
|
|
2379
|
+
* @category current time zone
|
|
2380
|
+
* @since 3.6.0
|
|
2095
2381
|
*/
|
|
2096
2382
|
<A, E, R>(self: Effect.Effect<A, E, R>, value: TimeZone): Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>;
|
|
2097
2383
|
};
|
|
@@ -2099,9 +2385,8 @@ export declare const withCurrentZone: {
|
|
|
2099
2385
|
* Provide the `CurrentTimeZone` to an effect, using the system's local time
|
|
2100
2386
|
* zone.
|
|
2101
2387
|
*
|
|
2102
|
-
*
|
|
2103
|
-
*
|
|
2104
|
-
* @example
|
|
2388
|
+
* **Example** (Providing the local time zone)
|
|
2389
|
+
*
|
|
2105
2390
|
* ```ts
|
|
2106
2391
|
* import { DateTime, Effect } from "effect"
|
|
2107
2392
|
*
|
|
@@ -2110,54 +2395,63 @@ export declare const withCurrentZone: {
|
|
|
2110
2395
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2111
2396
|
* }).pipe(DateTime.withCurrentZoneLocal)
|
|
2112
2397
|
* ```
|
|
2398
|
+
*
|
|
2399
|
+
* @category current time zone
|
|
2400
|
+
* @since 3.6.0
|
|
2113
2401
|
*/
|
|
2114
2402
|
export declare const withCurrentZoneLocal: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>;
|
|
2115
2403
|
/**
|
|
2116
2404
|
* Provide the `CurrentTimeZone` to an effect, using a offset.
|
|
2117
2405
|
*
|
|
2118
|
-
*
|
|
2119
|
-
*
|
|
2120
|
-
* @example
|
|
2406
|
+
* **Example** (Providing a fixed-offset time zone)
|
|
2407
|
+
*
|
|
2121
2408
|
* ```ts
|
|
2122
2409
|
* import { DateTime, Effect } from "effect"
|
|
2123
2410
|
*
|
|
2124
2411
|
* Effect.gen(function*() {
|
|
2125
|
-
*
|
|
2126
|
-
*
|
|
2412
|
+
* const zone = yield* DateTime.CurrentTimeZone
|
|
2413
|
+
* console.log(DateTime.zoneToString(zone)) // "+03:00"
|
|
2127
2414
|
* }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000))
|
|
2128
2415
|
* ```
|
|
2416
|
+
*
|
|
2417
|
+
* @category current time zone
|
|
2418
|
+
* @since 3.6.0
|
|
2129
2419
|
*/
|
|
2130
2420
|
export declare const withCurrentZoneOffset: {
|
|
2131
2421
|
/**
|
|
2132
2422
|
* Provide the `CurrentTimeZone` to an effect, using a offset.
|
|
2133
2423
|
*
|
|
2134
|
-
*
|
|
2135
|
-
*
|
|
2136
|
-
* @example
|
|
2424
|
+
* **Example** (Providing a fixed-offset time zone)
|
|
2425
|
+
*
|
|
2137
2426
|
* ```ts
|
|
2138
2427
|
* import { DateTime, Effect } from "effect"
|
|
2139
2428
|
*
|
|
2140
2429
|
* Effect.gen(function*() {
|
|
2141
|
-
*
|
|
2142
|
-
*
|
|
2430
|
+
* const zone = yield* DateTime.CurrentTimeZone
|
|
2431
|
+
* console.log(DateTime.zoneToString(zone)) // "+03:00"
|
|
2143
2432
|
* }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000))
|
|
2144
2433
|
* ```
|
|
2434
|
+
*
|
|
2435
|
+
* @category current time zone
|
|
2436
|
+
* @since 3.6.0
|
|
2145
2437
|
*/
|
|
2146
2438
|
(offset: number): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>;
|
|
2147
2439
|
/**
|
|
2148
2440
|
* Provide the `CurrentTimeZone` to an effect, using a offset.
|
|
2149
2441
|
*
|
|
2150
|
-
*
|
|
2151
|
-
*
|
|
2152
|
-
* @example
|
|
2442
|
+
* **Example** (Providing a fixed-offset time zone)
|
|
2443
|
+
*
|
|
2153
2444
|
* ```ts
|
|
2154
2445
|
* import { DateTime, Effect } from "effect"
|
|
2155
2446
|
*
|
|
2156
2447
|
* Effect.gen(function*() {
|
|
2157
|
-
*
|
|
2158
|
-
*
|
|
2448
|
+
* const zone = yield* DateTime.CurrentTimeZone
|
|
2449
|
+
* console.log(DateTime.zoneToString(zone)) // "+03:00"
|
|
2159
2450
|
* }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000))
|
|
2160
2451
|
* ```
|
|
2452
|
+
*
|
|
2453
|
+
* @category current time zone
|
|
2454
|
+
* @since 3.6.0
|
|
2161
2455
|
*/
|
|
2162
2456
|
<A, E, R>(effect: Effect.Effect<A, E, R>, offset: number): Effect.Effect<A, E, Exclude<R, CurrentTimeZone>>;
|
|
2163
2457
|
};
|
|
@@ -2167,9 +2461,8 @@ export declare const withCurrentZoneOffset: {
|
|
|
2167
2461
|
*
|
|
2168
2462
|
* If the time zone is invalid, it will fail with an `IllegalArgumentError`.
|
|
2169
2463
|
*
|
|
2170
|
-
*
|
|
2171
|
-
*
|
|
2172
|
-
* @example
|
|
2464
|
+
* **Example** (Providing a named time zone)
|
|
2465
|
+
*
|
|
2173
2466
|
* ```ts
|
|
2174
2467
|
* import { DateTime, Effect } from "effect"
|
|
2175
2468
|
*
|
|
@@ -2178,6 +2471,9 @@ export declare const withCurrentZoneOffset: {
|
|
|
2178
2471
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2179
2472
|
* }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
|
|
2180
2473
|
* ```
|
|
2474
|
+
*
|
|
2475
|
+
* @category current time zone
|
|
2476
|
+
* @since 3.6.0
|
|
2181
2477
|
*/
|
|
2182
2478
|
export declare const withCurrentZoneNamed: {
|
|
2183
2479
|
/**
|
|
@@ -2186,9 +2482,8 @@ export declare const withCurrentZoneNamed: {
|
|
|
2186
2482
|
*
|
|
2187
2483
|
* If the time zone is invalid, it will fail with an `IllegalArgumentError`.
|
|
2188
2484
|
*
|
|
2189
|
-
*
|
|
2190
|
-
*
|
|
2191
|
-
* @example
|
|
2485
|
+
* **Example** (Providing a named time zone)
|
|
2486
|
+
*
|
|
2192
2487
|
* ```ts
|
|
2193
2488
|
* import { DateTime, Effect } from "effect"
|
|
2194
2489
|
*
|
|
@@ -2197,6 +2492,9 @@ export declare const withCurrentZoneNamed: {
|
|
|
2197
2492
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2198
2493
|
* }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
|
|
2199
2494
|
* ```
|
|
2495
|
+
*
|
|
2496
|
+
* @category current time zone
|
|
2497
|
+
* @since 3.6.0
|
|
2200
2498
|
*/
|
|
2201
2499
|
(zone: string): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | IllegalArgumentError, Exclude<R, CurrentTimeZone>>;
|
|
2202
2500
|
/**
|
|
@@ -2205,9 +2503,8 @@ export declare const withCurrentZoneNamed: {
|
|
|
2205
2503
|
*
|
|
2206
2504
|
* If the time zone is invalid, it will fail with an `IllegalArgumentError`.
|
|
2207
2505
|
*
|
|
2208
|
-
*
|
|
2209
|
-
*
|
|
2210
|
-
* @example
|
|
2506
|
+
* **Example** (Providing a named time zone)
|
|
2507
|
+
*
|
|
2211
2508
|
* ```ts
|
|
2212
2509
|
* import { DateTime, Effect } from "effect"
|
|
2213
2510
|
*
|
|
@@ -2216,15 +2513,17 @@ export declare const withCurrentZoneNamed: {
|
|
|
2216
2513
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2217
2514
|
* }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
|
|
2218
2515
|
* ```
|
|
2516
|
+
*
|
|
2517
|
+
* @category current time zone
|
|
2518
|
+
* @since 3.6.0
|
|
2219
2519
|
*/
|
|
2220
2520
|
<A, E, R>(effect: Effect.Effect<A, E, R>, zone: string): Effect.Effect<A, E | IllegalArgumentError, Exclude<R, CurrentTimeZone>>;
|
|
2221
2521
|
};
|
|
2222
2522
|
/**
|
|
2223
2523
|
* Get the current time as a `DateTime.Zoned`, using the `CurrentTimeZone`.
|
|
2224
2524
|
*
|
|
2225
|
-
*
|
|
2226
|
-
*
|
|
2227
|
-
* @example
|
|
2525
|
+
* **Example** (Getting the current time in the current zone)
|
|
2526
|
+
*
|
|
2228
2527
|
* ```ts
|
|
2229
2528
|
* import { DateTime, Effect } from "effect"
|
|
2230
2529
|
*
|
|
@@ -2233,6 +2532,9 @@ export declare const withCurrentZoneNamed: {
|
|
|
2233
2532
|
* const now = yield* DateTime.nowInCurrentZone
|
|
2234
2533
|
* }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
|
|
2235
2534
|
* ```
|
|
2535
|
+
*
|
|
2536
|
+
* @category current time zone
|
|
2537
|
+
* @since 3.6.0
|
|
2236
2538
|
*/
|
|
2237
2539
|
export declare const nowInCurrentZone: Effect.Effect<Zoned, never, CurrentTimeZone>;
|
|
2238
2540
|
/**
|
|
@@ -2243,7 +2545,8 @@ export declare const nowInCurrentZone: Effect.Effect<Zoned, never, CurrentTimeZo
|
|
|
2243
2545
|
*
|
|
2244
2546
|
* Supports `disambiguation` when the new wall clock time is ambiguous.
|
|
2245
2547
|
*
|
|
2246
|
-
*
|
|
2548
|
+
* **Example** (Mutating DateTime values with Dates)
|
|
2549
|
+
*
|
|
2247
2550
|
* ```ts
|
|
2248
2551
|
* import { DateTime } from "effect"
|
|
2249
2552
|
*
|
|
@@ -2257,8 +2560,8 @@ export declare const nowInCurrentZone: Effect.Effect<Zoned, never, CurrentTimeZo
|
|
|
2257
2560
|
* console.log(DateTime.formatIso(modified)) // "2024-01-01T15:30:00.000Z"
|
|
2258
2561
|
* ```
|
|
2259
2562
|
*
|
|
2260
|
-
* @since 3.6.0
|
|
2261
2563
|
* @category mapping
|
|
2564
|
+
* @since 3.6.0
|
|
2262
2565
|
*/
|
|
2263
2566
|
export declare const mutate: {
|
|
2264
2567
|
/**
|
|
@@ -2269,7 +2572,8 @@ export declare const mutate: {
|
|
|
2269
2572
|
*
|
|
2270
2573
|
* Supports `disambiguation` when the new wall clock time is ambiguous.
|
|
2271
2574
|
*
|
|
2272
|
-
*
|
|
2575
|
+
* **Example** (Mutating DateTime values with Dates)
|
|
2576
|
+
*
|
|
2273
2577
|
* ```ts
|
|
2274
2578
|
* import { DateTime } from "effect"
|
|
2275
2579
|
*
|
|
@@ -2283,8 +2587,8 @@ export declare const mutate: {
|
|
|
2283
2587
|
* console.log(DateTime.formatIso(modified)) // "2024-01-01T15:30:00.000Z"
|
|
2284
2588
|
* ```
|
|
2285
2589
|
*
|
|
2286
|
-
* @since 3.6.0
|
|
2287
2590
|
* @category mapping
|
|
2591
|
+
* @since 3.6.0
|
|
2288
2592
|
*/
|
|
2289
2593
|
(f: (date: Date) => void, options?: {
|
|
2290
2594
|
readonly disambiguation?: Disambiguation | undefined;
|
|
@@ -2297,7 +2601,8 @@ export declare const mutate: {
|
|
|
2297
2601
|
*
|
|
2298
2602
|
* Supports `disambiguation` when the new wall clock time is ambiguous.
|
|
2299
2603
|
*
|
|
2300
|
-
*
|
|
2604
|
+
* **Example** (Mutating DateTime values with Dates)
|
|
2605
|
+
*
|
|
2301
2606
|
* ```ts
|
|
2302
2607
|
* import { DateTime } from "effect"
|
|
2303
2608
|
*
|
|
@@ -2311,8 +2616,8 @@ export declare const mutate: {
|
|
|
2311
2616
|
* console.log(DateTime.formatIso(modified)) // "2024-01-01T15:30:00.000Z"
|
|
2312
2617
|
* ```
|
|
2313
2618
|
*
|
|
2314
|
-
* @since 3.6.0
|
|
2315
2619
|
* @category mapping
|
|
2620
|
+
* @since 3.6.0
|
|
2316
2621
|
*/
|
|
2317
2622
|
<A extends DateTime>(self: A, f: (date: Date) => void, options?: {
|
|
2318
2623
|
readonly disambiguation?: Disambiguation | undefined;
|
|
@@ -2321,7 +2626,8 @@ export declare const mutate: {
|
|
|
2321
2626
|
/**
|
|
2322
2627
|
* Modify a `DateTime` by applying a function to a cloned UTC `Date` instance.
|
|
2323
2628
|
*
|
|
2324
|
-
*
|
|
2629
|
+
* **Example** (Mutating DateTime values with UTC Dates)
|
|
2630
|
+
*
|
|
2325
2631
|
* ```ts
|
|
2326
2632
|
* import { DateTime } from "effect"
|
|
2327
2633
|
*
|
|
@@ -2336,14 +2642,15 @@ export declare const mutate: {
|
|
|
2336
2642
|
* console.log(DateTime.formatIso(modified)) // "2024-01-01T18:00:00.000Z"
|
|
2337
2643
|
* ```
|
|
2338
2644
|
*
|
|
2339
|
-
* @since 3.6.0
|
|
2340
2645
|
* @category mapping
|
|
2646
|
+
* @since 3.6.0
|
|
2341
2647
|
*/
|
|
2342
2648
|
export declare const mutateUtc: {
|
|
2343
2649
|
/**
|
|
2344
2650
|
* Modify a `DateTime` by applying a function to a cloned UTC `Date` instance.
|
|
2345
2651
|
*
|
|
2346
|
-
*
|
|
2652
|
+
* **Example** (Mutating DateTime values with UTC Dates)
|
|
2653
|
+
*
|
|
2347
2654
|
* ```ts
|
|
2348
2655
|
* import { DateTime } from "effect"
|
|
2349
2656
|
*
|
|
@@ -2358,14 +2665,15 @@ export declare const mutateUtc: {
|
|
|
2358
2665
|
* console.log(DateTime.formatIso(modified)) // "2024-01-01T18:00:00.000Z"
|
|
2359
2666
|
* ```
|
|
2360
2667
|
*
|
|
2361
|
-
* @since 3.6.0
|
|
2362
2668
|
* @category mapping
|
|
2669
|
+
* @since 3.6.0
|
|
2363
2670
|
*/
|
|
2364
2671
|
(f: (date: Date) => void): <A extends DateTime>(self: A) => A;
|
|
2365
2672
|
/**
|
|
2366
2673
|
* Modify a `DateTime` by applying a function to a cloned UTC `Date` instance.
|
|
2367
2674
|
*
|
|
2368
|
-
*
|
|
2675
|
+
* **Example** (Mutating DateTime values with UTC Dates)
|
|
2676
|
+
*
|
|
2369
2677
|
* ```ts
|
|
2370
2678
|
* import { DateTime } from "effect"
|
|
2371
2679
|
*
|
|
@@ -2380,8 +2688,8 @@ export declare const mutateUtc: {
|
|
|
2380
2688
|
* console.log(DateTime.formatIso(modified)) // "2024-01-01T18:00:00.000Z"
|
|
2381
2689
|
* ```
|
|
2382
2690
|
*
|
|
2383
|
-
* @since 3.6.0
|
|
2384
2691
|
* @category mapping
|
|
2692
|
+
* @since 3.6.0
|
|
2385
2693
|
*/
|
|
2386
2694
|
<A extends DateTime>(self: A, f: (date: Date) => void): A;
|
|
2387
2695
|
};
|
|
@@ -2389,9 +2697,8 @@ export declare const mutateUtc: {
|
|
|
2389
2697
|
* Transform a `DateTime` by applying a function to the number of milliseconds
|
|
2390
2698
|
* since the Unix epoch.
|
|
2391
2699
|
*
|
|
2392
|
-
*
|
|
2393
|
-
*
|
|
2394
|
-
* @example
|
|
2700
|
+
* **Example** (Mapping epoch milliseconds)
|
|
2701
|
+
*
|
|
2395
2702
|
* ```ts
|
|
2396
2703
|
* import { DateTime } from "effect"
|
|
2397
2704
|
*
|
|
@@ -2400,15 +2707,17 @@ export declare const mutateUtc: {
|
|
|
2400
2707
|
* DateTime.mapEpochMillis((millis) => millis + 10)
|
|
2401
2708
|
* )
|
|
2402
2709
|
* ```
|
|
2710
|
+
*
|
|
2711
|
+
* @category mapping
|
|
2712
|
+
* @since 3.6.0
|
|
2403
2713
|
*/
|
|
2404
2714
|
export declare const mapEpochMillis: {
|
|
2405
2715
|
/**
|
|
2406
2716
|
* Transform a `DateTime` by applying a function to the number of milliseconds
|
|
2407
2717
|
* since the Unix epoch.
|
|
2408
2718
|
*
|
|
2409
|
-
*
|
|
2410
|
-
*
|
|
2411
|
-
* @example
|
|
2719
|
+
* **Example** (Mapping epoch milliseconds)
|
|
2720
|
+
*
|
|
2412
2721
|
* ```ts
|
|
2413
2722
|
* import { DateTime } from "effect"
|
|
2414
2723
|
*
|
|
@@ -2417,15 +2726,17 @@ export declare const mapEpochMillis: {
|
|
|
2417
2726
|
* DateTime.mapEpochMillis((millis) => millis + 10)
|
|
2418
2727
|
* )
|
|
2419
2728
|
* ```
|
|
2729
|
+
*
|
|
2730
|
+
* @category mapping
|
|
2731
|
+
* @since 3.6.0
|
|
2420
2732
|
*/
|
|
2421
2733
|
(f: (millis: number) => number): <A extends DateTime>(self: A) => A;
|
|
2422
2734
|
/**
|
|
2423
2735
|
* Transform a `DateTime` by applying a function to the number of milliseconds
|
|
2424
2736
|
* since the Unix epoch.
|
|
2425
2737
|
*
|
|
2426
|
-
*
|
|
2427
|
-
*
|
|
2428
|
-
* @example
|
|
2738
|
+
* **Example** (Mapping epoch milliseconds)
|
|
2739
|
+
*
|
|
2429
2740
|
* ```ts
|
|
2430
2741
|
* import { DateTime } from "effect"
|
|
2431
2742
|
*
|
|
@@ -2434,16 +2745,21 @@ export declare const mapEpochMillis: {
|
|
|
2434
2745
|
* DateTime.mapEpochMillis((millis) => millis + 10)
|
|
2435
2746
|
* )
|
|
2436
2747
|
* ```
|
|
2748
|
+
*
|
|
2749
|
+
* @category mapping
|
|
2750
|
+
* @since 3.6.0
|
|
2437
2751
|
*/
|
|
2438
2752
|
<A extends DateTime>(self: A, f: (millis: number) => number): A;
|
|
2439
2753
|
};
|
|
2440
2754
|
/**
|
|
2441
|
-
*
|
|
2442
|
-
*
|
|
2755
|
+
* Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
|
|
2756
|
+
* instant and returns the function's result.
|
|
2757
|
+
*
|
|
2758
|
+
* This ignores any associated time zone. Use `DateTime.withDate` when the
|
|
2759
|
+
* callback should receive the time-zone-adjusted wall-clock date.
|
|
2760
|
+
*
|
|
2761
|
+
* **Example** (Using time zone adjusted Dates)
|
|
2443
2762
|
*
|
|
2444
|
-
* @since 3.6.0
|
|
2445
|
-
* @category mapping
|
|
2446
|
-
* @example
|
|
2447
2763
|
* ```ts
|
|
2448
2764
|
* import { DateTime } from "effect"
|
|
2449
2765
|
*
|
|
@@ -2452,15 +2768,20 @@ export declare const mapEpochMillis: {
|
|
|
2452
2768
|
* DateTime.withDate((date) => date.getTime())
|
|
2453
2769
|
* )
|
|
2454
2770
|
* ```
|
|
2771
|
+
*
|
|
2772
|
+
* @category mapping
|
|
2773
|
+
* @since 3.6.0
|
|
2455
2774
|
*/
|
|
2456
2775
|
export declare const withDate: {
|
|
2457
2776
|
/**
|
|
2458
|
-
*
|
|
2459
|
-
*
|
|
2777
|
+
* Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
|
|
2778
|
+
* instant and returns the function's result.
|
|
2779
|
+
*
|
|
2780
|
+
* This ignores any associated time zone. Use `DateTime.withDate` when the
|
|
2781
|
+
* callback should receive the time-zone-adjusted wall-clock date.
|
|
2782
|
+
*
|
|
2783
|
+
* **Example** (Using time zone adjusted Dates)
|
|
2460
2784
|
*
|
|
2461
|
-
* @since 3.6.0
|
|
2462
|
-
* @category mapping
|
|
2463
|
-
* @example
|
|
2464
2785
|
* ```ts
|
|
2465
2786
|
* import { DateTime } from "effect"
|
|
2466
2787
|
*
|
|
@@ -2469,15 +2790,20 @@ export declare const withDate: {
|
|
|
2469
2790
|
* DateTime.withDate((date) => date.getTime())
|
|
2470
2791
|
* )
|
|
2471
2792
|
* ```
|
|
2793
|
+
*
|
|
2794
|
+
* @category mapping
|
|
2795
|
+
* @since 3.6.0
|
|
2472
2796
|
*/
|
|
2473
2797
|
<A>(f: (date: Date) => A): (self: DateTime) => A;
|
|
2474
2798
|
/**
|
|
2475
|
-
*
|
|
2476
|
-
*
|
|
2799
|
+
* Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
|
|
2800
|
+
* instant and returns the function's result.
|
|
2801
|
+
*
|
|
2802
|
+
* This ignores any associated time zone. Use `DateTime.withDate` when the
|
|
2803
|
+
* callback should receive the time-zone-adjusted wall-clock date.
|
|
2804
|
+
*
|
|
2805
|
+
* **Example** (Using time zone adjusted Dates)
|
|
2477
2806
|
*
|
|
2478
|
-
* @since 3.6.0
|
|
2479
|
-
* @category mapping
|
|
2480
|
-
* @example
|
|
2481
2807
|
* ```ts
|
|
2482
2808
|
* import { DateTime } from "effect"
|
|
2483
2809
|
*
|
|
@@ -2486,16 +2812,21 @@ export declare const withDate: {
|
|
|
2486
2812
|
* DateTime.withDate((date) => date.getTime())
|
|
2487
2813
|
* )
|
|
2488
2814
|
* ```
|
|
2815
|
+
*
|
|
2816
|
+
* @category mapping
|
|
2817
|
+
* @since 3.6.0
|
|
2489
2818
|
*/
|
|
2490
2819
|
<A>(self: DateTime, f: (date: Date) => A): A;
|
|
2491
2820
|
};
|
|
2492
2821
|
/**
|
|
2493
|
-
*
|
|
2494
|
-
*
|
|
2822
|
+
* Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
|
|
2823
|
+
* instant and returns the function's result.
|
|
2824
|
+
*
|
|
2825
|
+
* This ignores any associated time zone. Use `DateTime.withDate` when the
|
|
2826
|
+
* callback should receive the time-zone-adjusted wall-clock date.
|
|
2827
|
+
*
|
|
2828
|
+
* **Example** (Using UTC Dates)
|
|
2495
2829
|
*
|
|
2496
|
-
* @since 3.6.0
|
|
2497
|
-
* @category mapping
|
|
2498
|
-
* @example
|
|
2499
2830
|
* ```ts
|
|
2500
2831
|
* import { DateTime } from "effect"
|
|
2501
2832
|
*
|
|
@@ -2504,15 +2835,20 @@ export declare const withDate: {
|
|
|
2504
2835
|
* DateTime.withDateUtc((date) => date.getTime())
|
|
2505
2836
|
* )
|
|
2506
2837
|
* ```
|
|
2838
|
+
*
|
|
2839
|
+
* @category mapping
|
|
2840
|
+
* @since 3.6.0
|
|
2507
2841
|
*/
|
|
2508
2842
|
export declare const withDateUtc: {
|
|
2509
2843
|
/**
|
|
2510
|
-
*
|
|
2511
|
-
*
|
|
2844
|
+
* Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
|
|
2845
|
+
* instant and returns the function's result.
|
|
2846
|
+
*
|
|
2847
|
+
* This ignores any associated time zone. Use `DateTime.withDate` when the
|
|
2848
|
+
* callback should receive the time-zone-adjusted wall-clock date.
|
|
2849
|
+
*
|
|
2850
|
+
* **Example** (Using UTC Dates)
|
|
2512
2851
|
*
|
|
2513
|
-
* @since 3.6.0
|
|
2514
|
-
* @category mapping
|
|
2515
|
-
* @example
|
|
2516
2852
|
* ```ts
|
|
2517
2853
|
* import { DateTime } from "effect"
|
|
2518
2854
|
*
|
|
@@ -2521,15 +2857,20 @@ export declare const withDateUtc: {
|
|
|
2521
2857
|
* DateTime.withDateUtc((date) => date.getTime())
|
|
2522
2858
|
* )
|
|
2523
2859
|
* ```
|
|
2860
|
+
*
|
|
2861
|
+
* @category mapping
|
|
2862
|
+
* @since 3.6.0
|
|
2524
2863
|
*/
|
|
2525
2864
|
<A>(f: (date: Date) => A): (self: DateTime) => A;
|
|
2526
2865
|
/**
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2866
|
+
* Applies a function to a JavaScript `Date` representing the `DateTime`'s UTC
|
|
2867
|
+
* instant and returns the function's result.
|
|
2868
|
+
*
|
|
2869
|
+
* This ignores any associated time zone. Use `DateTime.withDate` when the
|
|
2870
|
+
* callback should receive the time-zone-adjusted wall-clock date.
|
|
2871
|
+
*
|
|
2872
|
+
* **Example** (Using UTC Dates)
|
|
2529
2873
|
*
|
|
2530
|
-
* @since 3.6.0
|
|
2531
|
-
* @category mapping
|
|
2532
|
-
* @example
|
|
2533
2874
|
* ```ts
|
|
2534
2875
|
* import { DateTime } from "effect"
|
|
2535
2876
|
*
|
|
@@ -2538,18 +2879,24 @@ export declare const withDateUtc: {
|
|
|
2538
2879
|
* DateTime.withDateUtc((date) => date.getTime())
|
|
2539
2880
|
* )
|
|
2540
2881
|
* ```
|
|
2882
|
+
*
|
|
2883
|
+
* @category mapping
|
|
2884
|
+
* @since 3.6.0
|
|
2541
2885
|
*/
|
|
2542
2886
|
<A>(self: DateTime, f: (date: Date) => A): A;
|
|
2543
2887
|
};
|
|
2544
2888
|
/**
|
|
2545
2889
|
* Pattern match on a `DateTime` to handle `Utc` and `Zoned` cases differently.
|
|
2546
2890
|
*
|
|
2547
|
-
*
|
|
2891
|
+
* **Example** (Pattern matching DateTime variants)
|
|
2892
|
+
*
|
|
2548
2893
|
* ```ts
|
|
2549
2894
|
* import { DateTime } from "effect"
|
|
2550
2895
|
*
|
|
2551
|
-
* const dt1 = DateTime.
|
|
2552
|
-
* const dt2 = DateTime.makeZonedUnsafe(
|
|
2896
|
+
* const dt1 = DateTime.makeUnsafe("2024-01-01T12:00:00Z") // Utc
|
|
2897
|
+
* const dt2 = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
|
|
2898
|
+
* timeZone: "Europe/London"
|
|
2899
|
+
* }) // Zoned
|
|
2553
2900
|
*
|
|
2554
2901
|
* const result1 = DateTime.match(dt1, {
|
|
2555
2902
|
* onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
|
|
@@ -2560,6 +2907,9 @@ export declare const withDateUtc: {
|
|
|
2560
2907
|
* onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
|
|
2561
2908
|
* onZoned: (zoned) => `Zoned: ${DateTime.formatIsoZoned(zoned)}`
|
|
2562
2909
|
* })
|
|
2910
|
+
*
|
|
2911
|
+
* console.log(result1) // "UTC: 2024-01-01T12:00:00.000Z"
|
|
2912
|
+
* console.log(result2) // "Zoned: 2024-06-15T15:30:00.000+01:00[Europe/London]"
|
|
2563
2913
|
* ```
|
|
2564
2914
|
*
|
|
2565
2915
|
* @category mapping
|
|
@@ -2569,12 +2919,15 @@ export declare const match: {
|
|
|
2569
2919
|
/**
|
|
2570
2920
|
* Pattern match on a `DateTime` to handle `Utc` and `Zoned` cases differently.
|
|
2571
2921
|
*
|
|
2572
|
-
*
|
|
2922
|
+
* **Example** (Pattern matching DateTime variants)
|
|
2923
|
+
*
|
|
2573
2924
|
* ```ts
|
|
2574
2925
|
* import { DateTime } from "effect"
|
|
2575
2926
|
*
|
|
2576
|
-
* const dt1 = DateTime.
|
|
2577
|
-
* const dt2 = DateTime.makeZonedUnsafe(
|
|
2927
|
+
* const dt1 = DateTime.makeUnsafe("2024-01-01T12:00:00Z") // Utc
|
|
2928
|
+
* const dt2 = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
|
|
2929
|
+
* timeZone: "Europe/London"
|
|
2930
|
+
* }) // Zoned
|
|
2578
2931
|
*
|
|
2579
2932
|
* const result1 = DateTime.match(dt1, {
|
|
2580
2933
|
* onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
|
|
@@ -2585,6 +2938,9 @@ export declare const match: {
|
|
|
2585
2938
|
* onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
|
|
2586
2939
|
* onZoned: (zoned) => `Zoned: ${DateTime.formatIsoZoned(zoned)}`
|
|
2587
2940
|
* })
|
|
2941
|
+
*
|
|
2942
|
+
* console.log(result1) // "UTC: 2024-01-01T12:00:00.000Z"
|
|
2943
|
+
* console.log(result2) // "Zoned: 2024-06-15T15:30:00.000+01:00[Europe/London]"
|
|
2588
2944
|
* ```
|
|
2589
2945
|
*
|
|
2590
2946
|
* @category mapping
|
|
@@ -2597,12 +2953,15 @@ export declare const match: {
|
|
|
2597
2953
|
/**
|
|
2598
2954
|
* Pattern match on a `DateTime` to handle `Utc` and `Zoned` cases differently.
|
|
2599
2955
|
*
|
|
2600
|
-
*
|
|
2956
|
+
* **Example** (Pattern matching DateTime variants)
|
|
2957
|
+
*
|
|
2601
2958
|
* ```ts
|
|
2602
2959
|
* import { DateTime } from "effect"
|
|
2603
2960
|
*
|
|
2604
|
-
* const dt1 = DateTime.
|
|
2605
|
-
* const dt2 = DateTime.makeZonedUnsafe(
|
|
2961
|
+
* const dt1 = DateTime.makeUnsafe("2024-01-01T12:00:00Z") // Utc
|
|
2962
|
+
* const dt2 = DateTime.makeZonedUnsafe("2024-06-15T14:30:00Z", {
|
|
2963
|
+
* timeZone: "Europe/London"
|
|
2964
|
+
* }) // Zoned
|
|
2606
2965
|
*
|
|
2607
2966
|
* const result1 = DateTime.match(dt1, {
|
|
2608
2967
|
* onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
|
|
@@ -2613,6 +2972,9 @@ export declare const match: {
|
|
|
2613
2972
|
* onUtc: (utc) => `UTC: ${DateTime.formatIso(utc)}`,
|
|
2614
2973
|
* onZoned: (zoned) => `Zoned: ${DateTime.formatIsoZoned(zoned)}`
|
|
2615
2974
|
* })
|
|
2975
|
+
*
|
|
2976
|
+
* console.log(result1) // "UTC: 2024-01-01T12:00:00.000Z"
|
|
2977
|
+
* console.log(result2) // "Zoned: 2024-06-15T15:30:00.000+01:00[Europe/London]"
|
|
2616
2978
|
* ```
|
|
2617
2979
|
*
|
|
2618
2980
|
* @category mapping
|
|
@@ -2626,9 +2988,8 @@ export declare const match: {
|
|
|
2626
2988
|
/**
|
|
2627
2989
|
* Add the given `Duration` to a `DateTime`.
|
|
2628
2990
|
*
|
|
2629
|
-
*
|
|
2630
|
-
*
|
|
2631
|
-
* @example
|
|
2991
|
+
* **Example** (Adding durations)
|
|
2992
|
+
*
|
|
2632
2993
|
* ```ts
|
|
2633
2994
|
* import { DateTime } from "effect"
|
|
2634
2995
|
*
|
|
@@ -2637,14 +2998,16 @@ export declare const match: {
|
|
|
2637
2998
|
* DateTime.addDuration("5 minutes")
|
|
2638
2999
|
* )
|
|
2639
3000
|
* ```
|
|
3001
|
+
*
|
|
3002
|
+
* @category math
|
|
3003
|
+
* @since 3.6.0
|
|
2640
3004
|
*/
|
|
2641
3005
|
export declare const addDuration: {
|
|
2642
3006
|
/**
|
|
2643
3007
|
* Add the given `Duration` to a `DateTime`.
|
|
2644
3008
|
*
|
|
2645
|
-
*
|
|
2646
|
-
*
|
|
2647
|
-
* @example
|
|
3009
|
+
* **Example** (Adding durations)
|
|
3010
|
+
*
|
|
2648
3011
|
* ```ts
|
|
2649
3012
|
* import { DateTime } from "effect"
|
|
2650
3013
|
*
|
|
@@ -2653,14 +3016,16 @@ export declare const addDuration: {
|
|
|
2653
3016
|
* DateTime.addDuration("5 minutes")
|
|
2654
3017
|
* )
|
|
2655
3018
|
* ```
|
|
3019
|
+
*
|
|
3020
|
+
* @category math
|
|
3021
|
+
* @since 3.6.0
|
|
2656
3022
|
*/
|
|
2657
3023
|
(duration: Duration.Input): <A extends DateTime>(self: A) => A;
|
|
2658
3024
|
/**
|
|
2659
3025
|
* Add the given `Duration` to a `DateTime`.
|
|
2660
3026
|
*
|
|
2661
|
-
*
|
|
2662
|
-
*
|
|
2663
|
-
* @example
|
|
3027
|
+
* **Example** (Adding durations)
|
|
3028
|
+
*
|
|
2664
3029
|
* ```ts
|
|
2665
3030
|
* import { DateTime } from "effect"
|
|
2666
3031
|
*
|
|
@@ -2669,15 +3034,17 @@ export declare const addDuration: {
|
|
|
2669
3034
|
* DateTime.addDuration("5 minutes")
|
|
2670
3035
|
* )
|
|
2671
3036
|
* ```
|
|
3037
|
+
*
|
|
3038
|
+
* @category math
|
|
3039
|
+
* @since 3.6.0
|
|
2672
3040
|
*/
|
|
2673
3041
|
<A extends DateTime>(self: A, duration: Duration.Input): A;
|
|
2674
3042
|
};
|
|
2675
3043
|
/**
|
|
2676
3044
|
* Subtract the given `Duration` from a `DateTime`.
|
|
2677
3045
|
*
|
|
2678
|
-
*
|
|
2679
|
-
*
|
|
2680
|
-
* @example
|
|
3046
|
+
* **Example** (Subtracting durations)
|
|
3047
|
+
*
|
|
2681
3048
|
* ```ts
|
|
2682
3049
|
* import { DateTime } from "effect"
|
|
2683
3050
|
*
|
|
@@ -2686,14 +3053,16 @@ export declare const addDuration: {
|
|
|
2686
3053
|
* DateTime.subtractDuration("5 minutes")
|
|
2687
3054
|
* )
|
|
2688
3055
|
* ```
|
|
3056
|
+
*
|
|
3057
|
+
* @category math
|
|
3058
|
+
* @since 3.6.0
|
|
2689
3059
|
*/
|
|
2690
3060
|
export declare const subtractDuration: {
|
|
2691
3061
|
/**
|
|
2692
3062
|
* Subtract the given `Duration` from a `DateTime`.
|
|
2693
3063
|
*
|
|
2694
|
-
*
|
|
2695
|
-
*
|
|
2696
|
-
* @example
|
|
3064
|
+
* **Example** (Subtracting durations)
|
|
3065
|
+
*
|
|
2697
3066
|
* ```ts
|
|
2698
3067
|
* import { DateTime } from "effect"
|
|
2699
3068
|
*
|
|
@@ -2702,14 +3071,16 @@ export declare const subtractDuration: {
|
|
|
2702
3071
|
* DateTime.subtractDuration("5 minutes")
|
|
2703
3072
|
* )
|
|
2704
3073
|
* ```
|
|
3074
|
+
*
|
|
3075
|
+
* @category math
|
|
3076
|
+
* @since 3.6.0
|
|
2705
3077
|
*/
|
|
2706
3078
|
(duration: Duration.Input): <A extends DateTime>(self: A) => A;
|
|
2707
3079
|
/**
|
|
2708
3080
|
* Subtract the given `Duration` from a `DateTime`.
|
|
2709
3081
|
*
|
|
2710
|
-
*
|
|
2711
|
-
*
|
|
2712
|
-
* @example
|
|
3082
|
+
* **Example** (Subtracting durations)
|
|
3083
|
+
*
|
|
2713
3084
|
* ```ts
|
|
2714
3085
|
* import { DateTime } from "effect"
|
|
2715
3086
|
*
|
|
@@ -2718,6 +3089,9 @@ export declare const subtractDuration: {
|
|
|
2718
3089
|
* DateTime.subtractDuration("5 minutes")
|
|
2719
3090
|
* )
|
|
2720
3091
|
* ```
|
|
3092
|
+
*
|
|
3093
|
+
* @category math
|
|
3094
|
+
* @since 3.6.0
|
|
2721
3095
|
*/
|
|
2722
3096
|
<A extends DateTime>(self: A, duration: Duration.Input): A;
|
|
2723
3097
|
};
|
|
@@ -2727,9 +3101,8 @@ export declare const subtractDuration: {
|
|
|
2727
3101
|
* The time zone is taken into account when adding days, weeks, months, and
|
|
2728
3102
|
* years.
|
|
2729
3103
|
*
|
|
2730
|
-
*
|
|
2731
|
-
*
|
|
2732
|
-
* @example
|
|
3104
|
+
* **Example** (Adding date and time parts)
|
|
3105
|
+
*
|
|
2733
3106
|
* ```ts
|
|
2734
3107
|
* import { DateTime } from "effect"
|
|
2735
3108
|
*
|
|
@@ -2738,6 +3111,9 @@ export declare const subtractDuration: {
|
|
|
2738
3111
|
* DateTime.add({ minutes: 5 })
|
|
2739
3112
|
* )
|
|
2740
3113
|
* ```
|
|
3114
|
+
*
|
|
3115
|
+
* @category math
|
|
3116
|
+
* @since 3.6.0
|
|
2741
3117
|
*/
|
|
2742
3118
|
export declare const add: {
|
|
2743
3119
|
/**
|
|
@@ -2746,9 +3122,8 @@ export declare const add: {
|
|
|
2746
3122
|
* The time zone is taken into account when adding days, weeks, months, and
|
|
2747
3123
|
* years.
|
|
2748
3124
|
*
|
|
2749
|
-
*
|
|
2750
|
-
*
|
|
2751
|
-
* @example
|
|
3125
|
+
* **Example** (Adding date and time parts)
|
|
3126
|
+
*
|
|
2752
3127
|
* ```ts
|
|
2753
3128
|
* import { DateTime } from "effect"
|
|
2754
3129
|
*
|
|
@@ -2757,6 +3132,9 @@ export declare const add: {
|
|
|
2757
3132
|
* DateTime.add({ minutes: 5 })
|
|
2758
3133
|
* )
|
|
2759
3134
|
* ```
|
|
3135
|
+
*
|
|
3136
|
+
* @category math
|
|
3137
|
+
* @since 3.6.0
|
|
2760
3138
|
*/
|
|
2761
3139
|
(parts: Partial<DateTime.PartsForMath>): <A extends DateTime>(self: A) => A;
|
|
2762
3140
|
/**
|
|
@@ -2765,9 +3143,8 @@ export declare const add: {
|
|
|
2765
3143
|
* The time zone is taken into account when adding days, weeks, months, and
|
|
2766
3144
|
* years.
|
|
2767
3145
|
*
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
2770
|
-
* @example
|
|
3146
|
+
* **Example** (Adding date and time parts)
|
|
3147
|
+
*
|
|
2771
3148
|
* ```ts
|
|
2772
3149
|
* import { DateTime } from "effect"
|
|
2773
3150
|
*
|
|
@@ -2776,15 +3153,17 @@ export declare const add: {
|
|
|
2776
3153
|
* DateTime.add({ minutes: 5 })
|
|
2777
3154
|
* )
|
|
2778
3155
|
* ```
|
|
3156
|
+
*
|
|
3157
|
+
* @category math
|
|
3158
|
+
* @since 3.6.0
|
|
2779
3159
|
*/
|
|
2780
3160
|
<A extends DateTime>(self: A, parts: Partial<DateTime.PartsForMath>): A;
|
|
2781
3161
|
};
|
|
2782
3162
|
/**
|
|
2783
3163
|
* Subtract the given `amount` of `unit`'s from a `DateTime`.
|
|
2784
3164
|
*
|
|
2785
|
-
*
|
|
2786
|
-
*
|
|
2787
|
-
* @example
|
|
3165
|
+
* **Example** (Subtracting date and time parts)
|
|
3166
|
+
*
|
|
2788
3167
|
* ```ts
|
|
2789
3168
|
* import { DateTime } from "effect"
|
|
2790
3169
|
*
|
|
@@ -2793,14 +3172,16 @@ export declare const add: {
|
|
|
2793
3172
|
* DateTime.subtract({ minutes: 5 })
|
|
2794
3173
|
* )
|
|
2795
3174
|
* ```
|
|
3175
|
+
*
|
|
3176
|
+
* @category math
|
|
3177
|
+
* @since 3.6.0
|
|
2796
3178
|
*/
|
|
2797
3179
|
export declare const subtract: {
|
|
2798
3180
|
/**
|
|
2799
3181
|
* Subtract the given `amount` of `unit`'s from a `DateTime`.
|
|
2800
3182
|
*
|
|
2801
|
-
*
|
|
2802
|
-
*
|
|
2803
|
-
* @example
|
|
3183
|
+
* **Example** (Subtracting date and time parts)
|
|
3184
|
+
*
|
|
2804
3185
|
* ```ts
|
|
2805
3186
|
* import { DateTime } from "effect"
|
|
2806
3187
|
*
|
|
@@ -2809,14 +3190,16 @@ export declare const subtract: {
|
|
|
2809
3190
|
* DateTime.subtract({ minutes: 5 })
|
|
2810
3191
|
* )
|
|
2811
3192
|
* ```
|
|
3193
|
+
*
|
|
3194
|
+
* @category math
|
|
3195
|
+
* @since 3.6.0
|
|
2812
3196
|
*/
|
|
2813
3197
|
(parts: Partial<DateTime.PartsForMath>): <A extends DateTime>(self: A) => A;
|
|
2814
3198
|
/**
|
|
2815
3199
|
* Subtract the given `amount` of `unit`'s from a `DateTime`.
|
|
2816
3200
|
*
|
|
2817
|
-
*
|
|
2818
|
-
*
|
|
2819
|
-
* @example
|
|
3201
|
+
* **Example** (Subtracting date and time parts)
|
|
3202
|
+
*
|
|
2820
3203
|
* ```ts
|
|
2821
3204
|
* import { DateTime } from "effect"
|
|
2822
3205
|
*
|
|
@@ -2825,6 +3208,9 @@ export declare const subtract: {
|
|
|
2825
3208
|
* DateTime.subtract({ minutes: 5 })
|
|
2826
3209
|
* )
|
|
2827
3210
|
* ```
|
|
3211
|
+
*
|
|
3212
|
+
* @category math
|
|
3213
|
+
* @since 3.6.0
|
|
2828
3214
|
*/
|
|
2829
3215
|
<A extends DateTime>(self: A, parts: Partial<DateTime.PartsForMath>): A;
|
|
2830
3216
|
};
|
|
@@ -2834,9 +3220,8 @@ export declare const subtract: {
|
|
|
2834
3220
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2835
3221
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2836
3222
|
*
|
|
2837
|
-
*
|
|
2838
|
-
*
|
|
2839
|
-
* @example
|
|
3223
|
+
* **Example** (Rounding down DateTime values)
|
|
3224
|
+
*
|
|
2840
3225
|
* ```ts
|
|
2841
3226
|
* import { DateTime } from "effect"
|
|
2842
3227
|
*
|
|
@@ -2846,6 +3231,9 @@ export declare const subtract: {
|
|
|
2846
3231
|
* DateTime.formatIso
|
|
2847
3232
|
* )
|
|
2848
3233
|
* ```
|
|
3234
|
+
*
|
|
3235
|
+
* @category math
|
|
3236
|
+
* @since 3.6.0
|
|
2849
3237
|
*/
|
|
2850
3238
|
export declare const startOf: {
|
|
2851
3239
|
/**
|
|
@@ -2854,9 +3242,8 @@ export declare const startOf: {
|
|
|
2854
3242
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2855
3243
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2856
3244
|
*
|
|
2857
|
-
*
|
|
2858
|
-
*
|
|
2859
|
-
* @example
|
|
3245
|
+
* **Example** (Rounding down DateTime values)
|
|
3246
|
+
*
|
|
2860
3247
|
* ```ts
|
|
2861
3248
|
* import { DateTime } from "effect"
|
|
2862
3249
|
*
|
|
@@ -2866,6 +3253,9 @@ export declare const startOf: {
|
|
|
2866
3253
|
* DateTime.formatIso
|
|
2867
3254
|
* )
|
|
2868
3255
|
* ```
|
|
3256
|
+
*
|
|
3257
|
+
* @category math
|
|
3258
|
+
* @since 3.6.0
|
|
2869
3259
|
*/
|
|
2870
3260
|
(part: DateTime.UnitSingular, options?: {
|
|
2871
3261
|
readonly weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
@@ -2876,9 +3266,8 @@ export declare const startOf: {
|
|
|
2876
3266
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2877
3267
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2878
3268
|
*
|
|
2879
|
-
*
|
|
2880
|
-
*
|
|
2881
|
-
* @example
|
|
3269
|
+
* **Example** (Rounding down DateTime values)
|
|
3270
|
+
*
|
|
2882
3271
|
* ```ts
|
|
2883
3272
|
* import { DateTime } from "effect"
|
|
2884
3273
|
*
|
|
@@ -2888,6 +3277,9 @@ export declare const startOf: {
|
|
|
2888
3277
|
* DateTime.formatIso
|
|
2889
3278
|
* )
|
|
2890
3279
|
* ```
|
|
3280
|
+
*
|
|
3281
|
+
* @category math
|
|
3282
|
+
* @since 3.6.0
|
|
2891
3283
|
*/
|
|
2892
3284
|
<A extends DateTime>(self: A, part: DateTime.UnitSingular, options?: {
|
|
2893
3285
|
readonly weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
@@ -2899,9 +3291,8 @@ export declare const startOf: {
|
|
|
2899
3291
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2900
3292
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2901
3293
|
*
|
|
2902
|
-
*
|
|
2903
|
-
*
|
|
2904
|
-
* @example
|
|
3294
|
+
* **Example** (Rounding up DateTime values)
|
|
3295
|
+
*
|
|
2905
3296
|
* ```ts
|
|
2906
3297
|
* import { DateTime } from "effect"
|
|
2907
3298
|
*
|
|
@@ -2911,6 +3302,9 @@ export declare const startOf: {
|
|
|
2911
3302
|
* DateTime.formatIso
|
|
2912
3303
|
* )
|
|
2913
3304
|
* ```
|
|
3305
|
+
*
|
|
3306
|
+
* @category math
|
|
3307
|
+
* @since 3.6.0
|
|
2914
3308
|
*/
|
|
2915
3309
|
export declare const endOf: {
|
|
2916
3310
|
/**
|
|
@@ -2919,9 +3313,8 @@ export declare const endOf: {
|
|
|
2919
3313
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2920
3314
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2921
3315
|
*
|
|
2922
|
-
*
|
|
2923
|
-
*
|
|
2924
|
-
* @example
|
|
3316
|
+
* **Example** (Rounding up DateTime values)
|
|
3317
|
+
*
|
|
2925
3318
|
* ```ts
|
|
2926
3319
|
* import { DateTime } from "effect"
|
|
2927
3320
|
*
|
|
@@ -2931,6 +3324,9 @@ export declare const endOf: {
|
|
|
2931
3324
|
* DateTime.formatIso
|
|
2932
3325
|
* )
|
|
2933
3326
|
* ```
|
|
3327
|
+
*
|
|
3328
|
+
* @category math
|
|
3329
|
+
* @since 3.6.0
|
|
2934
3330
|
*/
|
|
2935
3331
|
(part: DateTime.UnitSingular, options?: {
|
|
2936
3332
|
readonly weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
@@ -2941,9 +3337,8 @@ export declare const endOf: {
|
|
|
2941
3337
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2942
3338
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2943
3339
|
*
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2946
|
-
* @example
|
|
3340
|
+
* **Example** (Rounding up DateTime values)
|
|
3341
|
+
*
|
|
2947
3342
|
* ```ts
|
|
2948
3343
|
* import { DateTime } from "effect"
|
|
2949
3344
|
*
|
|
@@ -2953,6 +3348,9 @@ export declare const endOf: {
|
|
|
2953
3348
|
* DateTime.formatIso
|
|
2954
3349
|
* )
|
|
2955
3350
|
* ```
|
|
3351
|
+
*
|
|
3352
|
+
* @category math
|
|
3353
|
+
* @since 3.6.0
|
|
2956
3354
|
*/
|
|
2957
3355
|
<A extends DateTime>(self: A, part: DateTime.UnitSingular, options?: {
|
|
2958
3356
|
readonly weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
@@ -2964,9 +3362,8 @@ export declare const endOf: {
|
|
|
2964
3362
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2965
3363
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2966
3364
|
*
|
|
2967
|
-
*
|
|
2968
|
-
*
|
|
2969
|
-
* @example
|
|
3365
|
+
* **Example** (Rounding DateTime values to nearest units)
|
|
3366
|
+
*
|
|
2970
3367
|
* ```ts
|
|
2971
3368
|
* import { DateTime } from "effect"
|
|
2972
3369
|
*
|
|
@@ -2976,6 +3373,9 @@ export declare const endOf: {
|
|
|
2976
3373
|
* DateTime.formatIso
|
|
2977
3374
|
* )
|
|
2978
3375
|
* ```
|
|
3376
|
+
*
|
|
3377
|
+
* @category math
|
|
3378
|
+
* @since 3.6.0
|
|
2979
3379
|
*/
|
|
2980
3380
|
export declare const nearest: {
|
|
2981
3381
|
/**
|
|
@@ -2984,9 +3384,8 @@ export declare const nearest: {
|
|
|
2984
3384
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
2985
3385
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
2986
3386
|
*
|
|
2987
|
-
*
|
|
2988
|
-
*
|
|
2989
|
-
* @example
|
|
3387
|
+
* **Example** (Rounding DateTime values to nearest units)
|
|
3388
|
+
*
|
|
2990
3389
|
* ```ts
|
|
2991
3390
|
* import { DateTime } from "effect"
|
|
2992
3391
|
*
|
|
@@ -2996,6 +3395,9 @@ export declare const nearest: {
|
|
|
2996
3395
|
* DateTime.formatIso
|
|
2997
3396
|
* )
|
|
2998
3397
|
* ```
|
|
3398
|
+
*
|
|
3399
|
+
* @category math
|
|
3400
|
+
* @since 3.6.0
|
|
2999
3401
|
*/
|
|
3000
3402
|
(part: DateTime.UnitSingular, options?: {
|
|
3001
3403
|
readonly weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
@@ -3006,9 +3408,8 @@ export declare const nearest: {
|
|
|
3006
3408
|
* If the part is `week`, the `weekStartsOn` option can be used to specify the
|
|
3007
3409
|
* day of the week that the week starts on. The default is 0 (Sunday).
|
|
3008
3410
|
*
|
|
3009
|
-
*
|
|
3010
|
-
*
|
|
3011
|
-
* @example
|
|
3411
|
+
* **Example** (Rounding DateTime values to nearest units)
|
|
3412
|
+
*
|
|
3012
3413
|
* ```ts
|
|
3013
3414
|
* import { DateTime } from "effect"
|
|
3014
3415
|
*
|
|
@@ -3018,20 +3419,26 @@ export declare const nearest: {
|
|
|
3018
3419
|
* DateTime.formatIso
|
|
3019
3420
|
* )
|
|
3020
3421
|
* ```
|
|
3422
|
+
*
|
|
3423
|
+
* @category math
|
|
3424
|
+
* @since 3.6.0
|
|
3021
3425
|
*/
|
|
3022
3426
|
<A extends DateTime>(self: A, part: DateTime.UnitSingular, options?: {
|
|
3023
3427
|
readonly weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
3024
3428
|
}): A;
|
|
3025
3429
|
};
|
|
3026
3430
|
/**
|
|
3027
|
-
*
|
|
3431
|
+
* Formats a `DateTime` with `Intl.DateTimeFormat`.
|
|
3432
|
+
*
|
|
3433
|
+
* Unless a `timeZone` option is supplied, UTC values are formatted in UTC and
|
|
3434
|
+
* zoned values are formatted in their named zone or fixed-offset zone.
|
|
3028
3435
|
*
|
|
3029
|
-
*
|
|
3436
|
+
* Fixed-offset zones depend on runtime support for offset `timeZone`
|
|
3437
|
+
* identifiers. When unsupported, formatting falls back to UTC with the
|
|
3438
|
+
* `DateTime` adjusted to the offset.
|
|
3030
3439
|
*
|
|
3031
|
-
*
|
|
3032
|
-
* "UTC" and use the adjusted `Date`.
|
|
3440
|
+
* **Example** (Formatting DateTime values with Intl options)
|
|
3033
3441
|
*
|
|
3034
|
-
* @example
|
|
3035
3442
|
* ```ts
|
|
3036
3443
|
* import { DateTime } from "effect"
|
|
3037
3444
|
*
|
|
@@ -3048,19 +3455,22 @@ export declare const nearest: {
|
|
|
3048
3455
|
* console.log(formatted) // "Saturday, June 15, 2024 at 3:30 PM"
|
|
3049
3456
|
* ```
|
|
3050
3457
|
*
|
|
3051
|
-
* @since 3.6.0
|
|
3052
3458
|
* @category formatting
|
|
3459
|
+
* @since 3.6.0
|
|
3053
3460
|
*/
|
|
3054
3461
|
export declare const format: {
|
|
3055
3462
|
/**
|
|
3056
|
-
*
|
|
3463
|
+
* Formats a `DateTime` with `Intl.DateTimeFormat`.
|
|
3464
|
+
*
|
|
3465
|
+
* Unless a `timeZone` option is supplied, UTC values are formatted in UTC and
|
|
3466
|
+
* zoned values are formatted in their named zone or fixed-offset zone.
|
|
3057
3467
|
*
|
|
3058
|
-
*
|
|
3468
|
+
* Fixed-offset zones depend on runtime support for offset `timeZone`
|
|
3469
|
+
* identifiers. When unsupported, formatting falls back to UTC with the
|
|
3470
|
+
* `DateTime` adjusted to the offset.
|
|
3059
3471
|
*
|
|
3060
|
-
*
|
|
3061
|
-
* "UTC" and use the adjusted `Date`.
|
|
3472
|
+
* **Example** (Formatting DateTime values with Intl options)
|
|
3062
3473
|
*
|
|
3063
|
-
* @example
|
|
3064
3474
|
* ```ts
|
|
3065
3475
|
* import { DateTime } from "effect"
|
|
3066
3476
|
*
|
|
@@ -3077,21 +3487,24 @@ export declare const format: {
|
|
|
3077
3487
|
* console.log(formatted) // "Saturday, June 15, 2024 at 3:30 PM"
|
|
3078
3488
|
* ```
|
|
3079
3489
|
*
|
|
3080
|
-
* @since 3.6.0
|
|
3081
3490
|
* @category formatting
|
|
3491
|
+
* @since 3.6.0
|
|
3082
3492
|
*/
|
|
3083
3493
|
(options?: Intl.DateTimeFormatOptions & {
|
|
3084
3494
|
readonly locale?: string | undefined;
|
|
3085
3495
|
} | undefined): (self: DateTime) => string;
|
|
3086
3496
|
/**
|
|
3087
|
-
*
|
|
3497
|
+
* Formats a `DateTime` with `Intl.DateTimeFormat`.
|
|
3498
|
+
*
|
|
3499
|
+
* Unless a `timeZone` option is supplied, UTC values are formatted in UTC and
|
|
3500
|
+
* zoned values are formatted in their named zone or fixed-offset zone.
|
|
3088
3501
|
*
|
|
3089
|
-
*
|
|
3502
|
+
* Fixed-offset zones depend on runtime support for offset `timeZone`
|
|
3503
|
+
* identifiers. When unsupported, formatting falls back to UTC with the
|
|
3504
|
+
* `DateTime` adjusted to the offset.
|
|
3090
3505
|
*
|
|
3091
|
-
*
|
|
3092
|
-
* "UTC" and use the adjusted `Date`.
|
|
3506
|
+
* **Example** (Formatting DateTime values with Intl options)
|
|
3093
3507
|
*
|
|
3094
|
-
* @example
|
|
3095
3508
|
* ```ts
|
|
3096
3509
|
* import { DateTime } from "effect"
|
|
3097
3510
|
*
|
|
@@ -3108,8 +3521,8 @@ export declare const format: {
|
|
|
3108
3521
|
* console.log(formatted) // "Saturday, June 15, 2024 at 3:30 PM"
|
|
3109
3522
|
* ```
|
|
3110
3523
|
*
|
|
3111
|
-
* @since 3.6.0
|
|
3112
3524
|
* @category formatting
|
|
3525
|
+
* @since 3.6.0
|
|
3113
3526
|
*/
|
|
3114
3527
|
(self: DateTime, options?: Intl.DateTimeFormatOptions & {
|
|
3115
3528
|
readonly locale?: string | undefined;
|
|
@@ -3120,7 +3533,8 @@ export declare const format: {
|
|
|
3120
3533
|
*
|
|
3121
3534
|
* It will use the system's local time zone & locale.
|
|
3122
3535
|
*
|
|
3123
|
-
*
|
|
3536
|
+
* **Example** (Formatting DateTime values locally)
|
|
3537
|
+
*
|
|
3124
3538
|
* ```ts
|
|
3125
3539
|
* import { DateTime } from "effect"
|
|
3126
3540
|
*
|
|
@@ -3138,8 +3552,8 @@ export declare const format: {
|
|
|
3138
3552
|
* console.log(local) // Output depends on system locale/timezone
|
|
3139
3553
|
* ```
|
|
3140
3554
|
*
|
|
3141
|
-
* @since 3.6.0
|
|
3142
3555
|
* @category formatting
|
|
3556
|
+
* @since 3.6.0
|
|
3143
3557
|
*/
|
|
3144
3558
|
export declare const formatLocal: {
|
|
3145
3559
|
/**
|
|
@@ -3147,7 +3561,8 @@ export declare const formatLocal: {
|
|
|
3147
3561
|
*
|
|
3148
3562
|
* It will use the system's local time zone & locale.
|
|
3149
3563
|
*
|
|
3150
|
-
*
|
|
3564
|
+
* **Example** (Formatting DateTime values locally)
|
|
3565
|
+
*
|
|
3151
3566
|
* ```ts
|
|
3152
3567
|
* import { DateTime } from "effect"
|
|
3153
3568
|
*
|
|
@@ -3165,8 +3580,8 @@ export declare const formatLocal: {
|
|
|
3165
3580
|
* console.log(local) // Output depends on system locale/timezone
|
|
3166
3581
|
* ```
|
|
3167
3582
|
*
|
|
3168
|
-
* @since 3.6.0
|
|
3169
3583
|
* @category formatting
|
|
3584
|
+
* @since 3.6.0
|
|
3170
3585
|
*/
|
|
3171
3586
|
(options?: Intl.DateTimeFormatOptions & {
|
|
3172
3587
|
readonly locale?: string | undefined;
|
|
@@ -3176,7 +3591,8 @@ export declare const formatLocal: {
|
|
|
3176
3591
|
*
|
|
3177
3592
|
* It will use the system's local time zone & locale.
|
|
3178
3593
|
*
|
|
3179
|
-
*
|
|
3594
|
+
* **Example** (Formatting DateTime values locally)
|
|
3595
|
+
*
|
|
3180
3596
|
* ```ts
|
|
3181
3597
|
* import { DateTime } from "effect"
|
|
3182
3598
|
*
|
|
@@ -3194,8 +3610,8 @@ export declare const formatLocal: {
|
|
|
3194
3610
|
* console.log(local) // Output depends on system locale/timezone
|
|
3195
3611
|
* ```
|
|
3196
3612
|
*
|
|
3197
|
-
* @since 3.6.0
|
|
3198
3613
|
* @category formatting
|
|
3614
|
+
* @since 3.6.0
|
|
3199
3615
|
*/
|
|
3200
3616
|
(self: DateTime, options?: Intl.DateTimeFormatOptions & {
|
|
3201
3617
|
readonly locale?: string | undefined;
|
|
@@ -3206,7 +3622,8 @@ export declare const formatLocal: {
|
|
|
3206
3622
|
*
|
|
3207
3623
|
* This forces the time zone to be UTC.
|
|
3208
3624
|
*
|
|
3209
|
-
*
|
|
3625
|
+
* **Example** (Formatting DateTime values in UTC)
|
|
3626
|
+
*
|
|
3210
3627
|
* ```ts
|
|
3211
3628
|
* import { DateTime } from "effect"
|
|
3212
3629
|
*
|
|
@@ -3227,8 +3644,8 @@ export declare const formatLocal: {
|
|
|
3227
3644
|
* console.log(utcFormatted) // "06/15/2024, 02:30 PM UTC"
|
|
3228
3645
|
* ```
|
|
3229
3646
|
*
|
|
3230
|
-
* @since 3.6.0
|
|
3231
3647
|
* @category formatting
|
|
3648
|
+
* @since 3.6.0
|
|
3232
3649
|
*/
|
|
3233
3650
|
export declare const formatUtc: {
|
|
3234
3651
|
/**
|
|
@@ -3236,7 +3653,8 @@ export declare const formatUtc: {
|
|
|
3236
3653
|
*
|
|
3237
3654
|
* This forces the time zone to be UTC.
|
|
3238
3655
|
*
|
|
3239
|
-
*
|
|
3656
|
+
* **Example** (Formatting DateTime values in UTC)
|
|
3657
|
+
*
|
|
3240
3658
|
* ```ts
|
|
3241
3659
|
* import { DateTime } from "effect"
|
|
3242
3660
|
*
|
|
@@ -3257,8 +3675,8 @@ export declare const formatUtc: {
|
|
|
3257
3675
|
* console.log(utcFormatted) // "06/15/2024, 02:30 PM UTC"
|
|
3258
3676
|
* ```
|
|
3259
3677
|
*
|
|
3260
|
-
* @since 3.6.0
|
|
3261
3678
|
* @category formatting
|
|
3679
|
+
* @since 3.6.0
|
|
3262
3680
|
*/
|
|
3263
3681
|
(options?: Intl.DateTimeFormatOptions & {
|
|
3264
3682
|
readonly locale?: string | undefined;
|
|
@@ -3268,7 +3686,8 @@ export declare const formatUtc: {
|
|
|
3268
3686
|
*
|
|
3269
3687
|
* This forces the time zone to be UTC.
|
|
3270
3688
|
*
|
|
3271
|
-
*
|
|
3689
|
+
* **Example** (Formatting DateTime values in UTC)
|
|
3690
|
+
*
|
|
3272
3691
|
* ```ts
|
|
3273
3692
|
* import { DateTime } from "effect"
|
|
3274
3693
|
*
|
|
@@ -3289,8 +3708,8 @@ export declare const formatUtc: {
|
|
|
3289
3708
|
* console.log(utcFormatted) // "06/15/2024, 02:30 PM UTC"
|
|
3290
3709
|
* ```
|
|
3291
3710
|
*
|
|
3292
|
-
* @since 3.6.0
|
|
3293
3711
|
* @category formatting
|
|
3712
|
+
* @since 3.6.0
|
|
3294
3713
|
*/
|
|
3295
3714
|
(self: DateTime, options?: Intl.DateTimeFormatOptions & {
|
|
3296
3715
|
readonly locale?: string | undefined;
|
|
@@ -3299,7 +3718,8 @@ export declare const formatUtc: {
|
|
|
3299
3718
|
/**
|
|
3300
3719
|
* Format a `DateTime` as a string using the `DateTimeFormat` API.
|
|
3301
3720
|
*
|
|
3302
|
-
*
|
|
3721
|
+
* **Example** (Formatting DateTime values with custom formatters)
|
|
3722
|
+
*
|
|
3303
3723
|
* ```ts
|
|
3304
3724
|
* import { DateTime } from "effect"
|
|
3305
3725
|
*
|
|
@@ -3319,14 +3739,15 @@ export declare const formatUtc: {
|
|
|
3319
3739
|
* console.log(formatted) // "15. Juni 2024, 16:30"
|
|
3320
3740
|
* ```
|
|
3321
3741
|
*
|
|
3322
|
-
* @since 3.6.0
|
|
3323
3742
|
* @category formatting
|
|
3743
|
+
* @since 3.6.0
|
|
3324
3744
|
*/
|
|
3325
3745
|
export declare const formatIntl: {
|
|
3326
3746
|
/**
|
|
3327
3747
|
* Format a `DateTime` as a string using the `DateTimeFormat` API.
|
|
3328
3748
|
*
|
|
3329
|
-
*
|
|
3749
|
+
* **Example** (Formatting DateTime values with custom formatters)
|
|
3750
|
+
*
|
|
3330
3751
|
* ```ts
|
|
3331
3752
|
* import { DateTime } from "effect"
|
|
3332
3753
|
*
|
|
@@ -3346,14 +3767,15 @@ export declare const formatIntl: {
|
|
|
3346
3767
|
* console.log(formatted) // "15. Juni 2024, 16:30"
|
|
3347
3768
|
* ```
|
|
3348
3769
|
*
|
|
3349
|
-
* @since 3.6.0
|
|
3350
3770
|
* @category formatting
|
|
3771
|
+
* @since 3.6.0
|
|
3351
3772
|
*/
|
|
3352
3773
|
(format: Intl.DateTimeFormat): (self: DateTime) => string;
|
|
3353
3774
|
/**
|
|
3354
3775
|
* Format a `DateTime` as a string using the `DateTimeFormat` API.
|
|
3355
3776
|
*
|
|
3356
|
-
*
|
|
3777
|
+
* **Example** (Formatting DateTime values with custom formatters)
|
|
3778
|
+
*
|
|
3357
3779
|
* ```ts
|
|
3358
3780
|
* import { DateTime } from "effect"
|
|
3359
3781
|
*
|
|
@@ -3373,8 +3795,8 @@ export declare const formatIntl: {
|
|
|
3373
3795
|
* console.log(formatted) // "15. Juni 2024, 16:30"
|
|
3374
3796
|
* ```
|
|
3375
3797
|
*
|
|
3376
|
-
* @since 3.6.0
|
|
3377
3798
|
* @category formatting
|
|
3799
|
+
* @since 3.6.0
|
|
3378
3800
|
*/
|
|
3379
3801
|
(self: DateTime, format: Intl.DateTimeFormat): string;
|
|
3380
3802
|
};
|
|
@@ -3383,7 +3805,8 @@ export declare const formatIntl: {
|
|
|
3383
3805
|
*
|
|
3384
3806
|
* Always returns the UTC representation in ISO 8601 format, ignoring any time zone.
|
|
3385
3807
|
*
|
|
3386
|
-
*
|
|
3808
|
+
* **Example** (Formatting DateTime values as ISO strings)
|
|
3809
|
+
*
|
|
3387
3810
|
* ```ts
|
|
3388
3811
|
* import { DateTime } from "effect"
|
|
3389
3812
|
*
|
|
@@ -3405,7 +3828,8 @@ export declare const formatIso: (self: DateTime) => string;
|
|
|
3405
3828
|
*
|
|
3406
3829
|
* Returns only the date part (YYYY-MM-DD) after applying time zone adjustments.
|
|
3407
3830
|
*
|
|
3408
|
-
*
|
|
3831
|
+
* **Example** (Formatting DateTime values as ISO dates)
|
|
3832
|
+
*
|
|
3409
3833
|
* ```ts
|
|
3410
3834
|
* import { DateTime } from "effect"
|
|
3411
3835
|
*
|
|
@@ -3427,7 +3851,8 @@ export declare const formatIsoDate: (self: DateTime) => string;
|
|
|
3427
3851
|
*
|
|
3428
3852
|
* Returns only the date part (YYYY-MM-DD) in UTC, ignoring any time zone.
|
|
3429
3853
|
*
|
|
3430
|
-
*
|
|
3854
|
+
* **Example** (Formatting DateTime values as UTC ISO dates)
|
|
3855
|
+
*
|
|
3431
3856
|
* ```ts
|
|
3432
3857
|
* import { DateTime } from "effect"
|
|
3433
3858
|
*
|
|
@@ -3450,7 +3875,8 @@ export declare const formatIsoDateUtc: (self: DateTime) => string;
|
|
|
3450
3875
|
* For `DateTime.Utc`, returns the same as `formatIso`. For `DateTime.Zoned`,
|
|
3451
3876
|
* includes the time zone offset in the format.
|
|
3452
3877
|
*
|
|
3453
|
-
*
|
|
3878
|
+
* **Example** (Formatting DateTime values with offsets)
|
|
3879
|
+
*
|
|
3454
3880
|
* ```ts
|
|
3455
3881
|
* import { DateTime } from "effect"
|
|
3456
3882
|
*
|
|
@@ -3472,7 +3898,8 @@ export declare const formatIsoOffset: (self: DateTime) => string;
|
|
|
3472
3898
|
*
|
|
3473
3899
|
* It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`.
|
|
3474
3900
|
*
|
|
3475
|
-
*
|
|
3901
|
+
* **Example** (Formatting zoned DateTime values)
|
|
3902
|
+
*
|
|
3476
3903
|
* ```ts
|
|
3477
3904
|
* import { DateTime } from "effect"
|
|
3478
3905
|
*
|
|
@@ -3491,8 +3918,8 @@ export declare const formatIsoOffset: (self: DateTime) => string;
|
|
|
3491
3918
|
* console.log(offsetFormatted) // "2024-06-15T17:30:45.123+03:00"
|
|
3492
3919
|
* ```
|
|
3493
3920
|
*
|
|
3494
|
-
* @since 3.6.0
|
|
3495
3921
|
* @category formatting
|
|
3922
|
+
* @since 3.6.0
|
|
3496
3923
|
*/
|
|
3497
3924
|
export declare const formatIsoZoned: (self: Zoned) => string;
|
|
3498
3925
|
/**
|
|
@@ -3500,7 +3927,8 @@ export declare const formatIsoZoned: (self: Zoned) => string;
|
|
|
3500
3927
|
*
|
|
3501
3928
|
* This layer provides the `CurrentTimeZone` service with the specified time zone.
|
|
3502
3929
|
*
|
|
3503
|
-
*
|
|
3930
|
+
* **Example** (Providing current time zone layers)
|
|
3931
|
+
*
|
|
3504
3932
|
* ```ts
|
|
3505
3933
|
* import { DateTime, Effect } from "effect"
|
|
3506
3934
|
*
|
|
@@ -3525,7 +3953,8 @@ export declare const layerCurrentZone: (resource: NoInfer<TimeZone>) => Layer.La
|
|
|
3525
3953
|
*
|
|
3526
3954
|
* This layer provides the `CurrentTimeZone` service with a fixed offset time zone.
|
|
3527
3955
|
*
|
|
3528
|
-
*
|
|
3956
|
+
* **Example** (Providing fixed-offset time zone layers)
|
|
3957
|
+
*
|
|
3529
3958
|
* ```ts
|
|
3530
3959
|
* import { DateTime, Effect } from "effect"
|
|
3531
3960
|
*
|
|
@@ -3550,7 +3979,8 @@ export declare const layerCurrentZoneOffset: (offset: number) => Layer.Layer<Cur
|
|
|
3550
3979
|
* This layer provides the `CurrentTimeZone` service with a named time zone.
|
|
3551
3980
|
* If the time zone identifier is invalid, the layer will fail.
|
|
3552
3981
|
*
|
|
3553
|
-
*
|
|
3982
|
+
* **Example** (Providing named time zone layers)
|
|
3983
|
+
*
|
|
3554
3984
|
* ```ts
|
|
3555
3985
|
* import { DateTime, Effect } from "effect"
|
|
3556
3986
|
*
|
|
@@ -3574,7 +4004,8 @@ export declare const layerCurrentZoneNamed: (zoneId: string) => Layer.Layer<Curr
|
|
|
3574
4004
|
* This layer provides the `CurrentTimeZone` service using the system's
|
|
3575
4005
|
* configured local time zone.
|
|
3576
4006
|
*
|
|
3577
|
-
*
|
|
4007
|
+
* **Example** (Providing local time zone layers)
|
|
4008
|
+
*
|
|
3578
4009
|
* ```ts
|
|
3579
4010
|
* import { DateTime, Effect } from "effect"
|
|
3580
4011
|
*
|