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

Function callback

packages/effect/src/Stream.ts:774–780  ·  view source on GitHub ↗
(
  f: (queue: Queue.Queue<A, E | Cause.Done>) => Effect.Effect<unknown, E, R | Scope.Scope>,
  options?: {
    readonly bufferSize?: number | undefined
    readonly strategy?: "sliding" | "dropping" | "suspend" | undefined
  }
)

Source from the content-addressed store, hash-verified

772 * @since 4.0.0
773 */
774export const callback = <A, E = never, R = never>(
775 f: (queue: Queue.Queue<A, E | Cause.Done>) => Effect.Effect<unknown, E, R | Scope.Scope>,
776 options?: {
777 readonly bufferSize?: number | undefined
778 readonly strategy?: "sliding" | "dropping" | "suspend" | undefined
779 }
780): Stream<A, E, Exclude<R, Scope.Scope>> => fromChannel(Channel.callbackArray(f, options))
781
782/**
783 * Creates an empty stream.

Callers 15

Effect.tsFile · 0.70
fromEventListenerFunction · 0.70
queryFunction · 0.50
mockPoolFunction · 0.50
connectMethod · 0.50
beginTransactionMethod · 0.50
commitTransactionMethod · 0.50
saveTransactionMethod · 0.50
rollbackTransactionMethod · 0.50
connectMethod · 0.50
beginTransactionMethod · 0.50

Calls 1

fromChannelFunction · 0.70

Tested by 15

queryFunction · 0.40
mockPoolFunction · 0.40
connectMethod · 0.40
beginTransactionMethod · 0.40
commitTransactionMethod · 0.40
saveTransactionMethod · 0.40
rollbackTransactionMethod · 0.40
connectMethod · 0.40
beginTransactionMethod · 0.40
commitTransactionMethod · 0.40
saveTransactionMethod · 0.40
rollbackTransactionMethod · 0.40