From fa0708672c5fd5af268133b3e352d1f0630c147e Mon Sep 17 00:00:00 2001 From: Yunfei He Date: Thu, 28 May 2026 19:03:33 +0800 Subject: [PATCH] docs(runtime): clarify WithChildren adds a children prop to $props --- packages/runtime/src/components/with-children.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/runtime/src/components/with-children.ts b/packages/runtime/src/components/with-children.ts index 086fec6..324b2f8 100644 --- a/packages/runtime/src/components/with-children.ts +++ b/packages/runtime/src/components/with-children.ts @@ -1,10 +1,11 @@ /** - * Adds an optional `children` to a component's JSX `$props` so that TSX written - * under the automatic runtime (`jsx: "react-jsx"` + `jsxImportSource: "vue"`) - * accepts child content. Vue's JSX namespace defines no `ElementChildrenAttribute`, - * so the automatic runtime passes children as a `children` prop — which must be - * present on `$props` to type-check. Vue routes that prop to the default slot at - * runtime, so this is a type-only shim with no runtime effect. + * Adds an optional `children` prop to a component's JSX `$props` so that TSX + * written under the automatic runtime (`jsx: "react-jsx"` + `jsxImportSource: + * "vue"`) accepts child content. Vue's JSX namespace defines no + * `ElementChildrenAttribute`, so the automatic runtime passes children as a + * `children` prop — which must be present on `$props` to type-check. Vue routes + * that prop to the default slot at runtime, so this is a type-only shim with no + * runtime effect. */ export type WithChildren = C & { new (): { $props: { children?: T } };