Skip to content

UseStreamSource

type UseStreamSource<TYield, TReturn> =
| StreamSource<TYield>
| StreamSourceWithReturn<TYield, TReturn>
| (() => StreamSourceWithReturn<TYield, TReturn>);

Defined in: stream-renderer.tsx:34

Any StreamSource, spelled so that a generator’s (or channel’s) return type is inferred as TReturn: useStream({ source: gen }) types returnValue without explicit type arguments.

Type Parameter
TYield
TReturn