Skip to content

Commit e906b83

Browse files
authored
Correct jsdoc for ParentProps and ParentComponent (#2480)
It doesn't technically allow functions anymore
1 parent 4cd7eb1 commit e906b83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/solid/src/render/component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ export type VoidComponent<P extends Record<string, any> = {}> = Component<VoidPr
3939

4040
/**
4141
* Extend props to allow an optional `children` prop with the usual
42-
* type in JSX, `JSX.Element` (which allows elements, arrays, functions, etc.).
42+
* type in JSX, `JSX.Element` (which allows elements, arrays, strings, etc.).
4343
* Use this for components that you want to accept children.
4444
*/
4545
export type ParentProps<P extends Record<string, any> = {}> = P & { children?: JSX.Element };
4646
/**
4747
* `ParentComponent` allows an optional `children` prop with the usual
48-
* type in JSX, `JSX.Element` (which allows elements, arrays, functions, etc.).
48+
* type in JSX, `JSX.Element` (which allows elements, arrays, strings, etc.).
4949
* Use this for components that you want to accept children.
5050
*/
5151
export type ParentComponent<P extends Record<string, any> = {}> = Component<ParentProps<P>>;

0 commit comments

Comments
 (0)