MCPcopy Create free account
hub / github.com/Effect-TS/effect / EmitOps

Interface EmitOps

packages/effect/src/StreamEmit.ts:29–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 * @category models
28 */
29export interface EmitOps<in R, in E, in A, out B> {
30 /**
31 * Emits a chunk containing the specified values.
32 */
33 chunk(chunk: Chunk.Chunk<A>): Promise<B>
34
35 /**
36 * Terminates with a cause that dies with the specified defect.
37 */
38 die<Err>(defect: Err): Promise<B>
39
40 /**
41 * Terminates with a cause that dies with a `Throwable` with the specified
42 * message.
43 */
44 dieMessage(message: string): Promise<B>
45
46 /**
47 * Either emits the specified value if this `Exit` is a `Success` or else
48 * terminates with the specified cause if this `Exit` is a `Failure`.
49 */
50 done(exit: Exit.Exit<A, E>): Promise<B>
51
52 /**
53 * Terminates with an end of stream signal.
54 */
55 end(): Promise<B>
56
57 /**
58 * Terminates with the specified error.
59 */
60 fail(error: E): Promise<B>
61
62 /**
63 * Either emits the success value of this effect or terminates the stream
64 * with the failure value of this effect.
65 */
66 fromEffect(effect: Effect.Effect<A, E, R>): Promise<B>
67
68 /**
69 * Either emits the success value of this effect or terminates the stream
70 * with the failure value of this effect.
71 */
72 fromEffectChunk(effect: Effect.Effect<Chunk.Chunk<A>, E, R>): Promise<B>
73
74 /**
75 * Terminates the stream with the specified cause.
76 */
77 halt(cause: Cause.Cause<E>): Promise<B>
78
79 /**
80 * Emits a chunk containing the specified value.
81 */
82 single(value: A): Promise<B>
83}
84
85/**
86 * @since 3.6.0

Callers 59

watchParcelFunction · 0.65
Differ.test.tsFile · 0.65
async.test.tsFile · 0.65
sequencing.test.tsFile · 0.65
loopFunction · 0.65
producerFunction · 0.65
e2eSuiteFunction · 0.65
rpc-schemas.tsFile · 0.65
onExitFunction · 0.65
formDataMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected