StreamUnify<A>Type-level unification hook for Stream within the Effect type system.
export interface interface StreamUnify<A extends { [Unify.typeSymbol]?: any; }>Type-level unification hook for Stream within the Effect type system.
StreamUnify<function (type parameter) A in StreamUnify<A extends { [Unify.typeSymbol]?: any; }>A extends { [import UnifyUnify.const typeSymbol: typeof Unify.typeSymbolDefines the unique symbol used to identify the type information for unification.
When to use
Use when you need a type-level protocol key that exposes the source type
read by Unify from a protocol-enabled data type.
Details
This symbol is a type-level protocol key. It stores the source type that
unification reads when widening protocol-enabled values.
The type of the typeSymbol.
When to use
Use to reference the type information property key in type-level protocol
definitions.
Details
This type represents the unique symbol used for storing type information
in types that support unification. It's used in type-level operations
to access and manipulate type information.
typeSymbol]?: any }> extends import EffectEffect.EffectUnify<function (type parameter) A in StreamUnify<A extends { [Unify.typeSymbol]?: any; }>A> {
StreamUnify<A extends { [Unify.typeSymbol]?: any; }>.Stream?: () => A[Unify.typeSymbol] extends Stream<infer A0, infer E0, infer R0> | infer _ ? Stream<A0, E0, R0> : neverStream?: () => function (type parameter) A in StreamUnify<A extends { [Unify.typeSymbol]?: any; }>A[import UnifyUnify.type typeSymbol = typeof Unify.typeSymbolDefines the unique symbol used to identify the type information for unification.
When to use
Use when you need a type-level protocol key that exposes the source type
read by Unify from a protocol-enabled data type.
Details
This symbol is a type-level protocol key. It stores the source type that
unification reads when widening protocol-enabled values.
The type of the typeSymbol.
When to use
Use to reference the type information property key in type-level protocol
definitions.
Details
This type represents the unique symbol used for storing type information
in types that support unification. It's used in type-level operations
to access and manipulate type information.
typeSymbol] extends interface Stream<out A, out E = never, out R = never>A Stream<A, E, R> describes a program that can emit many A values, fail
with E, and require R.
Details
Streams are pull-based with backpressure and emit chunks to amortize effect
evaluation. They support monadic composition and error handling similar to
Effect, adapted for multiple values.
Example (Creating and consuming streams)
import { Console, Effect, Stream } from "effect"
const program = Effect.gen(function*() {
yield* Stream.make(1, 2, 3).pipe(
Stream.map((n) => n * 2),
Stream.runForEach((n) => Console.log(n))
)
})
Effect.runPromise(program)
// Output:
// 2
// 4
// 6
Stream<infer function (type parameter) A0A0, infer function (type parameter) E0E0, infer function (type parameter) R0R0> | infer function (type parameter) __ ? interface Stream<out A, out E = never, out R = never>A Stream<A, E, R> describes a program that can emit many A values, fail
with E, and require R.
Details
Streams are pull-based with backpressure and emit chunks to amortize effect
evaluation. They support monadic composition and error handling similar to
Effect, adapted for multiple values.
Example (Creating and consuming streams)
import { Console, Effect, Stream } from "effect"
const program = Effect.gen(function*() {
yield* Stream.make(1, 2, 3).pipe(
Stream.map((n) => n * 2),
Stream.runForEach((n) => Console.log(n))
)
})
Effect.runPromise(program)
// Output:
// 2
// 4
// 6
Stream<function (type parameter) A0A0, function (type parameter) E0E0, function (type parameter) R0R0> : never
}