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

Function callback

packages/effect/src/Stream.ts:694–700  ·  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

692 * @since 4.0.0
693 */
694export const callback = <A, E = never, R = never>(
695 f: (queue: Queue.Queue<A, E | Cause.Done>) => Effect.Effect<unknown, E, R | Scope.Scope>,
696 options?: {
697 readonly bufferSize?: number | undefined
698 readonly strategy?: "sliding" | "dropping" | "suspend" | undefined
699 }
700): Stream<A, E, Exclude<R, Scope.Scope>> => fromChannel(Channel.callbackArray(f, options))
701
702/**
703 * Creates an empty stream.

Callers 15

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

Calls 1

fromChannelFunction · 0.70

Tested by 15

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
queryFunction · 0.40
constructFunction · 0.40