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

Class Watch

packages/effect/test/ui/Runtime.test.ts:1802–1820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1800 const calls: Array<number> = []
1801 // Its service is a Layer above the branch that stays open.
1802 class Watch extends Command.Service<Watch>()(
1803 "test/QueuedStream",
1804 {
1805 args: { n: Schema.Number },
1806 success: Component.Noop,
1807 stream: true,
1808 mode: "queue"
1809 }
1810 ) {
1811 static readonly layer = this.toLayer(({ n }) =>
1812 Stream.fromEffect(Effect.andThen(
1813 Effect.sync(() => calls.push(n)),
1814 Effect.as(
1815 n === 1 ? Deferred.await(finish) : Effect.void,
1816 Component.noop
1817 )
1818 ))
1819 )
1820 }
1821 const Queue = Component.define({
1822 name: "Queue",
1823 model: Schema.Null,

Callers 3

Runtime.test.tsFile · 0.70
Shared.test.tsFile · 0.70
HtmlServer.test.tsFile · 0.50

Calls 4

toLayerMethod · 0.65
pushMethod · 0.65
awaitMethod · 0.65
syncMethod · 0.45

Tested by

no test coverage detected