diff --git a/packages/qwik/src/core/render/jsx/utils.public.ts b/packages/qwik/src/core/render/jsx/utils.public.ts index f0bc7fd090d..c807270f084 100644 --- a/packages/qwik/src/core/render/jsx/utils.public.ts +++ b/packages/qwik/src/core/render/jsx/utils.public.ts @@ -24,12 +24,15 @@ export const SSRStreamBlock: FunctionComponent<{ children?: JSXOutput }> = (prop /** @public */ export type SSRStreamProps = { - children: - | AsyncGenerator - | ((stream: StreamWriter) => Promise) - | (() => AsyncGenerator); + children: SSRStreamChildren; }; +/** @public */ +export type SSRStreamChildren = + | AsyncGenerator + | ((stream: StreamWriter) => Promise) + | (() => AsyncGenerator); + /** @public */ export const SSRStream: FunctionComponent = (props, key) => jsx(RenderOnce, { children: jsx(InternalSSRStream, props) }, key); diff --git a/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts b/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts index 87530f6842c..9cee1d8d300 100644 --- a/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts +++ b/packages/qwik/src/core/v2/ssr/ssr-render-jsx.ts @@ -26,7 +26,7 @@ import { qrlToString, type SerializationContext } from '../shared/shared-seriali import { DEBUG_TYPE, VirtualType, type fixMeAny } from '../shared/types'; import { applyInlineComponent, applyQwikComponentBody } from './ssr-render-component'; import type { SSRContainer, SsrAttrs } from './ssr-types'; -import { SSRComment, SSRStream, type SSRStreamProps } from '../../render/jsx/utils.public'; +import { SSRComment, SSRStream, type SSRStreamChildren } from '../../render/jsx/utils.public'; import { isAsyncGenerator } from '../../util/async-generator'; class SetScopedStyle { @@ -238,8 +238,7 @@ function processJSXNode( ssr.commentNode((jsx.props.data as string) || ''); } else if (type === SSRStream) { ssr.commentNode(FLUSH_COMMENT); - const props = jsx.props as SSRStreamProps; - const generator = props.children; + const generator = jsx.children as SSRStreamChildren; let value: AsyncGenerator | Promise; if (isFunction(generator)) { value = generator({