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

Function remaining

packages/effect/src/PubSub.ts:1409–1414  ·  view source on GitHub ↗
(self: Subscription<A>)

Source from the content-addressed store, hash-verified

1407 * @since 4.0.0
1408 */
1409export const remaining = <A>(self: Subscription<A>): Effect.Effect<number> =>
1410 Effect.suspend(() =>
1411 self.shutdownFlag.current
1412 ? Effect.interrupt
1413 : Effect.succeed(self.subscription.size() + self.replayWindow.remaining)
1414 )
1415
1416/**
1417 * Synchronously returns the number of messages currently available in the

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected