@@ -261,7 +261,8 @@ const browserDtsOutput = [
261261 "}" ,
262262 "" ,
263263 "export type TemplatePrimitive = string | number | boolean | null | undefined;" ,
264- "export type TemplateLike = TemplateResult | TemplatePrimitive | Node | TemplateLike[];" ,
264+ "export type TemplateLike = TemplateResult | Children | TemplatePrimitive | Node | TemplateLike[];" ,
265+ "export type ChildrenInput = TemplateLike | ((this: ComponentContext) => TemplateLike);" ,
265266 "export interface LazyDescriptor {" ,
266267 " url: string;" ,
267268 " [key: string]: unknown;" ,
@@ -282,6 +283,10 @@ const browserDtsOutput = [
282283 " readonly values: readonly unknown[];" ,
283284 "}" ,
284285 "" ,
286+ "export interface Children {" ,
287+ " readonly __asyncChildrenBrand: true;" ,
288+ "}" ,
289+ "" ,
285290 "export type SchedulerStrategy = \"microtask\" | \"manual\";" ,
286291 "export type SchedulerPhase = \"binding\" | \"lifecycle\" | \"effect\" | \"async\" | \"post\" | string;" ,
287292 "export interface SchedulerJob {" ,
@@ -682,7 +687,7 @@ const browserDtsOutput = [
682687 " effect(fn: (this: ComponentContext) => unknown): Cleanup;" ,
683688 " handler(fn: HandlerFunction): string;" ,
684689 " handler(name: string, fn: HandlerFunction): string;" ,
685- " render<TProps extends Record<string, unknown> = Record<string, unknown>>(Child: ComponentFunction<TProps>, props?: TProps): TemplateLike;" ,
690+ " render<TProps extends object = Record<string, unknown>>(Child: ComponentFunction<TProps>, props?: Omit< TProps, \"children\">, children?: ChildrenInput ): TemplateLike;" ,
686691 " suspense(signalRef: Pick<SignalRef, \"id\">, views: SuspenseViews | SuspenseReadyView): TemplateLike;" ,
687692 " on(eventName: \"intersect\", fn: IntersectionCallback): void;" ,
688693 " on(eventName: \"intersect\", options: IntersectionOptions | undefined | null, fn: IntersectionCallback): void;" ,
@@ -693,7 +698,7 @@ const browserDtsOutput = [
693698 " intersect(target: Element, options: IntersectionOptions | undefined | null, fn: IntersectionCallback): Cleanup;" ,
694699 "}" ,
695700 "" ,
696- "export type ComponentFunction<TProps extends Record<string, unknown> = Record<string, unknown>> = (this: ComponentContext, props: TProps) => TemplateLike;" ,
701+ "export type ComponentFunction<TProps extends object = Record<string, unknown>> = (this: ComponentContext, props: TProps) => TemplateLike;" ,
697702 "export type SuspenseReadyView = (this: ComponentContext, signalRef: Pick<SignalRef, \"id\">) => TemplateLike;" ,
698703 "export interface SuspenseViews {" ,
699704 " loading?: SuspenseReadyView;" ,
@@ -731,7 +736,7 @@ const browserDtsOutput = [
731736 " start(): this;" ,
732737 " scan(rootOrFragment?: Document | Element | DocumentFragment): this;" ,
733738 " swap(boundaryId: string, fragmentOrTemplate: TemplateLike): Element;" ,
734- " mount<TProps extends Record<string, unknown> = Record<string, unknown>>(target: Element, Component: ComponentFunction<TProps>, props?: TProps): unknown;" ,
739+ " mount<TProps extends object = Record<string, unknown>>(target: Element, Component: ComponentFunction<TProps>, props?: TProps): unknown;" ,
735740 " destroy(): void;" ,
736741 "}" ,
737742 "" ,
@@ -748,7 +753,7 @@ const browserDtsOutput = [
748753 " ready(): Promise<LoaderInstance>;" ,
749754 " scan(rootOrFragment?: Document | Element | DocumentFragment): Promise<LoaderInstance>;" ,
750755 " swap(boundaryId: string, fragmentOrTemplate: TemplateLike): Promise<Element>;" ,
751- " mount<TProps extends Record<string, unknown> = Record<string, unknown>>(target: Element, Component: ComponentFunction<TProps>, props?: TProps): Promise<unknown>;" ,
756+ " mount<TProps extends object = Record<string, unknown>>(target: Element, Component: ComponentFunction<TProps>, props?: TProps): Promise<unknown>;" ,
752757 " inspect(): AsyncLoaderFacadeInspection;" ,
753758 "}" ,
754759 "" ,
@@ -1033,16 +1038,18 @@ const browserDtsOutput = [
10331038 "export declare function createBoundaryReceiver(options: BoundaryReceiverOptions): BoundaryReceiver;" ,
10341039 "export declare function createCacheRegistry(initialMap?: Record<string, CacheDefinition | CacheDefinitionOptions>, options?: { now?: () => number; registry?: RegistryStore; type?: \"cache.browser\" | \"cache.server\" }): CacheRegistry;" ,
10351040 "export declare function defineCache(options?: CacheDefinitionOptions): CacheDefinition;" ,
1036- "export declare function component<TProps extends Record<string, unknown> = Record<string, unknown>>(fn: ComponentFunction<TProps>): ComponentFunction<TProps>;" ,
1041+ "export declare function component<TProps extends object = Record<string, unknown>>(fn: ComponentFunction<TProps>): ComponentFunction<TProps>;" ,
1042+ "export declare function childrenFragment(source: ChildrenInput): Children;" ,
10371043 "export declare function createComponentRegistry(initialMap?: Record<string, ComponentFunction>, options?: { registry?: RegistryStore; type?: \"component\" }): ComponentRegistry;" ,
1038- "export declare function defineComponent<TProps extends Record<string, unknown> = Record<string, unknown>>(fn: ComponentFunction<TProps>): ComponentFunction<TProps>;" ,
1044+ "export declare function defineComponent<TProps extends object = Record<string, unknown>>(fn: ComponentFunction<TProps>): ComponentFunction<TProps>;" ,
10391045 "export declare function defineAsyncContainerElement(options?: { tagName?: string; app?: AppHub; Async?: AppHub; customElements?: CustomElementRegistry; HTMLElement?: typeof HTMLElement; window?: Window }): CustomElementConstructor;" ,
10401046 "export declare function defineAsyncSuspenseElement(options?: { tagName?: string; customElements?: CustomElementRegistry; HTMLElement?: typeof HTMLElement; window?: Window }): CustomElementConstructor;" ,
10411047 "export declare function defineRegistrySnapshot<T extends RegistryRuntimeSnapshot>(snapshot?: T): T;" ,
10421048 "export declare function createLazyRegistry(options?: { registryAssets?: RegistryAssetsConfig; assets?: RegistryAssetsConfig; importModule?: (url: string) => MaybePromise<Record<string, unknown>> }): LazyRegistry;" ,
10431049 "export declare function delay(ms: number, signal?: AbortSignal): Promise<void>;" ,
10441050 "export declare function createHandlerRegistry(initialMap?: Record<string, HandlerFunction>, options?: { registry?: RegistryStore; type?: \"handler\" }): HandlerRegistry;" ,
10451051 "export declare function html(strings: TemplateStringsArray, ...values: unknown[]): TemplateResult;" ,
1052+ "export declare function isChildrenFragment(value: unknown): value is Children;" ,
10461053 "export declare function Loader(options?: LoaderOptions): LoaderInstance;" ,
10471054 "export declare const AsyncLoader: typeof Loader;" ,
10481055 "export declare function createPartialRegistry(initialMap?: Record<string, PartialFunction>, options?: { registry?: RegistryStore; type?: \"partial\" }): PartialRegistry;" ,
@@ -1250,10 +1257,10 @@ const jsxDtsOutput = [
12501257 "export declare const ASYNC_JSX_SUSPENSE: unique symbol;" ,
12511258 "export declare const ASYNC_JSX_REVEAL: unique symbol;" ,
12521259 "export type JsxSignal<T = unknown> = { readonly kind: \"async-jsx-signal\"; readonly type: typeof ASYNC_JSX_SIGNAL; readonly source: T; readonly options: Record<string, unknown> };" ,
1253- "export type JsxComponent<TProps extends Record<string, unknown> = Record<string, unknown>> = { readonly kind: \"async-jsx-component\"; readonly type: typeof ASYNC_JSX_COMPONENT; readonly render: (props: TProps) => unknown; readonly options: Record<string, unknown> };" ,
1260+ "export type JsxComponent<TProps extends object = Record<string, unknown>> = { readonly kind: \"async-jsx-component\"; readonly type: typeof ASYNC_JSX_COMPONENT; readonly render: (props: TProps) => unknown; readonly options: Record<string, unknown> };" ,
12541261 "export type JsxBoundary = { readonly kind: \"async-jsx-suspense\" | \"async-jsx-reveal\"; readonly type: typeof ASYNC_JSX_SUSPENSE | typeof ASYNC_JSX_REVEAL; readonly props: Record<string, unknown> };" ,
12551262 "export declare function signal<T = unknown>(source: T, options?: Record<string, unknown>): JsxSignal<T>;" ,
1256- "export declare function component<TProps extends Record<string, unknown> = Record<string, unknown>>(render: (props: TProps) => unknown, options?: Record<string, unknown>): JsxComponent<TProps>;" ,
1263+ "export declare function component<TProps extends object = Record<string, unknown>>(render: (props: TProps) => unknown, options?: Record<string, unknown>): JsxComponent<TProps>;" ,
12571264 "export declare function Suspense(props?: Record<string, unknown>): JsxBoundary;" ,
12581265 "export declare function Reveal(props?: Record<string, unknown>): JsxBoundary;" ,
12591266 ""
0 commit comments