diff --git a/website/src/content/docs/guides/dependency-injection.md b/website/src/content/docs/guides/dependency-injection.md index e785640..2026963 100644 --- a/website/src/content/docs/guides/dependency-injection.md +++ b/website/src/content/docs/guides/dependency-injection.md @@ -143,4 +143,4 @@ receive `undefined`. Boot fails loudly, so you never serve `undefined`. - Everything a handler can inject: [Argument decorators](/guides/arguments/) and the [decorator reference](/reference/decorators/). - Coerce and validate injected values with Standard Schema: [Validation](/guides/validation/). -- Return an `AsyncIterable` to push data over time: [Streaming](/guides/streaming/). +- Declare `@Sse` and return an `AsyncIterable` to push data over time: [Streaming](/guides/streaming/). diff --git a/website/src/content/docs/guides/streaming.md b/website/src/content/docs/guides/streaming.md index ffeb978..01ad3a7 100644 --- a/website/src/content/docs/guides/streaming.md +++ b/website/src/content/docs/guides/streaming.md @@ -28,7 +28,7 @@ Streaming bypasses the response transformer — the transport frames each value ## Streaming — SSE -Return an `AsyncIterable` and the pipeline streams it (the transformer is bypassed; the transport frames it, handles backpressure, and cleans up on disconnect). +A route decorated `@Sse` streams — that's what triggers it, not the return value. It must return an `AsyncIterable`; the transport frames each value as an SSE event, handles backpressure, and cleans up on disconnect (the transformer is bypassed). ```typescript import { Route, Sse } from '@green-tea/core';