effect 4.0.0-beta.73 → 4.0.0-beta.75
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 +745 -627
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +277 -217
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +37 -30
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +19 -16
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +34 -40
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +16 -16
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +10 -10
- package/dist/Boolean.js +6 -6
- package/dist/Brand.d.ts +13 -11
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +10 -8
- package/dist/Brand.js.map +1 -1
- package/dist/Cause.d.ts +21 -23
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +21 -23
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +282 -72
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +108 -28
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +11 -11
- package/dist/ChannelSchema.js +5 -5
- package/dist/Chunk.d.ts +86 -33
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +48 -13
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +3 -3
- package/dist/Clock.js +3 -3
- package/dist/Combiner.d.ts +9 -13
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +9 -13
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +49 -56
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +40 -43
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +34 -44
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +24 -32
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +2 -2
- package/dist/Console.js +2 -2
- package/dist/Context.d.ts +63 -75
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +29 -33
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +6 -6
- package/dist/Cron.js +6 -6
- package/dist/Crypto.d.ts +4 -4
- package/dist/Crypto.js +4 -4
- package/dist/Data.d.ts +21 -15
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +7 -7
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +35 -16
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +35 -8
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +61 -52
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +21 -18
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +50 -37
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +24 -13
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +574 -474
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +273 -213
- package/dist/Effect.js.map +1 -1
- package/dist/Encoding.d.ts +5 -0
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +5 -0
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +28 -41
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +12 -19
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +72 -100
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +54 -74
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +1 -1
- package/dist/ErrorReporter.js +1 -1
- package/dist/ExecutionPlan.d.ts +2 -2
- package/dist/ExecutionPlan.js +1 -1
- package/dist/Exit.d.ts +79 -96
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +57 -64
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +8 -6
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +8 -6
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +25 -0
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +15 -0
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +35 -0
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +15 -0
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +20 -0
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +10 -0
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +6 -6
- package/dist/FileSystem.js +2 -2
- package/dist/Filter.d.ts +4 -4
- package/dist/Filter.js +4 -4
- package/dist/Formatter.d.ts +14 -19
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +14 -19
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +20 -21
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +14 -15
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +13 -13
- package/dist/Graph.js +7 -7
- package/dist/HKT.d.ts +3 -3
- package/dist/Hash.d.ts +2 -1
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +2 -1
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +18 -3
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +5 -0
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +9 -9
- package/dist/HashRing.js +3 -3
- package/dist/HashSet.d.ts +1 -1
- package/dist/Iterable.d.ts +39 -27
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +21 -11
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +2 -3
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +2 -3
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +2 -6
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +2 -6
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +17 -13
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +17 -13
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +4 -3
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +4 -3
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +108 -130
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +43 -51
- package/dist/Layer.js.map +1 -1
- package/dist/Logger.d.ts +16 -19
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +15 -18
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +2 -2
- package/dist/Match.d.ts +22 -22
- package/dist/Match.js +18 -18
- package/dist/Metric.d.ts +105 -125
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +54 -64
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +21 -12
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +7 -4
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableList.d.ts +15 -0
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +15 -0
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +56 -42
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +28 -22
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +10 -7
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +10 -7
- package/dist/Newtype.js.map +1 -1
- package/dist/Number.d.ts +23 -11
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +9 -5
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +16 -16
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +10 -9
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +232 -204
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +113 -96
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +119 -180
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +93 -145
- package/dist/Order.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +14 -14
- package/dist/PartitionedSemaphore.js +6 -6
- package/dist/Path.d.ts +3 -3
- package/dist/Path.js +3 -3
- package/dist/Pipeable.d.ts +3 -3
- package/dist/Pipeable.js +3 -3
- package/dist/PlatformError.d.ts +4 -4
- package/dist/PlatformError.js +4 -4
- package/dist/Pool.d.ts +7 -11
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +3 -5
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +279 -268
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +128 -123
- package/dist/Predicate.js.map +1 -1
- package/dist/PubSub.d.ts +33 -23
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +21 -11
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +4 -4
- package/dist/Pull.js +4 -4
- package/dist/Queue.d.ts +70 -31
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +66 -27
- package/dist/Queue.js.map +1 -1
- package/dist/RcRef.d.ts +0 -4
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +15 -15
- package/dist/Record.js +5 -5
- package/dist/Redactable.d.ts +2 -2
- package/dist/Redactable.js +2 -2
- package/dist/Redacted.d.ts +5 -5
- package/dist/Redacted.js +4 -4
- package/dist/Reducer.d.ts +2 -3
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +2 -3
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +23 -22
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +21 -20
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +4 -4
- package/dist/References.js +4 -4
- package/dist/RegExp.d.ts +1 -1
- package/dist/RegExp.js +1 -1
- package/dist/Request.d.ts +22 -22
- package/dist/Request.js +6 -6
- package/dist/RequestResolver.d.ts +6 -6
- package/dist/RequestResolver.js +2 -2
- package/dist/Resource.d.ts +3 -3
- package/dist/Resource.js +3 -3
- package/dist/Result.d.ts +95 -51
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +53 -30
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +11 -8
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +11 -8
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +151 -89
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +59 -47
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +6 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +6 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +620 -830
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +543 -452
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +43 -22
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +80 -59
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +139 -119
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +133 -113
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +37 -39
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +16 -17
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +75 -156
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +75 -148
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +30 -21
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +26 -22
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +169 -145
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +183 -159
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.js +2 -2
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +16 -1
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +16 -1
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +1 -1
- package/dist/ScopedCache.js +1 -1
- package/dist/ScopedRef.d.ts +14 -18
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +6 -8
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +9 -9
- package/dist/Semaphore.js +3 -3
- package/dist/Sink.d.ts +18 -18
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +12 -12
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +4 -5
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +4 -5
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +376 -99
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +158 -43
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +11 -14
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +5 -6
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +23 -21
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +14 -12
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +24 -19
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +12 -7
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +145 -120
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +51 -42
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Terminal.d.ts +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Tracer.d.ts +9 -9
- package/dist/Tracer.js +6 -6
- package/dist/Trie.d.ts +15 -0
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +5 -0
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +39 -33
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +23 -19
- package/dist/Tuple.js.map +1 -1
- package/dist/TxHashMap.d.ts +3 -3
- package/dist/TxHashSet.d.ts +1 -1
- package/dist/TxReentrantLock.d.ts +6 -3
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +2 -1
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +16 -16
- package/dist/TxRef.js +8 -8
- package/dist/TxSubscriptionRef.d.ts +43 -27
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +19 -13
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +12 -38
- package/dist/Types.d.ts.map +1 -1
- package/dist/Types.js +0 -2
- package/dist/UndefinedOr.d.ts +15 -14
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +11 -10
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +9 -9
- package/dist/Unify.js +1 -1
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/arbitrary.js +9 -9
- package/dist/internal/schema/arbitrary.js.map +1 -1
- package/dist/internal/schema/equivalence.js +9 -9
- package/dist/internal/schema/equivalence.js.map +1 -1
- package/dist/internal/schema/representation.js +14 -14
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.js +11 -11
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestClock.d.ts +5 -5
- package/dist/testing/TestClock.js +4 -4
- package/dist/testing/TestConsole.d.ts +3 -3
- package/dist/testing/TestConsole.js +3 -3
- package/dist/testing/TestSchema.d.ts +10 -10
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +9 -9
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +4 -2
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +4 -2
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +17 -20
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +36 -39
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +6 -7
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +6 -7
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +5 -5
- package/dist/unstable/ai/EmbeddingModel.js +4 -4
- package/dist/unstable/ai/IdGenerator.d.ts +4 -5
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +3 -4
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +7 -6
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +6 -5
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +14 -12
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +19 -17
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +11 -4
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +8 -5
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +20 -18
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +45 -43
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +17 -17
- package/dist/unstable/ai/Prompt.js +4 -4
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +3 -2
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +3 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +26 -11
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +9 -4
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +1 -1
- package/dist/unstable/ai/Tokenizer.js +1 -1
- package/dist/unstable/ai/Tool.d.ts +13 -12
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +14 -13
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +2 -2
- package/dist/unstable/ai/Toolkit.js +2 -2
- package/dist/unstable/cli/Command.d.ts +37 -16
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +16 -9
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +1 -1
- package/dist/unstable/cli/Completions.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +7 -6
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +7 -6
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +6 -1
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +7 -2
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +4 -4
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +13 -10
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +6 -5
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +4 -3
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +11 -11
- package/dist/unstable/cli/internal/parser.js +145 -10
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -2
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +5 -0
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +5 -0
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +3 -3
- package/dist/unstable/cluster/ClusterSchema.js +3 -3
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +15 -15
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +1 -1
- package/dist/unstable/cluster/Entity.js +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +10 -0
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +10 -0
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +2 -2
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +2 -2
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +1 -1
- package/dist/unstable/cluster/Reply.d.ts +2 -2
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +12 -12
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +2 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +2 -1
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +2 -2
- package/dist/unstable/cluster/RunnerServer.js +2 -2
- package/dist/unstable/cluster/Runners.d.ts +4 -4
- package/dist/unstable/cluster/Runners.js +4 -4
- package/dist/unstable/cluster/ShardId.js +3 -3
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +4 -4
- package/dist/unstable/cluster/Sharding.js +4 -4
- package/dist/unstable/cluster/ShardingConfig.d.ts +4 -4
- package/dist/unstable/cluster/ShardingConfig.js +4 -4
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +6 -6
- package/dist/unstable/cluster/Snowflake.js +8 -8
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +2 -2
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +2 -2
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +5 -5
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +5 -0
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +5 -0
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +2 -2
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +2 -2
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +2 -1
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +2 -1
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +10 -0
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +10 -0
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +4 -4
- package/dist/unstable/eventlog/EventLog.js +4 -4
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +2 -3
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +2 -3
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +8 -10
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +8 -10
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +4 -4
- package/dist/unstable/eventlog/EventLogSessionAuth.js +4 -4
- package/dist/unstable/http/Cookies.d.ts +1 -1
- package/dist/unstable/http/Cookies.js +4 -4
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +3 -4
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +3 -4
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +2 -2
- package/dist/unstable/http/FetchHttpClient.js +2 -2
- package/dist/unstable/http/Headers.js +2 -2
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.js +2 -2
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +3 -3
- package/dist/unstable/http/HttpClient.js +3 -3
- package/dist/unstable/http/HttpClientRequest.d.ts +32 -5
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +10 -1
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.js +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +1 -1
- package/dist/unstable/http/HttpPlatform.js +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +5 -5
- package/dist/unstable/http/HttpRouter.js +5 -5
- package/dist/unstable/http/HttpServerResponse.d.ts +28 -23
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +13 -8
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.js +3 -3
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +33 -33
- package/dist/unstable/http/Url.js +11 -11
- package/dist/unstable/http/UrlParams.d.ts +30 -0
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +16 -6
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +4 -3
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +4 -3
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +10 -8
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +15 -15
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.js +13 -13
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApiMiddleware.js +3 -3
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +9 -9
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +11 -11
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +5 -0
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +5 -0
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +8 -6
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +6 -4
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +3 -3
- package/dist/unstable/persistence/KeyValueStore.js +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -2
- package/dist/unstable/persistence/Persistable.js +2 -2
- package/dist/unstable/persistence/PersistedQueue.d.ts +8 -8
- package/dist/unstable/persistence/PersistedQueue.js +8 -8
- package/dist/unstable/persistence/RateLimiter.d.ts +1 -1
- package/dist/unstable/persistence/RateLimiter.js +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +5 -5
- package/dist/unstable/process/ChildProcess.js +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts +4 -4
- package/dist/unstable/reactivity/AsyncResult.js +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +4 -4
- package/dist/unstable/reactivity/Atom.js +4 -4
- package/dist/unstable/reactivity/AtomRegistry.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +1 -1
- package/dist/unstable/reactivity/Reactivity.js +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +5 -5
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +5 -5
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +2 -2
- package/dist/unstable/rpc/RpcSerialization.d.ts +2 -2
- package/dist/unstable/rpc/RpcSerialization.js +2 -2
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.js +6 -6
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +2 -2
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +3 -3
- package/dist/unstable/socket/Socket.js +3 -3
- package/dist/unstable/socket/SocketServer.d.ts +1 -1
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/sql/Migrator.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +3 -3
- package/dist/unstable/sql/SqlClient.js +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +4 -4
- package/dist/unstable/sql/SqlSchema.js +4 -4
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/workers/Transferable.d.ts +3 -3
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +6 -6
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +1 -1
- package/dist/unstable/workers/Worker.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -1
- package/dist/unstable/workflow/Activity.js +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +8 -8
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +1 -2
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +1 -2
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +35 -15
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +94 -72
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +10 -2
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +16 -8
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +2 -4
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +9 -11
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +7 -7
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +745 -627
- package/src/BigDecimal.ts +37 -30
- package/src/BigInt.ts +34 -40
- package/src/Boolean.ts +10 -10
- package/src/Brand.ts +16 -14
- package/src/Cause.ts +21 -23
- package/src/Channel.ts +316 -76
- package/src/ChannelSchema.ts +11 -11
- package/src/Chunk.ts +87 -34
- package/src/Clock.ts +3 -3
- package/src/Combiner.ts +9 -13
- package/src/Config.ts +60 -67
- package/src/ConfigProvider.ts +34 -44
- package/src/Console.ts +2 -2
- package/src/Context.ts +64 -76
- package/src/Cron.ts +6 -6
- package/src/Crypto.ts +4 -4
- package/src/Data.ts +21 -15
- package/src/DateTime.ts +35 -16
- package/src/Deferred.ts +61 -52
- package/src/Duration.ts +50 -37
- package/src/Effect.ts +574 -474
- package/src/Encoding.ts +5 -0
- package/src/Equal.ts +28 -41
- package/src/Equivalence.ts +72 -100
- package/src/ErrorReporter.ts +1 -1
- package/src/ExecutionPlan.ts +2 -2
- package/src/Exit.ts +79 -96
- package/src/Fiber.ts +8 -6
- package/src/FiberHandle.ts +25 -0
- package/src/FiberMap.ts +35 -0
- package/src/FiberSet.ts +20 -0
- package/src/FileSystem.ts +6 -6
- package/src/Filter.ts +4 -4
- package/src/Formatter.ts +14 -19
- package/src/Function.ts +20 -21
- package/src/Graph.ts +13 -13
- package/src/HKT.ts +3 -3
- package/src/Hash.ts +2 -1
- package/src/HashMap.ts +18 -3
- package/src/HashRing.ts +9 -9
- package/src/HashSet.ts +1 -1
- package/src/Iterable.ts +39 -27
- package/src/JsonPatch.ts +2 -3
- package/src/JsonPointer.ts +2 -6
- package/src/JsonSchema.ts +17 -13
- package/src/Latch.ts +4 -3
- package/src/Layer.ts +108 -130
- package/src/Logger.ts +22 -25
- package/src/ManagedRuntime.ts +2 -2
- package/src/Match.ts +22 -22
- package/src/Metric.ts +129 -157
- package/src/MutableHashMap.ts +35 -20
- package/src/MutableList.ts +15 -0
- package/src/MutableRef.ts +56 -42
- package/src/Newtype.ts +10 -7
- package/src/Number.ts +23 -11
- package/src/Optic.ts +25 -22
- package/src/Option.ts +232 -204
- package/src/Order.ts +119 -180
- package/src/PartitionedSemaphore.ts +14 -14
- package/src/Path.ts +3 -3
- package/src/Pipeable.ts +3 -3
- package/src/PlatformError.ts +4 -4
- package/src/Pool.ts +7 -11
- package/src/Predicate.ts +279 -268
- package/src/PubSub.ts +33 -23
- package/src/Pull.ts +4 -4
- package/src/Queue.ts +70 -31
- package/src/RcRef.ts +0 -4
- package/src/Record.ts +15 -15
- package/src/Redactable.ts +2 -2
- package/src/Redacted.ts +5 -5
- package/src/Reducer.ts +2 -3
- package/src/Ref.ts +61 -58
- package/src/References.ts +4 -4
- package/src/RegExp.ts +1 -1
- package/src/Request.ts +22 -22
- package/src/RequestResolver.ts +8 -8
- package/src/Resource.ts +3 -3
- package/src/Result.ts +105 -51
- package/src/Runtime.ts +11 -8
- package/src/Schedule.ts +157 -90
- package/src/Scheduler.ts +6 -4
- package/src/Schema.ts +1020 -1108
- package/src/SchemaAST.ts +149 -118
- package/src/SchemaGetter.ts +155 -134
- package/src/SchemaIssue.ts +39 -41
- package/src/SchemaParser.ts +176 -232
- package/src/SchemaRepresentation.ts +38 -28
- package/src/SchemaTransformation.ts +233 -207
- package/src/SchemaUtils.ts +2 -2
- package/src/Scope.ts +16 -1
- package/src/ScopedCache.ts +1 -1
- package/src/ScopedRef.ts +14 -18
- package/src/Semaphore.ts +9 -9
- package/src/Sink.ts +18 -18
- package/src/Stdio.ts +4 -5
- package/src/Stream.ts +411 -114
- package/src/String.ts +11 -14
- package/src/Struct.ts +23 -21
- package/src/SubscriptionRef.ts +24 -19
- package/src/SynchronizedRef.ts +145 -120
- package/src/Terminal.ts +1 -1
- package/src/Tracer.ts +9 -9
- package/src/Trie.ts +15 -0
- package/src/Tuple.ts +39 -33
- package/src/TxHashMap.ts +3 -3
- package/src/TxHashSet.ts +1 -1
- package/src/TxReentrantLock.ts +6 -3
- package/src/TxRef.ts +16 -16
- package/src/TxSubscriptionRef.ts +43 -27
- package/src/Types.ts +12 -39
- package/src/UndefinedOr.ts +15 -14
- package/src/Unify.ts +9 -9
- package/src/internal/schema/annotations.ts +4 -4
- package/src/internal/schema/arbitrary.ts +16 -16
- package/src/internal/schema/equivalence.ts +11 -11
- package/src/internal/schema/representation.ts +23 -23
- package/src/internal/schema/schema.ts +17 -17
- package/src/testing/TestClock.ts +5 -5
- package/src/testing/TestConsole.ts +3 -3
- package/src/testing/TestSchema.ts +20 -20
- package/src/unstable/ai/AiError.ts +4 -2
- package/src/unstable/ai/AnthropicStructuredOutput.ts +59 -56
- package/src/unstable/ai/Chat.ts +6 -7
- package/src/unstable/ai/EmbeddingModel.ts +5 -5
- package/src/unstable/ai/IdGenerator.ts +4 -5
- package/src/unstable/ai/LanguageModel.ts +9 -8
- package/src/unstable/ai/McpSchema.ts +19 -17
- package/src/unstable/ai/McpServer.ts +14 -7
- package/src/unstable/ai/OpenAiStructuredOutput.ts +72 -61
- package/src/unstable/ai/Prompt.ts +20 -20
- package/src/unstable/ai/ResponseIdTracker.ts +3 -2
- package/src/unstable/ai/Telemetry.ts +26 -11
- package/src/unstable/ai/Tokenizer.ts +1 -1
- package/src/unstable/ai/Tool.ts +17 -16
- package/src/unstable/ai/Toolkit.ts +2 -2
- package/src/unstable/cli/Command.ts +42 -17
- package/src/unstable/cli/Completions.ts +1 -1
- package/src/unstable/cli/Flag.ts +7 -6
- package/src/unstable/cli/GlobalFlag.ts +7 -1
- package/src/unstable/cli/Param.ts +24 -19
- package/src/unstable/cli/Primitive.ts +6 -5
- package/src/unstable/cli/Prompt.ts +11 -11
- package/src/unstable/cli/internal/parser.ts +204 -10
- package/src/unstable/cluster/ClusterCron.ts +1 -2
- package/src/unstable/cluster/ClusterMetrics.ts +5 -0
- package/src/unstable/cluster/ClusterSchema.ts +3 -3
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +15 -15
- package/src/unstable/cluster/Entity.ts +1 -1
- package/src/unstable/cluster/EntityResource.ts +10 -0
- package/src/unstable/cluster/Envelope.ts +3 -3
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +1 -1
- package/src/unstable/cluster/Reply.ts +14 -12
- package/src/unstable/cluster/RunnerHealth.ts +2 -1
- package/src/unstable/cluster/RunnerServer.ts +2 -2
- package/src/unstable/cluster/Runners.ts +4 -4
- package/src/unstable/cluster/ShardId.ts +3 -3
- package/src/unstable/cluster/Sharding.ts +4 -4
- package/src/unstable/cluster/ShardingConfig.ts +4 -4
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +8 -8
- package/src/unstable/cluster/internal/entityManager.ts +2 -2
- package/src/unstable/devtools/DevToolsClient.ts +1 -1
- package/src/unstable/encoding/Msgpack.ts +6 -6
- package/src/unstable/encoding/Ndjson.ts +5 -0
- package/src/unstable/encoding/Sse.ts +2 -2
- package/src/unstable/eventlog/EventGroup.ts +2 -1
- package/src/unstable/eventlog/EventJournal.ts +10 -0
- package/src/unstable/eventlog/EventLog.ts +4 -4
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogRemote.ts +1 -1
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +2 -3
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +8 -10
- package/src/unstable/eventlog/EventLogSessionAuth.ts +4 -4
- package/src/unstable/http/Cookies.ts +5 -5
- package/src/unstable/http/Etag.ts +3 -4
- package/src/unstable/http/FetchHttpClient.ts +2 -2
- package/src/unstable/http/Headers.ts +2 -2
- package/src/unstable/http/HttpBody.ts +2 -2
- package/src/unstable/http/HttpClient.ts +3 -3
- package/src/unstable/http/HttpClientRequest.ts +32 -5
- package/src/unstable/http/HttpMiddleware.ts +1 -1
- package/src/unstable/http/HttpPlatform.ts +1 -1
- package/src/unstable/http/HttpRouter.ts +5 -5
- package/src/unstable/http/HttpServerResponse.ts +28 -23
- package/src/unstable/http/Multipart.ts +3 -3
- package/src/unstable/http/Url.ts +33 -33
- package/src/unstable/http/UrlParams.ts +36 -6
- package/src/unstable/httpapi/HttpApi.ts +6 -5
- package/src/unstable/httpapi/HttpApiBuilder.ts +14 -13
- package/src/unstable/httpapi/HttpApiClient.ts +16 -16
- package/src/unstable/httpapi/HttpApiError.ts +13 -13
- package/src/unstable/httpapi/HttpApiMiddleware.ts +3 -3
- package/src/unstable/httpapi/HttpApiSchema.ts +15 -15
- package/src/unstable/httpapi/OpenApi.ts +18 -18
- package/src/unstable/observability/OtlpResource.ts +5 -0
- package/src/unstable/observability/PrometheusMetrics.ts +8 -6
- package/src/unstable/persistence/KeyValueStore.ts +3 -3
- package/src/unstable/persistence/Persistable.ts +2 -2
- package/src/unstable/persistence/PersistedQueue.ts +8 -8
- package/src/unstable/persistence/RateLimiter.ts +1 -1
- package/src/unstable/process/ChildProcess.ts +5 -5
- package/src/unstable/reactivity/AsyncResult.ts +4 -4
- package/src/unstable/reactivity/Atom.ts +4 -4
- package/src/unstable/reactivity/AtomRegistry.ts +1 -1
- package/src/unstable/reactivity/Reactivity.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +5 -5
- package/src/unstable/rpc/RpcMiddleware.ts +1 -1
- package/src/unstable/rpc/RpcSchema.ts +5 -5
- package/src/unstable/rpc/RpcSerialization.ts +2 -2
- package/src/unstable/schema/Model.ts +7 -7
- package/src/unstable/schema/VariantSchema.ts +2 -2
- package/src/unstable/socket/Socket.ts +3 -3
- package/src/unstable/socket/SocketServer.ts +1 -1
- package/src/unstable/sql/Migrator.ts +1 -1
- package/src/unstable/sql/SqlClient.ts +3 -3
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/SqlSchema.ts +4 -4
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +7 -7
- package/src/unstable/workers/Worker.ts +1 -1
- package/src/unstable/workflow/Activity.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +8 -8
- package/src/unstable/workflow/DurableQueue.ts +1 -2
- package/src/unstable/workflow/Workflow.ts +159 -114
- package/src/unstable/workflow/WorkflowEngine.ts +16 -8
- package/src/unstable/workflow/WorkflowProxy.ts +9 -11
- package/src/unstable/workflow/WorkflowProxyServer.ts +7 -7
package/src/Predicate.ts
CHANGED
|
@@ -73,14 +73,14 @@ import type { TupleOf, TupleOfAtLeast } from "./Types.ts"
|
|
|
73
73
|
*
|
|
74
74
|
* **When to use**
|
|
75
75
|
*
|
|
76
|
-
* Use when you want a reusable boolean check for `A
|
|
77
|
-
*
|
|
78
|
-
*
|
|
76
|
+
* Use when you want a reusable boolean check for `A`, especially when you plan
|
|
77
|
+
* to combine checks with {@link and}/{@link or} or pass a predicate to arrays
|
|
78
|
+
* and iterables.
|
|
79
79
|
*
|
|
80
80
|
* **Details**
|
|
81
81
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
82
|
+
* A predicate returns `true` or `false` and never throws by itself. It does not
|
|
83
|
+
* narrow types unless you use `Refinement`.
|
|
84
84
|
*
|
|
85
85
|
* **Example** (Define a predicate)
|
|
86
86
|
*
|
|
@@ -107,13 +107,13 @@ export interface Predicate<in A> {
|
|
|
107
107
|
*
|
|
108
108
|
* **When to use**
|
|
109
109
|
*
|
|
110
|
-
* Use when you are defining APIs that abstract over predicates with HKTs
|
|
111
|
-
*
|
|
110
|
+
* Use when you are defining APIs that abstract over predicates with HKTs and
|
|
111
|
+
* need a `TypeLambda` instance for predicate-based type classes.
|
|
112
112
|
*
|
|
113
113
|
* **Details**
|
|
114
114
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
115
|
+
* This is type-only, creates no runtime value, and does not affect emitted
|
|
116
|
+
* JavaScript.
|
|
117
117
|
*
|
|
118
118
|
* **Example** (Type-level usage)
|
|
119
119
|
*
|
|
@@ -137,14 +137,14 @@ export interface PredicateTypeLambda extends TypeLambda {
|
|
|
137
137
|
*
|
|
138
138
|
* **When to use**
|
|
139
139
|
*
|
|
140
|
-
* Use when you want a runtime check that refines `A` to `B` for TypeScript
|
|
141
|
-
*
|
|
142
|
-
*
|
|
140
|
+
* Use when you want a runtime check that refines `A` to `B` for TypeScript,
|
|
141
|
+
* especially when composing type guards with {@link compose} or safely
|
|
142
|
+
* checking `unknown` values.
|
|
143
143
|
*
|
|
144
144
|
* **Details**
|
|
145
145
|
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
146
|
+
* A refinement returns a type predicate (`a is B`). Use it with `if` or
|
|
147
|
+
* `filter` to narrow types.
|
|
148
148
|
*
|
|
149
149
|
* **Example** (Narrow unknown)
|
|
150
150
|
*
|
|
@@ -174,13 +174,13 @@ export interface Refinement<in A, out B extends A> {
|
|
|
174
174
|
*
|
|
175
175
|
* **When to use**
|
|
176
176
|
*
|
|
177
|
-
* Use when you need to extract input types from predicate signatures
|
|
178
|
-
*
|
|
177
|
+
* Use when you need to extract input types from predicate signatures while
|
|
178
|
+
* writing generic helpers over predicate types.
|
|
179
179
|
*
|
|
180
180
|
* **Details**
|
|
181
181
|
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
182
|
+
* These utilities are type-only, create no runtime values, and the namespace is
|
|
183
|
+
* erased at runtime.
|
|
184
184
|
*
|
|
185
185
|
* **Example** (Extract predicate input)
|
|
186
186
|
*
|
|
@@ -201,13 +201,13 @@ export declare namespace Predicate {
|
|
|
201
201
|
*
|
|
202
202
|
* **When to use**
|
|
203
203
|
*
|
|
204
|
-
* Use when you want to infer the input type from a predicate type
|
|
205
|
-
*
|
|
204
|
+
* Use when you want to infer the input type from a predicate type while
|
|
205
|
+
* defining generic utilities over predicates.
|
|
206
206
|
*
|
|
207
207
|
* **Details**
|
|
208
208
|
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
209
|
+
* This is type-only and creates no runtime value. It resolves to `never` if
|
|
210
|
+
* the type does not match `Predicate`.
|
|
211
211
|
*
|
|
212
212
|
* **Example** (Infer input)
|
|
213
213
|
*
|
|
@@ -220,7 +220,7 @@ export declare namespace Predicate {
|
|
|
220
220
|
*
|
|
221
221
|
* @see {@link Predicate.Any}
|
|
222
222
|
* @see {@link Refinement.In}
|
|
223
|
-
* @category
|
|
223
|
+
* @category utility types
|
|
224
224
|
* @since 3.6.0
|
|
225
225
|
*/
|
|
226
226
|
export type In<T extends Any> = [T] extends [Predicate<infer _A>] ? _A : never
|
|
@@ -234,7 +234,7 @@ export declare namespace Predicate {
|
|
|
234
234
|
*
|
|
235
235
|
* **Details**
|
|
236
236
|
*
|
|
237
|
-
*
|
|
237
|
+
* This is type-only and creates no runtime value.
|
|
238
238
|
*
|
|
239
239
|
* **Example** (Generic constraint)
|
|
240
240
|
*
|
|
@@ -245,7 +245,7 @@ export declare namespace Predicate {
|
|
|
245
245
|
* ```
|
|
246
246
|
*
|
|
247
247
|
* @see {@link Predicate.In}
|
|
248
|
-
* @category
|
|
248
|
+
* @category utility types
|
|
249
249
|
* @since 3.6.0
|
|
250
250
|
*/
|
|
251
251
|
export type Any = Predicate<any>
|
|
@@ -256,13 +256,13 @@ export declare namespace Predicate {
|
|
|
256
256
|
*
|
|
257
257
|
* **When to use**
|
|
258
258
|
*
|
|
259
|
-
* Use when you need to extract input
|
|
260
|
-
*
|
|
259
|
+
* Use when you need to extract input and output types from refinement
|
|
260
|
+
* signatures while writing generic helpers over refinements.
|
|
261
261
|
*
|
|
262
262
|
* **Details**
|
|
263
263
|
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
264
|
+
* These utilities are type-only, create no runtime values, and the namespace is
|
|
265
|
+
* erased at runtime.
|
|
266
266
|
*
|
|
267
267
|
* **Example** (Extract refinement types)
|
|
268
268
|
*
|
|
@@ -288,8 +288,8 @@ export declare namespace Refinement {
|
|
|
288
288
|
*
|
|
289
289
|
* **Details**
|
|
290
290
|
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
291
|
+
* This is type-only and creates no runtime value. It resolves to `never` if
|
|
292
|
+
* the type does not match `Refinement`.
|
|
293
293
|
*
|
|
294
294
|
* **Example** (Infer input)
|
|
295
295
|
*
|
|
@@ -302,7 +302,7 @@ export declare namespace Refinement {
|
|
|
302
302
|
*
|
|
303
303
|
* @see {@link Refinement.Out}
|
|
304
304
|
* @see {@link Predicate.In}
|
|
305
|
-
* @category
|
|
305
|
+
* @category utility types
|
|
306
306
|
* @since 3.6.0
|
|
307
307
|
*/
|
|
308
308
|
|
|
@@ -317,8 +317,8 @@ export declare namespace Refinement {
|
|
|
317
317
|
*
|
|
318
318
|
* **Details**
|
|
319
319
|
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
320
|
+
* This is type-only and creates no runtime value. It resolves to `never` if
|
|
321
|
+
* the type does not match `Refinement`.
|
|
322
322
|
*
|
|
323
323
|
* **Example** (Infer output)
|
|
324
324
|
*
|
|
@@ -330,7 +330,7 @@ export declare namespace Refinement {
|
|
|
330
330
|
* ```
|
|
331
331
|
*
|
|
332
332
|
* @see {@link Refinement.In}
|
|
333
|
-
* @category
|
|
333
|
+
* @category utility types
|
|
334
334
|
* @since 3.6.0
|
|
335
335
|
*/
|
|
336
336
|
export type Out<T extends Any> = [T] extends [Refinement<infer _, infer _B>] ? _B : never
|
|
@@ -344,7 +344,7 @@ export declare namespace Refinement {
|
|
|
344
344
|
*
|
|
345
345
|
* **Details**
|
|
346
346
|
*
|
|
347
|
-
*
|
|
347
|
+
* This is type-only and creates no runtime value.
|
|
348
348
|
*
|
|
349
349
|
* **Example** (Generic constraint)
|
|
350
350
|
*
|
|
@@ -356,7 +356,7 @@ export declare namespace Refinement {
|
|
|
356
356
|
*
|
|
357
357
|
* @see {@link Refinement.In}
|
|
358
358
|
* @see {@link Refinement.Out}
|
|
359
|
-
* @category
|
|
359
|
+
* @category utility types
|
|
360
360
|
* @since 3.6.0
|
|
361
361
|
*/
|
|
362
362
|
export type Any = Refinement<any, any>
|
|
@@ -367,13 +367,13 @@ export declare namespace Refinement {
|
|
|
367
367
|
*
|
|
368
368
|
* **When to use**
|
|
369
369
|
*
|
|
370
|
-
* Use when you have a predicate on `A` and want
|
|
371
|
-
*
|
|
370
|
+
* Use when you have a predicate on `A` and want to check `B` values by mapping
|
|
371
|
+
* each `B` to an `A`, such as checking lengths or projections.
|
|
372
372
|
*
|
|
373
373
|
* **Details**
|
|
374
374
|
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
375
|
+
* Returns a new predicate that applies `f` before `self`. There is no
|
|
376
|
+
* additional short-circuiting beyond what `self` does.
|
|
377
377
|
*
|
|
378
378
|
* **Example** (Check string length)
|
|
379
379
|
*
|
|
@@ -399,13 +399,13 @@ export const mapInput: {
|
|
|
399
399
|
*
|
|
400
400
|
* **When to use**
|
|
401
401
|
*
|
|
402
|
-
* Use when you have a predicate on `A` and want
|
|
403
|
-
*
|
|
402
|
+
* Use when you have a predicate on `A` and want to check `B` values by mapping
|
|
403
|
+
* each `B` to an `A`, such as checking lengths or projections.
|
|
404
404
|
*
|
|
405
405
|
* **Details**
|
|
406
406
|
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
407
|
+
* Returns a new predicate that applies `f` before `self`. There is no
|
|
408
|
+
* additional short-circuiting beyond what `self` does.
|
|
409
409
|
*
|
|
410
410
|
* **Example** (Check string length)
|
|
411
411
|
*
|
|
@@ -431,13 +431,13 @@ export const mapInput: {
|
|
|
431
431
|
*
|
|
432
432
|
* **When to use**
|
|
433
433
|
*
|
|
434
|
-
* Use when you have a predicate on `A` and want
|
|
435
|
-
*
|
|
434
|
+
* Use when you have a predicate on `A` and want to check `B` values by mapping
|
|
435
|
+
* each `B` to an `A`, such as checking lengths or projections.
|
|
436
436
|
*
|
|
437
437
|
* **Details**
|
|
438
438
|
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
439
|
+
* Returns a new predicate that applies `f` before `self`. There is no
|
|
440
|
+
* additional short-circuiting beyond what `self` does.
|
|
441
441
|
*
|
|
442
442
|
* **Example** (Check string length)
|
|
443
443
|
*
|
|
@@ -465,13 +465,13 @@ export const mapInput: {
|
|
|
465
465
|
*
|
|
466
466
|
* **When to use**
|
|
467
467
|
*
|
|
468
|
-
* Use when you need a
|
|
469
|
-
*
|
|
468
|
+
* Use when you need a `Predicate` guard for exact tuple length that narrows
|
|
469
|
+
* `ReadonlyArray<T>` to `TupleOf<N, T>`.
|
|
470
470
|
*
|
|
471
471
|
* **Details**
|
|
472
472
|
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
473
|
+
* This only checks length, not element types, and returns a refinement on the
|
|
474
|
+
* array type.
|
|
475
475
|
*
|
|
476
476
|
* **Example** (Exact length)
|
|
477
477
|
*
|
|
@@ -494,13 +494,13 @@ export const isTupleOf: {
|
|
|
494
494
|
*
|
|
495
495
|
* **When to use**
|
|
496
496
|
*
|
|
497
|
-
* Use when you need a
|
|
498
|
-
*
|
|
497
|
+
* Use when you need a `Predicate` guard for exact tuple length that narrows
|
|
498
|
+
* `ReadonlyArray<T>` to `TupleOf<N, T>`.
|
|
499
499
|
*
|
|
500
500
|
* **Details**
|
|
501
501
|
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
502
|
+
* This only checks length, not element types, and returns a refinement on the
|
|
503
|
+
* array type.
|
|
504
504
|
*
|
|
505
505
|
* **Example** (Exact length)
|
|
506
506
|
*
|
|
@@ -523,13 +523,13 @@ export const isTupleOf: {
|
|
|
523
523
|
*
|
|
524
524
|
* **When to use**
|
|
525
525
|
*
|
|
526
|
-
* Use when you need a
|
|
527
|
-
*
|
|
526
|
+
* Use when you need a `Predicate` guard for exact tuple length that narrows
|
|
527
|
+
* `ReadonlyArray<T>` to `TupleOf<N, T>`.
|
|
528
528
|
*
|
|
529
529
|
* **Details**
|
|
530
530
|
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
531
|
+
* This only checks length, not element types, and returns a refinement on the
|
|
532
|
+
* array type.
|
|
533
533
|
*
|
|
534
534
|
* **Example** (Exact length)
|
|
535
535
|
*
|
|
@@ -554,13 +554,13 @@ export const isTupleOf: {
|
|
|
554
554
|
*
|
|
555
555
|
* **When to use**
|
|
556
556
|
*
|
|
557
|
-
* Use when you need a
|
|
558
|
-
*
|
|
557
|
+
* Use when you need a `Predicate` guard for tuple-like minimum length that
|
|
558
|
+
* narrows `ReadonlyArray<T>` to `TupleOfAtLeast<N, T>`.
|
|
559
559
|
*
|
|
560
560
|
* **Details**
|
|
561
561
|
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
562
|
+
* This only checks length, not element types, and returns a refinement on the
|
|
563
|
+
* array type.
|
|
564
564
|
*
|
|
565
565
|
* **Example** (Minimum length)
|
|
566
566
|
*
|
|
@@ -583,13 +583,13 @@ export const isTupleOfAtLeast: {
|
|
|
583
583
|
*
|
|
584
584
|
* **When to use**
|
|
585
585
|
*
|
|
586
|
-
* Use when you need a
|
|
587
|
-
*
|
|
586
|
+
* Use when you need a `Predicate` guard for tuple-like minimum length that
|
|
587
|
+
* narrows `ReadonlyArray<T>` to `TupleOfAtLeast<N, T>`.
|
|
588
588
|
*
|
|
589
589
|
* **Details**
|
|
590
590
|
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
591
|
+
* This only checks length, not element types, and returns a refinement on the
|
|
592
|
+
* array type.
|
|
593
593
|
*
|
|
594
594
|
* **Example** (Minimum length)
|
|
595
595
|
*
|
|
@@ -612,13 +612,13 @@ export const isTupleOfAtLeast: {
|
|
|
612
612
|
*
|
|
613
613
|
* **When to use**
|
|
614
614
|
*
|
|
615
|
-
* Use when you need a
|
|
616
|
-
*
|
|
615
|
+
* Use when you need a `Predicate` guard for tuple-like minimum length that
|
|
616
|
+
* narrows `ReadonlyArray<T>` to `TupleOfAtLeast<N, T>`.
|
|
617
617
|
*
|
|
618
618
|
* **Details**
|
|
619
619
|
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
620
|
+
* This only checks length, not element types, and returns a refinement on the
|
|
621
|
+
* array type.
|
|
622
622
|
*
|
|
623
623
|
* **Example** (Minimum length)
|
|
624
624
|
*
|
|
@@ -643,13 +643,13 @@ export const isTupleOfAtLeast: {
|
|
|
643
643
|
*
|
|
644
644
|
* **When to use**
|
|
645
645
|
*
|
|
646
|
-
* Use when you want a predicate that mirrors JavaScript truthiness
|
|
647
|
-
*
|
|
646
|
+
* Use when you want a predicate that mirrors JavaScript truthiness and filters
|
|
647
|
+
* out falsy values like `0`, `""`, and `false`.
|
|
648
648
|
*
|
|
649
649
|
* **Details**
|
|
650
650
|
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
651
|
+
* This uses `!!input` and treats `0`, `""`, `false`, `null`, and `undefined`
|
|
652
|
+
* as false.
|
|
653
653
|
*
|
|
654
654
|
* **Example** (Filter truthy)
|
|
655
655
|
*
|
|
@@ -676,11 +676,11 @@ export function isTruthy(input: unknown): boolean {
|
|
|
676
676
|
*
|
|
677
677
|
* **When to use**
|
|
678
678
|
*
|
|
679
|
-
* Use when you need a runtime guard for `Set` values.
|
|
679
|
+
* Use when you need a `Predicate` runtime guard for `Set` values.
|
|
680
680
|
*
|
|
681
681
|
* **Details**
|
|
682
682
|
*
|
|
683
|
-
*
|
|
683
|
+
* Uses `instanceof Set`.
|
|
684
684
|
*
|
|
685
685
|
* **Example** (Guard a Set)
|
|
686
686
|
*
|
|
@@ -708,11 +708,11 @@ export function isSet(input: unknown): input is Set<unknown> {
|
|
|
708
708
|
*
|
|
709
709
|
* **When to use**
|
|
710
710
|
*
|
|
711
|
-
* Use when you need a runtime guard for `Map` values.
|
|
711
|
+
* Use when you need a `Predicate` runtime guard for `Map` values.
|
|
712
712
|
*
|
|
713
713
|
* **Details**
|
|
714
714
|
*
|
|
715
|
-
*
|
|
715
|
+
* Uses `instanceof Map`.
|
|
716
716
|
*
|
|
717
717
|
* **Example** (Guard a Map)
|
|
718
718
|
*
|
|
@@ -740,12 +740,12 @@ export function isMap(input: unknown): input is Map<unknown, unknown> {
|
|
|
740
740
|
*
|
|
741
741
|
* **When to use**
|
|
742
742
|
*
|
|
743
|
-
* Use when you need
|
|
744
|
-
*
|
|
743
|
+
* Use when you need a `Predicate` guard to narrow an `unknown` value to a
|
|
744
|
+
* string.
|
|
745
745
|
*
|
|
746
746
|
* **Details**
|
|
747
747
|
*
|
|
748
|
-
*
|
|
748
|
+
* Uses `typeof input === "string"`.
|
|
749
749
|
*
|
|
750
750
|
* **Example** (Guard string)
|
|
751
751
|
*
|
|
@@ -774,12 +774,12 @@ export function isString(input: unknown): input is string {
|
|
|
774
774
|
*
|
|
775
775
|
* **When to use**
|
|
776
776
|
*
|
|
777
|
-
* Use when you need
|
|
777
|
+
* Use when you need a `Predicate` guard to narrow an `unknown` value to a
|
|
778
|
+
* number.
|
|
778
779
|
*
|
|
779
780
|
* **Details**
|
|
780
781
|
*
|
|
781
|
-
*
|
|
782
|
-
* - Does not exclude `NaN` or `Infinity`.
|
|
782
|
+
* Uses `typeof input === "number"` and does not exclude `NaN` or `Infinity`.
|
|
783
783
|
*
|
|
784
784
|
* **Example** (Guard number)
|
|
785
785
|
*
|
|
@@ -807,11 +807,12 @@ export function isNumber(input: unknown): input is number {
|
|
|
807
807
|
*
|
|
808
808
|
* **When to use**
|
|
809
809
|
*
|
|
810
|
-
* Use when you need
|
|
810
|
+
* Use when you need a `Predicate` guard to narrow an `unknown` value to a
|
|
811
|
+
* boolean.
|
|
811
812
|
*
|
|
812
813
|
* **Details**
|
|
813
814
|
*
|
|
814
|
-
*
|
|
815
|
+
* Uses `typeof input === "boolean"`.
|
|
815
816
|
*
|
|
816
817
|
* **Example** (Guard boolean)
|
|
817
818
|
*
|
|
@@ -839,11 +840,12 @@ export function isBoolean(input: unknown): input is boolean {
|
|
|
839
840
|
*
|
|
840
841
|
* **When to use**
|
|
841
842
|
*
|
|
842
|
-
* Use when you need
|
|
843
|
+
* Use when you need a `Predicate` guard to narrow an `unknown` value to a
|
|
844
|
+
* bigint.
|
|
843
845
|
*
|
|
844
846
|
* **Details**
|
|
845
847
|
*
|
|
846
|
-
*
|
|
848
|
+
* Uses `typeof input === "bigint"`.
|
|
847
849
|
*
|
|
848
850
|
* **Example** (Guard bigint)
|
|
849
851
|
*
|
|
@@ -870,11 +872,12 @@ export function isBigInt(input: unknown): input is bigint {
|
|
|
870
872
|
*
|
|
871
873
|
* **When to use**
|
|
872
874
|
*
|
|
873
|
-
* Use when you need
|
|
875
|
+
* Use when you need a `Predicate` guard to narrow an `unknown` value to a
|
|
876
|
+
* symbol.
|
|
874
877
|
*
|
|
875
878
|
* **Details**
|
|
876
879
|
*
|
|
877
|
-
*
|
|
880
|
+
* Uses `typeof input === "symbol"`.
|
|
878
881
|
*
|
|
879
882
|
* **Example** (Guard symbol)
|
|
880
883
|
*
|
|
@@ -901,11 +904,12 @@ export function isSymbol(input: unknown): input is symbol {
|
|
|
901
904
|
*
|
|
902
905
|
* **When to use**
|
|
903
906
|
*
|
|
904
|
-
* Use when you need
|
|
907
|
+
* Use when you need a `Predicate` guard for unknown property keys before
|
|
908
|
+
* indexing.
|
|
905
909
|
*
|
|
906
910
|
* **Details**
|
|
907
911
|
*
|
|
908
|
-
*
|
|
912
|
+
* Uses `isString`, `isNumber`, and `isSymbol`.
|
|
909
913
|
*
|
|
910
914
|
* **Example** (Guard property key)
|
|
911
915
|
*
|
|
@@ -935,11 +939,12 @@ export function isPropertyKey(u: unknown): u is PropertyKey {
|
|
|
935
939
|
*
|
|
936
940
|
* **When to use**
|
|
937
941
|
*
|
|
938
|
-
* Use when you need
|
|
942
|
+
* Use when you need a `Predicate` guard to narrow an `unknown` value to a
|
|
943
|
+
* callable function.
|
|
939
944
|
*
|
|
940
945
|
* **Details**
|
|
941
946
|
*
|
|
942
|
-
*
|
|
947
|
+
* Uses `typeof input === "function"`.
|
|
943
948
|
*
|
|
944
949
|
* **Example** (Guard function)
|
|
945
950
|
*
|
|
@@ -966,11 +971,12 @@ export function isFunction(input: unknown): input is Function {
|
|
|
966
971
|
*
|
|
967
972
|
* **When to use**
|
|
968
973
|
*
|
|
969
|
-
* Use when you need a guard for
|
|
974
|
+
* Use when you need a `Predicate` guard for values that are exactly
|
|
975
|
+
* `undefined`.
|
|
970
976
|
*
|
|
971
977
|
* **Details**
|
|
972
978
|
*
|
|
973
|
-
*
|
|
979
|
+
* Uses `input === undefined`.
|
|
974
980
|
*
|
|
975
981
|
* **Example** (Guard undefined)
|
|
976
982
|
*
|
|
@@ -996,11 +1002,12 @@ export function isUndefined(input: unknown): input is undefined {
|
|
|
996
1002
|
*
|
|
997
1003
|
* **When to use**
|
|
998
1004
|
*
|
|
999
|
-
* Use when you
|
|
1005
|
+
* Use when you need a `Predicate` refinement that filters out `undefined`
|
|
1006
|
+
* while preserving other falsy values.
|
|
1000
1007
|
*
|
|
1001
1008
|
* **Details**
|
|
1002
1009
|
*
|
|
1003
|
-
*
|
|
1010
|
+
* Returns a refinement that excludes `undefined`.
|
|
1004
1011
|
*
|
|
1005
1012
|
* **Example** (Filter undefined)
|
|
1006
1013
|
*
|
|
@@ -1027,11 +1034,11 @@ export function isNotUndefined<A>(input: A): input is Exclude<A, undefined> {
|
|
|
1027
1034
|
*
|
|
1028
1035
|
* **When to use**
|
|
1029
1036
|
*
|
|
1030
|
-
* Use when you need a guard for nullable values.
|
|
1037
|
+
* Use when you need a `Predicate` guard for nullable values.
|
|
1031
1038
|
*
|
|
1032
1039
|
* **Details**
|
|
1033
1040
|
*
|
|
1034
|
-
*
|
|
1041
|
+
* Uses `input === null`.
|
|
1035
1042
|
*
|
|
1036
1043
|
* **Example** (Guard null)
|
|
1037
1044
|
*
|
|
@@ -1057,11 +1064,12 @@ export function isNull(input: unknown): input is null {
|
|
|
1057
1064
|
*
|
|
1058
1065
|
* **When to use**
|
|
1059
1066
|
*
|
|
1060
|
-
* Use when you
|
|
1067
|
+
* Use when you need a `Predicate` refinement that filters out `null` while
|
|
1068
|
+
* preserving other falsy values.
|
|
1061
1069
|
*
|
|
1062
1070
|
* **Details**
|
|
1063
1071
|
*
|
|
1064
|
-
*
|
|
1072
|
+
* Returns a refinement that excludes `null`.
|
|
1065
1073
|
*
|
|
1066
1074
|
* **Example** (Filter null)
|
|
1067
1075
|
*
|
|
@@ -1088,11 +1096,11 @@ export function isNotNull<A>(input: A): input is Exclude<A, null> {
|
|
|
1088
1096
|
*
|
|
1089
1097
|
* **When to use**
|
|
1090
1098
|
*
|
|
1091
|
-
* Use when you
|
|
1099
|
+
* Use when you need a `Predicate` guard for nullish values.
|
|
1092
1100
|
*
|
|
1093
1101
|
* **Details**
|
|
1094
1102
|
*
|
|
1095
|
-
*
|
|
1103
|
+
* Uses `input === null || input === undefined`.
|
|
1096
1104
|
*
|
|
1097
1105
|
* **Example** (Guard nullish)
|
|
1098
1106
|
*
|
|
@@ -1120,11 +1128,12 @@ export function isNullish<A>(input: A): input is A & (null | undefined) {
|
|
|
1120
1128
|
*
|
|
1121
1129
|
* **When to use**
|
|
1122
1130
|
*
|
|
1123
|
-
* Use when you
|
|
1131
|
+
* Use when you need a `Predicate` refinement that filters out nullish values
|
|
1132
|
+
* but keeps other falsy ones.
|
|
1124
1133
|
*
|
|
1125
1134
|
* **Details**
|
|
1126
1135
|
*
|
|
1127
|
-
*
|
|
1136
|
+
* Uses `input != null`.
|
|
1128
1137
|
*
|
|
1129
1138
|
* **Example** (Filter non-nullish)
|
|
1130
1139
|
*
|
|
@@ -1152,11 +1161,7 @@ export function isNotNullish<A>(input: A): input is NonNullable<A> {
|
|
|
1152
1161
|
*
|
|
1153
1162
|
* **When to use**
|
|
1154
1163
|
*
|
|
1155
|
-
* Use when you need a
|
|
1156
|
-
*
|
|
1157
|
-
* **Details**
|
|
1158
|
-
*
|
|
1159
|
-
* - Always returns `false`.
|
|
1164
|
+
* Use when you need a `Predicate` that never accepts, e.g. in default branches.
|
|
1160
1165
|
*
|
|
1161
1166
|
* **Example** (Never matches)
|
|
1162
1167
|
*
|
|
@@ -1179,11 +1184,7 @@ export function isNever(_: unknown): _ is never {
|
|
|
1179
1184
|
*
|
|
1180
1185
|
* **When to use**
|
|
1181
1186
|
*
|
|
1182
|
-
* Use when you need a
|
|
1183
|
-
*
|
|
1184
|
-
* **Details**
|
|
1185
|
-
*
|
|
1186
|
-
* - Always returns `true`.
|
|
1187
|
+
* Use when you need a `Predicate` that always accepts, e.g. as a placeholder.
|
|
1187
1188
|
*
|
|
1188
1189
|
* **Example** (Always matches)
|
|
1189
1190
|
*
|
|
@@ -1206,12 +1207,12 @@ export function isUnknown(_: unknown): _ is unknown {
|
|
|
1206
1207
|
*
|
|
1207
1208
|
* **When to use**
|
|
1208
1209
|
*
|
|
1209
|
-
* Use when you
|
|
1210
|
+
* Use when you need a `Predicate` guard that accepts plain objects and arrays,
|
|
1211
|
+
* but not `null`.
|
|
1210
1212
|
*
|
|
1211
1213
|
* **Details**
|
|
1212
1214
|
*
|
|
1213
|
-
*
|
|
1214
|
-
* - Includes arrays.
|
|
1215
|
+
* Uses `typeof input === "object" && input !== null` and includes arrays.
|
|
1215
1216
|
*
|
|
1216
1217
|
* **Example** (Object or array)
|
|
1217
1218
|
*
|
|
@@ -1235,7 +1236,8 @@ export function isObjectOrArray(input: unknown): input is { [x: PropertyKey]: un
|
|
|
1235
1236
|
*
|
|
1236
1237
|
* **When to use**
|
|
1237
1238
|
*
|
|
1238
|
-
* Use to narrow unknown input to a non-null, non-array object
|
|
1239
|
+
* Use to narrow unknown input to a non-null, non-array object with a
|
|
1240
|
+
* `Predicate` guard.
|
|
1239
1241
|
*
|
|
1240
1242
|
* **Details**
|
|
1241
1243
|
*
|
|
@@ -1268,7 +1270,7 @@ export function isObject(input: unknown): input is { [x: PropertyKey]: unknown }
|
|
|
1268
1270
|
* **When to use**
|
|
1269
1271
|
*
|
|
1270
1272
|
* Use to narrow unknown input to a readonly view of a non-null, non-array
|
|
1271
|
-
* object.
|
|
1273
|
+
* object with a `Predicate` guard.
|
|
1272
1274
|
*
|
|
1273
1275
|
* **Details**
|
|
1274
1276
|
*
|
|
@@ -1299,11 +1301,12 @@ export function isReadonlyObject(input: unknown): input is { readonly [x: Proper
|
|
|
1299
1301
|
*
|
|
1300
1302
|
* **When to use**
|
|
1301
1303
|
*
|
|
1302
|
-
* Use when you
|
|
1304
|
+
* Use when you need a `Predicate` guard that accepts arrays and functions as
|
|
1305
|
+
* well as objects.
|
|
1303
1306
|
*
|
|
1304
1307
|
* **Details**
|
|
1305
1308
|
*
|
|
1306
|
-
*
|
|
1309
|
+
* Returns `true` for arrays and functions, and `false` for `null`.
|
|
1307
1310
|
*
|
|
1308
1311
|
* **Example** (Object keyword)
|
|
1309
1312
|
*
|
|
@@ -1328,13 +1331,13 @@ export function isObjectKeyword(input: unknown): input is object {
|
|
|
1328
1331
|
*
|
|
1329
1332
|
* **When to use**
|
|
1330
1333
|
*
|
|
1331
|
-
* Use when you need
|
|
1332
|
-
*
|
|
1334
|
+
* Use when you need a `Predicate` guard for property access on `unknown`
|
|
1335
|
+
* values with a simple structural object check.
|
|
1333
1336
|
*
|
|
1334
1337
|
* **Details**
|
|
1335
1338
|
*
|
|
1336
|
-
*
|
|
1337
|
-
*
|
|
1339
|
+
* Uses the `in` operator and `isObjectKeyword`. This does not check property
|
|
1340
|
+
* value types.
|
|
1338
1341
|
*
|
|
1339
1342
|
* **Example** (Guard property)
|
|
1340
1343
|
*
|
|
@@ -1360,13 +1363,13 @@ export const hasProperty: {
|
|
|
1360
1363
|
*
|
|
1361
1364
|
* **When to use**
|
|
1362
1365
|
*
|
|
1363
|
-
* Use when you need
|
|
1364
|
-
*
|
|
1366
|
+
* Use when you need a `Predicate` guard for property access on `unknown`
|
|
1367
|
+
* values with a simple structural object check.
|
|
1365
1368
|
*
|
|
1366
1369
|
* **Details**
|
|
1367
1370
|
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1371
|
+
* Uses the `in` operator and `isObjectKeyword`. This does not check property
|
|
1372
|
+
* value types.
|
|
1370
1373
|
*
|
|
1371
1374
|
* **Example** (Guard property)
|
|
1372
1375
|
*
|
|
@@ -1392,13 +1395,13 @@ export const hasProperty: {
|
|
|
1392
1395
|
*
|
|
1393
1396
|
* **When to use**
|
|
1394
1397
|
*
|
|
1395
|
-
* Use when you need
|
|
1396
|
-
*
|
|
1398
|
+
* Use when you need a `Predicate` guard for property access on `unknown`
|
|
1399
|
+
* values with a simple structural object check.
|
|
1397
1400
|
*
|
|
1398
1401
|
* **Details**
|
|
1399
1402
|
*
|
|
1400
|
-
*
|
|
1401
|
-
*
|
|
1403
|
+
* Uses the `in` operator and `isObjectKeyword`. This does not check property
|
|
1404
|
+
* value types.
|
|
1402
1405
|
*
|
|
1403
1406
|
* **Example** (Guard property)
|
|
1404
1407
|
*
|
|
@@ -1430,12 +1433,12 @@ export const hasProperty: {
|
|
|
1430
1433
|
*
|
|
1431
1434
|
* **When to use**
|
|
1432
1435
|
*
|
|
1433
|
-
* Use when you model tagged unions with a `_tag` field
|
|
1434
|
-
*
|
|
1436
|
+
* Use when you model tagged unions with a `_tag` field and want a quick
|
|
1437
|
+
* `Predicate` guard for tagged values.
|
|
1435
1438
|
*
|
|
1436
1439
|
* **Details**
|
|
1437
1440
|
*
|
|
1438
|
-
*
|
|
1441
|
+
* Uses `hasProperty` and strict equality on `_tag`.
|
|
1439
1442
|
*
|
|
1440
1443
|
* **Example** (Guard tagged)
|
|
1441
1444
|
*
|
|
@@ -1457,12 +1460,12 @@ export const isTagged: {
|
|
|
1457
1460
|
*
|
|
1458
1461
|
* **When to use**
|
|
1459
1462
|
*
|
|
1460
|
-
* Use when you model tagged unions with a `_tag` field
|
|
1461
|
-
*
|
|
1463
|
+
* Use when you model tagged unions with a `_tag` field and want a quick
|
|
1464
|
+
* `Predicate` guard for tagged values.
|
|
1462
1465
|
*
|
|
1463
1466
|
* **Details**
|
|
1464
1467
|
*
|
|
1465
|
-
*
|
|
1468
|
+
* Uses `hasProperty` and strict equality on `_tag`.
|
|
1466
1469
|
*
|
|
1467
1470
|
* **Example** (Guard tagged)
|
|
1468
1471
|
*
|
|
@@ -1484,12 +1487,12 @@ export const isTagged: {
|
|
|
1484
1487
|
*
|
|
1485
1488
|
* **When to use**
|
|
1486
1489
|
*
|
|
1487
|
-
* Use when you model tagged unions with a `_tag` field
|
|
1488
|
-
*
|
|
1490
|
+
* Use when you model tagged unions with a `_tag` field and want a quick
|
|
1491
|
+
* `Predicate` guard for tagged values.
|
|
1489
1492
|
*
|
|
1490
1493
|
* **Details**
|
|
1491
1494
|
*
|
|
1492
|
-
*
|
|
1495
|
+
* Uses `hasProperty` and strict equality on `_tag`.
|
|
1493
1496
|
*
|
|
1494
1497
|
* **Example** (Guard tagged)
|
|
1495
1498
|
*
|
|
@@ -1516,11 +1519,11 @@ export const isTagged: {
|
|
|
1516
1519
|
*
|
|
1517
1520
|
* **When to use**
|
|
1518
1521
|
*
|
|
1519
|
-
* Use when you need
|
|
1522
|
+
* Use when you need a `Predicate` guard for errors caught from unknown sources.
|
|
1520
1523
|
*
|
|
1521
1524
|
* **Details**
|
|
1522
1525
|
*
|
|
1523
|
-
*
|
|
1526
|
+
* Uses `instanceof Error`.
|
|
1524
1527
|
*
|
|
1525
1528
|
* **Example** (Guard error)
|
|
1526
1529
|
*
|
|
@@ -1545,11 +1548,11 @@ export function isError(input: unknown): input is Error {
|
|
|
1545
1548
|
*
|
|
1546
1549
|
* **When to use**
|
|
1547
1550
|
*
|
|
1548
|
-
* Use when you need
|
|
1551
|
+
* Use when you need a `Predicate` runtime guard for binary data.
|
|
1549
1552
|
*
|
|
1550
1553
|
* **Details**
|
|
1551
1554
|
*
|
|
1552
|
-
*
|
|
1555
|
+
* Uses `instanceof Uint8Array`.
|
|
1553
1556
|
*
|
|
1554
1557
|
* **Example** (Guard Uint8Array)
|
|
1555
1558
|
*
|
|
@@ -1575,11 +1578,11 @@ export function isUint8Array(input: unknown): input is Uint8Array {
|
|
|
1575
1578
|
*
|
|
1576
1579
|
* **When to use**
|
|
1577
1580
|
*
|
|
1578
|
-
* Use when you need
|
|
1581
|
+
* Use when you need a `Predicate` runtime guard for dates.
|
|
1579
1582
|
*
|
|
1580
1583
|
* **Details**
|
|
1581
1584
|
*
|
|
1582
|
-
*
|
|
1585
|
+
* Uses `instanceof Date`.
|
|
1583
1586
|
*
|
|
1584
1587
|
* **Example** (Guard Date)
|
|
1585
1588
|
*
|
|
@@ -1604,12 +1607,11 @@ export function isDate(input: unknown): input is Date {
|
|
|
1604
1607
|
*
|
|
1605
1608
|
* **When to use**
|
|
1606
1609
|
*
|
|
1607
|
-
* Use when you need a guard before iterating an unknown value.
|
|
1610
|
+
* Use when you need a `Predicate` guard before iterating an unknown value.
|
|
1608
1611
|
*
|
|
1609
1612
|
* **Details**
|
|
1610
1613
|
*
|
|
1611
|
-
*
|
|
1612
|
-
* - Uses {@link hasProperty} for `Symbol.iterator`.
|
|
1614
|
+
* Accepts strings as iterable and uses `hasProperty` for `Symbol.iterator`.
|
|
1613
1615
|
*
|
|
1614
1616
|
* **Example** (Guard iterable)
|
|
1615
1617
|
*
|
|
@@ -1635,11 +1637,11 @@ export function isIterable(input: unknown): input is Iterable<unknown> {
|
|
|
1635
1637
|
*
|
|
1636
1638
|
* **When to use**
|
|
1637
1639
|
*
|
|
1638
|
-
* Use when you need
|
|
1640
|
+
* Use when you need a `Predicate` guard for promise instances across realms.
|
|
1639
1641
|
*
|
|
1640
1642
|
* **Details**
|
|
1641
1643
|
*
|
|
1642
|
-
*
|
|
1644
|
+
* Performs a structural check for `then` and `catch` functions.
|
|
1643
1645
|
*
|
|
1644
1646
|
* **Example** (Guard promise)
|
|
1645
1647
|
*
|
|
@@ -1664,11 +1666,12 @@ export function isPromise(input: unknown): input is Promise<unknown> {
|
|
|
1664
1666
|
*
|
|
1665
1667
|
* **When to use**
|
|
1666
1668
|
*
|
|
1667
|
-
* Use when you
|
|
1669
|
+
* Use when you need a `Predicate` guard for promise-like values with a
|
|
1670
|
+
* callable `then` method.
|
|
1668
1671
|
*
|
|
1669
1672
|
* **Details**
|
|
1670
1673
|
*
|
|
1671
|
-
*
|
|
1674
|
+
* Performs a structural check for a callable `then`.
|
|
1672
1675
|
*
|
|
1673
1676
|
* **Example** (Guard promise-like)
|
|
1674
1677
|
*
|
|
@@ -1693,11 +1696,11 @@ export function isPromiseLike(input: unknown): input is PromiseLike<unknown> {
|
|
|
1693
1696
|
*
|
|
1694
1697
|
* **When to use**
|
|
1695
1698
|
*
|
|
1696
|
-
* Use when you need a runtime guard for regular expressions.
|
|
1699
|
+
* Use when you need a `Predicate` runtime guard for regular expressions.
|
|
1697
1700
|
*
|
|
1698
1701
|
* **Details**
|
|
1699
1702
|
*
|
|
1700
|
-
*
|
|
1703
|
+
* Uses `instanceof RegExp`.
|
|
1701
1704
|
*
|
|
1702
1705
|
* **Example** (Guard RegExp)
|
|
1703
1706
|
*
|
|
@@ -1722,13 +1725,13 @@ export function isRegExp(input: unknown): input is RegExp {
|
|
|
1722
1725
|
*
|
|
1723
1726
|
* **When to use**
|
|
1724
1727
|
*
|
|
1725
|
-
* Use when you want to
|
|
1726
|
-
*
|
|
1728
|
+
* Use when you want to compose two `Predicate` checks in sequence, especially
|
|
1729
|
+
* when chaining refinements for progressive narrowing.
|
|
1727
1730
|
*
|
|
1728
1731
|
* **Details**
|
|
1729
1732
|
*
|
|
1730
|
-
*
|
|
1731
|
-
* -
|
|
1733
|
+
* For refinements, the output type is narrowed by both checks. Evaluation
|
|
1734
|
+
* short-circuits on the first `false`.
|
|
1732
1735
|
*
|
|
1733
1736
|
* **Example** (Compose refinements)
|
|
1734
1737
|
*
|
|
@@ -1754,13 +1757,13 @@ export const compose: {
|
|
|
1754
1757
|
*
|
|
1755
1758
|
* **When to use**
|
|
1756
1759
|
*
|
|
1757
|
-
* Use when you want to
|
|
1758
|
-
*
|
|
1760
|
+
* Use when you want to compose two `Predicate` checks in sequence, especially
|
|
1761
|
+
* when chaining refinements for progressive narrowing.
|
|
1759
1762
|
*
|
|
1760
1763
|
* **Details**
|
|
1761
1764
|
*
|
|
1762
|
-
*
|
|
1763
|
-
* -
|
|
1765
|
+
* For refinements, the output type is narrowed by both checks. Evaluation
|
|
1766
|
+
* short-circuits on the first `false`.
|
|
1764
1767
|
*
|
|
1765
1768
|
* **Example** (Compose refinements)
|
|
1766
1769
|
*
|
|
@@ -1786,13 +1789,13 @@ export const compose: {
|
|
|
1786
1789
|
*
|
|
1787
1790
|
* **When to use**
|
|
1788
1791
|
*
|
|
1789
|
-
* Use when you want to
|
|
1790
|
-
*
|
|
1792
|
+
* Use when you want to compose two `Predicate` checks in sequence, especially
|
|
1793
|
+
* when chaining refinements for progressive narrowing.
|
|
1791
1794
|
*
|
|
1792
1795
|
* **Details**
|
|
1793
1796
|
*
|
|
1794
|
-
*
|
|
1795
|
-
* -
|
|
1797
|
+
* For refinements, the output type is narrowed by both checks. Evaluation
|
|
1798
|
+
* short-circuits on the first `false`.
|
|
1796
1799
|
*
|
|
1797
1800
|
* **Example** (Compose refinements)
|
|
1798
1801
|
*
|
|
@@ -1818,13 +1821,13 @@ export const compose: {
|
|
|
1818
1821
|
*
|
|
1819
1822
|
* **When to use**
|
|
1820
1823
|
*
|
|
1821
|
-
* Use when you want to
|
|
1822
|
-
*
|
|
1824
|
+
* Use when you want to compose two `Predicate` checks in sequence, especially
|
|
1825
|
+
* when chaining refinements for progressive narrowing.
|
|
1823
1826
|
*
|
|
1824
1827
|
* **Details**
|
|
1825
1828
|
*
|
|
1826
|
-
*
|
|
1827
|
-
* -
|
|
1829
|
+
* For refinements, the output type is narrowed by both checks. Evaluation
|
|
1830
|
+
* short-circuits on the first `false`.
|
|
1828
1831
|
*
|
|
1829
1832
|
* **Example** (Compose refinements)
|
|
1830
1833
|
*
|
|
@@ -1850,13 +1853,13 @@ export const compose: {
|
|
|
1850
1853
|
*
|
|
1851
1854
|
* **When to use**
|
|
1852
1855
|
*
|
|
1853
|
-
* Use when you want to
|
|
1854
|
-
*
|
|
1856
|
+
* Use when you want to compose two `Predicate` checks in sequence, especially
|
|
1857
|
+
* when chaining refinements for progressive narrowing.
|
|
1855
1858
|
*
|
|
1856
1859
|
* **Details**
|
|
1857
1860
|
*
|
|
1858
|
-
*
|
|
1859
|
-
* -
|
|
1861
|
+
* For refinements, the output type is narrowed by both checks. Evaluation
|
|
1862
|
+
* short-circuits on the first `false`.
|
|
1860
1863
|
*
|
|
1861
1864
|
* **Example** (Compose refinements)
|
|
1862
1865
|
*
|
|
@@ -1888,13 +1891,13 @@ export const compose: {
|
|
|
1888
1891
|
*
|
|
1889
1892
|
* **When to use**
|
|
1890
1893
|
*
|
|
1891
|
-
* Use when you want to validate tuple positions independently
|
|
1892
|
-
*
|
|
1894
|
+
* Use when you want to validate tuple positions independently by lifting
|
|
1895
|
+
* element predicates into a tuple predicate.
|
|
1893
1896
|
*
|
|
1894
1897
|
* **Details**
|
|
1895
1898
|
*
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
1899
|
+
* Returns a refinement if any element predicate is a refinement. Evaluation
|
|
1900
|
+
* stops at the first failing element.
|
|
1898
1901
|
*
|
|
1899
1902
|
* **Example** (Tuple predicate)
|
|
1900
1903
|
*
|
|
@@ -1934,13 +1937,13 @@ export function Tuple<const T extends ReadonlyArray<Predicate.Any>>(
|
|
|
1934
1937
|
*
|
|
1935
1938
|
* **When to use**
|
|
1936
1939
|
*
|
|
1937
|
-
* Use when you want to validate a record shape at runtime
|
|
1938
|
-
*
|
|
1940
|
+
* Use when you want to validate a record shape at runtime by lifting property
|
|
1941
|
+
* predicates into an object predicate.
|
|
1939
1942
|
*
|
|
1940
1943
|
* **Details**
|
|
1941
1944
|
*
|
|
1942
|
-
*
|
|
1943
|
-
*
|
|
1945
|
+
* Returns a refinement if any field predicate is a refinement. Only the
|
|
1946
|
+
* specified keys are checked, and extra keys are ignored.
|
|
1944
1947
|
*
|
|
1945
1948
|
* **Example** (Struct predicate)
|
|
1946
1949
|
*
|
|
@@ -1988,7 +1991,7 @@ export function Struct<R extends Record<string, Predicate.Any>>(
|
|
|
1988
1991
|
*
|
|
1989
1992
|
* **Details**
|
|
1990
1993
|
*
|
|
1991
|
-
*
|
|
1994
|
+
* Returns a new predicate that flips the boolean result.
|
|
1992
1995
|
*
|
|
1993
1996
|
* **Example** (Negate)
|
|
1994
1997
|
*
|
|
@@ -2015,13 +2018,13 @@ export function not<A>(self: Predicate<A>): Predicate<A> {
|
|
|
2015
2018
|
*
|
|
2016
2019
|
* **When to use**
|
|
2017
2020
|
*
|
|
2018
|
-
* Use when you want to
|
|
2019
|
-
*
|
|
2021
|
+
* Use when you want to combine `Predicate`s with OR, accepting values that
|
|
2022
|
+
* satisfy at least one condition, including refinements that narrow to a union.
|
|
2020
2023
|
*
|
|
2021
2024
|
* **Details**
|
|
2022
2025
|
*
|
|
2023
|
-
*
|
|
2024
|
-
*
|
|
2026
|
+
* Evaluation short-circuits on the first `true`. For refinements, the output
|
|
2027
|
+
* type is a union.
|
|
2025
2028
|
*
|
|
2026
2029
|
* **Example** (Either condition)
|
|
2027
2030
|
*
|
|
@@ -2044,13 +2047,13 @@ export const or: {
|
|
|
2044
2047
|
*
|
|
2045
2048
|
* **When to use**
|
|
2046
2049
|
*
|
|
2047
|
-
* Use when you want to
|
|
2048
|
-
*
|
|
2050
|
+
* Use when you want to combine `Predicate`s with OR, accepting values that
|
|
2051
|
+
* satisfy at least one condition, including refinements that narrow to a union.
|
|
2049
2052
|
*
|
|
2050
2053
|
* **Details**
|
|
2051
2054
|
*
|
|
2052
|
-
*
|
|
2053
|
-
*
|
|
2055
|
+
* Evaluation short-circuits on the first `true`. For refinements, the output
|
|
2056
|
+
* type is a union.
|
|
2054
2057
|
*
|
|
2055
2058
|
* **Example** (Either condition)
|
|
2056
2059
|
*
|
|
@@ -2073,13 +2076,13 @@ export const or: {
|
|
|
2073
2076
|
*
|
|
2074
2077
|
* **When to use**
|
|
2075
2078
|
*
|
|
2076
|
-
* Use when you want to
|
|
2077
|
-
*
|
|
2079
|
+
* Use when you want to combine `Predicate`s with OR, accepting values that
|
|
2080
|
+
* satisfy at least one condition, including refinements that narrow to a union.
|
|
2078
2081
|
*
|
|
2079
2082
|
* **Details**
|
|
2080
2083
|
*
|
|
2081
|
-
*
|
|
2082
|
-
*
|
|
2084
|
+
* Evaluation short-circuits on the first `true`. For refinements, the output
|
|
2085
|
+
* type is a union.
|
|
2083
2086
|
*
|
|
2084
2087
|
* **Example** (Either condition)
|
|
2085
2088
|
*
|
|
@@ -2102,13 +2105,13 @@ export const or: {
|
|
|
2102
2105
|
*
|
|
2103
2106
|
* **When to use**
|
|
2104
2107
|
*
|
|
2105
|
-
* Use when you want to
|
|
2106
|
-
*
|
|
2108
|
+
* Use when you want to combine `Predicate`s with OR, accepting values that
|
|
2109
|
+
* satisfy at least one condition, including refinements that narrow to a union.
|
|
2107
2110
|
*
|
|
2108
2111
|
* **Details**
|
|
2109
2112
|
*
|
|
2110
|
-
*
|
|
2111
|
-
*
|
|
2113
|
+
* Evaluation short-circuits on the first `true`. For refinements, the output
|
|
2114
|
+
* type is a union.
|
|
2112
2115
|
*
|
|
2113
2116
|
* **Example** (Either condition)
|
|
2114
2117
|
*
|
|
@@ -2131,13 +2134,13 @@ export const or: {
|
|
|
2131
2134
|
*
|
|
2132
2135
|
* **When to use**
|
|
2133
2136
|
*
|
|
2134
|
-
* Use when you want to
|
|
2135
|
-
*
|
|
2137
|
+
* Use when you want to combine `Predicate`s with OR, accepting values that
|
|
2138
|
+
* satisfy at least one condition, including refinements that narrow to a union.
|
|
2136
2139
|
*
|
|
2137
2140
|
* **Details**
|
|
2138
2141
|
*
|
|
2139
|
-
*
|
|
2140
|
-
*
|
|
2142
|
+
* Evaluation short-circuits on the first `true`. For refinements, the output
|
|
2143
|
+
* type is a union.
|
|
2141
2144
|
*
|
|
2142
2145
|
* **Example** (Either condition)
|
|
2143
2146
|
*
|
|
@@ -2162,13 +2165,14 @@ export const or: {
|
|
|
2162
2165
|
*
|
|
2163
2166
|
* **When to use**
|
|
2164
2167
|
*
|
|
2165
|
-
* Use when you want to
|
|
2166
|
-
*
|
|
2168
|
+
* Use when you want to combine `Predicate`s with AND, accepting values that
|
|
2169
|
+
* satisfy multiple conditions, including refinements that narrow to an
|
|
2170
|
+
* intersection.
|
|
2167
2171
|
*
|
|
2168
2172
|
* **Details**
|
|
2169
2173
|
*
|
|
2170
|
-
*
|
|
2171
|
-
*
|
|
2174
|
+
* Evaluation short-circuits on the first `false`. For refinements, the output
|
|
2175
|
+
* type is an intersection.
|
|
2172
2176
|
*
|
|
2173
2177
|
* **Example** (Both conditions)
|
|
2174
2178
|
*
|
|
@@ -2199,13 +2203,14 @@ export const and: {
|
|
|
2199
2203
|
*
|
|
2200
2204
|
* **When to use**
|
|
2201
2205
|
*
|
|
2202
|
-
* Use when you want to
|
|
2203
|
-
*
|
|
2206
|
+
* Use when you want to combine `Predicate`s with AND, accepting values that
|
|
2207
|
+
* satisfy multiple conditions, including refinements that narrow to an
|
|
2208
|
+
* intersection.
|
|
2204
2209
|
*
|
|
2205
2210
|
* **Details**
|
|
2206
2211
|
*
|
|
2207
|
-
*
|
|
2208
|
-
*
|
|
2212
|
+
* Evaluation short-circuits on the first `false`. For refinements, the output
|
|
2213
|
+
* type is an intersection.
|
|
2209
2214
|
*
|
|
2210
2215
|
* **Example** (Both conditions)
|
|
2211
2216
|
*
|
|
@@ -2236,13 +2241,14 @@ export const and: {
|
|
|
2236
2241
|
*
|
|
2237
2242
|
* **When to use**
|
|
2238
2243
|
*
|
|
2239
|
-
* Use when you want to
|
|
2240
|
-
*
|
|
2244
|
+
* Use when you want to combine `Predicate`s with AND, accepting values that
|
|
2245
|
+
* satisfy multiple conditions, including refinements that narrow to an
|
|
2246
|
+
* intersection.
|
|
2241
2247
|
*
|
|
2242
2248
|
* **Details**
|
|
2243
2249
|
*
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2250
|
+
* Evaluation short-circuits on the first `false`. For refinements, the output
|
|
2251
|
+
* type is an intersection.
|
|
2246
2252
|
*
|
|
2247
2253
|
* **Example** (Both conditions)
|
|
2248
2254
|
*
|
|
@@ -2273,13 +2279,14 @@ export const and: {
|
|
|
2273
2279
|
*
|
|
2274
2280
|
* **When to use**
|
|
2275
2281
|
*
|
|
2276
|
-
* Use when you want to
|
|
2277
|
-
*
|
|
2282
|
+
* Use when you want to combine `Predicate`s with AND, accepting values that
|
|
2283
|
+
* satisfy multiple conditions, including refinements that narrow to an
|
|
2284
|
+
* intersection.
|
|
2278
2285
|
*
|
|
2279
2286
|
* **Details**
|
|
2280
2287
|
*
|
|
2281
|
-
*
|
|
2282
|
-
*
|
|
2288
|
+
* Evaluation short-circuits on the first `false`. For refinements, the output
|
|
2289
|
+
* type is an intersection.
|
|
2283
2290
|
*
|
|
2284
2291
|
* **Example** (Both conditions)
|
|
2285
2292
|
*
|
|
@@ -2310,13 +2317,14 @@ export const and: {
|
|
|
2310
2317
|
*
|
|
2311
2318
|
* **When to use**
|
|
2312
2319
|
*
|
|
2313
|
-
* Use when you want to
|
|
2314
|
-
*
|
|
2320
|
+
* Use when you want to combine `Predicate`s with AND, accepting values that
|
|
2321
|
+
* satisfy multiple conditions, including refinements that narrow to an
|
|
2322
|
+
* intersection.
|
|
2315
2323
|
*
|
|
2316
2324
|
* **Details**
|
|
2317
2325
|
*
|
|
2318
|
-
*
|
|
2319
|
-
*
|
|
2326
|
+
* Evaluation short-circuits on the first `false`. For refinements, the output
|
|
2327
|
+
* type is an intersection.
|
|
2320
2328
|
*
|
|
2321
2329
|
* **Example** (Both conditions)
|
|
2322
2330
|
*
|
|
@@ -2349,11 +2357,11 @@ export const and: {
|
|
|
2349
2357
|
*
|
|
2350
2358
|
* **When to use**
|
|
2351
2359
|
*
|
|
2352
|
-
* Use when you want
|
|
2360
|
+
* Use when you want to combine two `Predicate`s with exclusive-or semantics.
|
|
2353
2361
|
*
|
|
2354
2362
|
* **Details**
|
|
2355
2363
|
*
|
|
2356
|
-
*
|
|
2364
|
+
* Returns `true` when results differ.
|
|
2357
2365
|
*
|
|
2358
2366
|
* **Example** (Exclusive or)
|
|
2359
2367
|
*
|
|
@@ -2378,11 +2386,11 @@ export const xor: {
|
|
|
2378
2386
|
*
|
|
2379
2387
|
* **When to use**
|
|
2380
2388
|
*
|
|
2381
|
-
* Use when you want
|
|
2389
|
+
* Use when you want to combine two `Predicate`s with exclusive-or semantics.
|
|
2382
2390
|
*
|
|
2383
2391
|
* **Details**
|
|
2384
2392
|
*
|
|
2385
|
-
*
|
|
2393
|
+
* Returns `true` when results differ.
|
|
2386
2394
|
*
|
|
2387
2395
|
* **Example** (Exclusive or)
|
|
2388
2396
|
*
|
|
@@ -2407,11 +2415,11 @@ export const xor: {
|
|
|
2407
2415
|
*
|
|
2408
2416
|
* **When to use**
|
|
2409
2417
|
*
|
|
2410
|
-
* Use when you want
|
|
2418
|
+
* Use when you want to combine two `Predicate`s with exclusive-or semantics.
|
|
2411
2419
|
*
|
|
2412
2420
|
* **Details**
|
|
2413
2421
|
*
|
|
2414
|
-
*
|
|
2422
|
+
* Returns `true` when results differ.
|
|
2415
2423
|
*
|
|
2416
2424
|
* **Example** (Exclusive or)
|
|
2417
2425
|
*
|
|
@@ -2438,11 +2446,11 @@ export const xor: {
|
|
|
2438
2446
|
*
|
|
2439
2447
|
* **When to use**
|
|
2440
2448
|
*
|
|
2441
|
-
* Use when you want to check equivalence of two
|
|
2449
|
+
* Use when you want to check equivalence of two `Predicate`s.
|
|
2442
2450
|
*
|
|
2443
2451
|
* **Details**
|
|
2444
2452
|
*
|
|
2445
|
-
*
|
|
2453
|
+
* Returns `true` when both results are equal.
|
|
2446
2454
|
*
|
|
2447
2455
|
* **Example** (Equivalence)
|
|
2448
2456
|
*
|
|
@@ -2465,11 +2473,11 @@ export const eqv: {
|
|
|
2465
2473
|
*
|
|
2466
2474
|
* **When to use**
|
|
2467
2475
|
*
|
|
2468
|
-
* Use when you want to check equivalence of two
|
|
2476
|
+
* Use when you want to check equivalence of two `Predicate`s.
|
|
2469
2477
|
*
|
|
2470
2478
|
* **Details**
|
|
2471
2479
|
*
|
|
2472
|
-
*
|
|
2480
|
+
* Returns `true` when both results are equal.
|
|
2473
2481
|
*
|
|
2474
2482
|
* **Example** (Equivalence)
|
|
2475
2483
|
*
|
|
@@ -2492,11 +2500,11 @@ export const eqv: {
|
|
|
2492
2500
|
*
|
|
2493
2501
|
* **When to use**
|
|
2494
2502
|
*
|
|
2495
|
-
* Use when you want to check equivalence of two
|
|
2503
|
+
* Use when you want to check equivalence of two `Predicate`s.
|
|
2496
2504
|
*
|
|
2497
2505
|
* **Details**
|
|
2498
2506
|
*
|
|
2499
|
-
*
|
|
2507
|
+
* Returns `true` when both results are equal.
|
|
2500
2508
|
*
|
|
2501
2509
|
* **Example** (Equivalence)
|
|
2502
2510
|
*
|
|
@@ -2521,12 +2529,13 @@ export const eqv: {
|
|
|
2521
2529
|
*
|
|
2522
2530
|
* **When to use**
|
|
2523
2531
|
*
|
|
2524
|
-
* Use when you
|
|
2525
|
-
*
|
|
2532
|
+
* Use when you need to encode logical implication between `Predicate` rules,
|
|
2533
|
+
* where one rule only applies when a precondition holds.
|
|
2526
2534
|
*
|
|
2527
2535
|
* **Details**
|
|
2528
2536
|
*
|
|
2529
|
-
*
|
|
2537
|
+
* Models constraints like "if A then B" and returns `true` when the antecedent
|
|
2538
|
+
* is `false`.
|
|
2530
2539
|
*
|
|
2531
2540
|
* **Example** (Implication)
|
|
2532
2541
|
*
|
|
@@ -2551,12 +2560,13 @@ export const implies: {
|
|
|
2551
2560
|
*
|
|
2552
2561
|
* **When to use**
|
|
2553
2562
|
*
|
|
2554
|
-
* Use when you
|
|
2555
|
-
*
|
|
2563
|
+
* Use when you need to encode logical implication between `Predicate` rules,
|
|
2564
|
+
* where one rule only applies when a precondition holds.
|
|
2556
2565
|
*
|
|
2557
2566
|
* **Details**
|
|
2558
2567
|
*
|
|
2559
|
-
*
|
|
2568
|
+
* Models constraints like "if A then B" and returns `true` when the antecedent
|
|
2569
|
+
* is `false`.
|
|
2560
2570
|
*
|
|
2561
2571
|
* **Example** (Implication)
|
|
2562
2572
|
*
|
|
@@ -2581,12 +2591,13 @@ export const implies: {
|
|
|
2581
2591
|
*
|
|
2582
2592
|
* **When to use**
|
|
2583
2593
|
*
|
|
2584
|
-
* Use when you
|
|
2585
|
-
*
|
|
2594
|
+
* Use when you need to encode logical implication between `Predicate` rules,
|
|
2595
|
+
* where one rule only applies when a precondition holds.
|
|
2586
2596
|
*
|
|
2587
2597
|
* **Details**
|
|
2588
2598
|
*
|
|
2589
|
-
*
|
|
2599
|
+
* Models constraints like "if A then B" and returns `true` when the antecedent
|
|
2600
|
+
* is `false`.
|
|
2590
2601
|
*
|
|
2591
2602
|
* **Example** (Implication)
|
|
2592
2603
|
*
|
|
@@ -2616,11 +2627,11 @@ export const implies: {
|
|
|
2616
2627
|
*
|
|
2617
2628
|
* **When to use**
|
|
2618
2629
|
*
|
|
2619
|
-
* Use when you want
|
|
2630
|
+
* Use when you want to combine two `Predicate`s with logical NOR semantics.
|
|
2620
2631
|
*
|
|
2621
2632
|
* **Details**
|
|
2622
2633
|
*
|
|
2623
|
-
*
|
|
2634
|
+
* Returns the negation of `or`.
|
|
2624
2635
|
*
|
|
2625
2636
|
* **Example** (NOR)
|
|
2626
2637
|
*
|
|
@@ -2643,11 +2654,11 @@ export const nor: {
|
|
|
2643
2654
|
*
|
|
2644
2655
|
* **When to use**
|
|
2645
2656
|
*
|
|
2646
|
-
* Use when you want
|
|
2657
|
+
* Use when you want to combine two `Predicate`s with logical NOR semantics.
|
|
2647
2658
|
*
|
|
2648
2659
|
* **Details**
|
|
2649
2660
|
*
|
|
2650
|
-
*
|
|
2661
|
+
* Returns the negation of `or`.
|
|
2651
2662
|
*
|
|
2652
2663
|
* **Example** (NOR)
|
|
2653
2664
|
*
|
|
@@ -2670,11 +2681,11 @@ export const nor: {
|
|
|
2670
2681
|
*
|
|
2671
2682
|
* **When to use**
|
|
2672
2683
|
*
|
|
2673
|
-
* Use when you want
|
|
2684
|
+
* Use when you want to combine two `Predicate`s with logical NOR semantics.
|
|
2674
2685
|
*
|
|
2675
2686
|
* **Details**
|
|
2676
2687
|
*
|
|
2677
|
-
*
|
|
2688
|
+
* Returns the negation of `or`.
|
|
2678
2689
|
*
|
|
2679
2690
|
* **Example** (NOR)
|
|
2680
2691
|
*
|
|
@@ -2702,11 +2713,11 @@ export const nor: {
|
|
|
2702
2713
|
*
|
|
2703
2714
|
* **When to use**
|
|
2704
2715
|
*
|
|
2705
|
-
* Use when you want
|
|
2716
|
+
* Use when you want to combine two `Predicate`s with logical NAND semantics.
|
|
2706
2717
|
*
|
|
2707
2718
|
* **Details**
|
|
2708
2719
|
*
|
|
2709
|
-
*
|
|
2720
|
+
* Returns the negation of `and`.
|
|
2710
2721
|
*
|
|
2711
2722
|
* **Example** (NAND)
|
|
2712
2723
|
*
|
|
@@ -2729,11 +2740,11 @@ export const nand: {
|
|
|
2729
2740
|
*
|
|
2730
2741
|
* **When to use**
|
|
2731
2742
|
*
|
|
2732
|
-
* Use when you want
|
|
2743
|
+
* Use when you want to combine two `Predicate`s with logical NAND semantics.
|
|
2733
2744
|
*
|
|
2734
2745
|
* **Details**
|
|
2735
2746
|
*
|
|
2736
|
-
*
|
|
2747
|
+
* Returns the negation of `and`.
|
|
2737
2748
|
*
|
|
2738
2749
|
* **Example** (NAND)
|
|
2739
2750
|
*
|
|
@@ -2756,11 +2767,11 @@ export const nand: {
|
|
|
2756
2767
|
*
|
|
2757
2768
|
* **When to use**
|
|
2758
2769
|
*
|
|
2759
|
-
* Use when you want
|
|
2770
|
+
* Use when you want to combine two `Predicate`s with logical NAND semantics.
|
|
2760
2771
|
*
|
|
2761
2772
|
* **Details**
|
|
2762
2773
|
*
|
|
2763
|
-
*
|
|
2774
|
+
* Returns the negation of `and`.
|
|
2764
2775
|
*
|
|
2765
2776
|
* **Example** (NAND)
|
|
2766
2777
|
*
|
|
@@ -2792,8 +2803,8 @@ export const nand: {
|
|
|
2792
2803
|
*
|
|
2793
2804
|
* **Details**
|
|
2794
2805
|
*
|
|
2795
|
-
*
|
|
2796
|
-
*
|
|
2806
|
+
* Evaluation short-circuits on the first `false`. The collection is iterated
|
|
2807
|
+
* each time the predicate is called.
|
|
2797
2808
|
*
|
|
2798
2809
|
* **Example** (All checks)
|
|
2799
2810
|
*
|
|
@@ -2830,8 +2841,8 @@ export function every<A>(collection: Iterable<Predicate<A>>): Predicate<A> {
|
|
|
2830
2841
|
*
|
|
2831
2842
|
* **Details**
|
|
2832
2843
|
*
|
|
2833
|
-
*
|
|
2834
|
-
*
|
|
2844
|
+
* Evaluation short-circuits on the first `true`. The collection is iterated
|
|
2845
|
+
* each time the predicate is called.
|
|
2835
2846
|
*
|
|
2836
2847
|
* **Example** (Any check)
|
|
2837
2848
|
*
|