diff --git a/src/generic.d.ts b/src/generic.d.ts index f7173155d9..6552ef0470 100644 --- a/src/generic.d.ts +++ b/src/generic.d.ts @@ -57,9 +57,9 @@ export interface StrictHtmlSpanProps { // ====================================================== export type SemanticShorthandItemFunc = ( - component: React.ComponentType, + component: React.ReactType, props: TProps, - children?: React.ReactChildren, + children?: React.ReactNode | React.ReactNodeArray, ) => React.ReactElement | null export type SemanticShorthandCollection = SemanticShorthandItem[] diff --git a/test/typings.tsx b/test/typings.tsx index d65220cce2..9493489dd1 100644 --- a/test/typings.tsx +++ b/test/typings.tsx @@ -18,6 +18,17 @@ const ShorthandItemFuncAssert = () => ( /> ) +const ShorthandItemFuncChildren = () => ( +