import { ReactNode , ReactElement } from 'react' ; import Stage , { StageProps } from '../Stage' ; param element returns export default function isStageElement ( element ) { return ( element !== null && typeof element === 'object' && 'type' in element && ( element . type as any ) . displayName === 'Stage' ) ; }