export type ChildFn < T > = ( value : T ) => React . ReactNode ; export function isChildFunction < T > ( children ) { return typeof children === "function" ; } export function isPromise < T > ( value ? ) { return typeof ( value ?. then ) === "function" ; }