mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
7 lines
185 B
TypeScript
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';
|
|
}
|