Files
2024-02-15 17:01:50 +00:00

7 lines
185 B
TypeScript

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