/** * Generic type guard for children as a function patterns. */ export function isRenderFunc(func: React.ReactNode | Function): func is T { return typeof func === 'function'; }