File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -510,7 +510,7 @@ export class NodeUtil {
510510 * @param node The node to check.
511511 * @returns True if the node is a function-as-a-child, false otherwise.
512512 */
513- public static isFunctionChild < E extends NodeInstance | ReactNode > ( node : NodeElement ) : node is NodeFunction < E > {
513+ public static isFunctionChild < E extends NodeElementType > ( node : NodeElement ) : node is NodeFunction < E > {
514514 if ( typeof node !== 'function' || isReactClassComponent ( node ) || isMemo ( node ) || isForwardRef ( node ) ) return false
515515 try {
516516 return ! ( node . prototype && typeof node . prototype . render === 'function' )
@@ -534,7 +534,7 @@ export class NodeUtil {
534534 * @param disableEmotion Inherited flag to disable Emotion styling for children.
535535 * @returns The processed and rendered output of the render function, or null if an error occurs.
536536 */
537- public static functionRenderer < E extends ReactNode | NodeInstance > ( { render, disableEmotion } : FunctionRendererProps < E > ) : ReactNode | null | undefined {
537+ public static functionRenderer < E extends NodeElementType > ( { render, disableEmotion } : FunctionRendererProps < E > ) : ReactNode | null | undefined {
538538 let result : NodeElement
539539 try {
540540 // Execute the render prop function to get its output.
You can’t perform that action at this time.
0 commit comments