mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(react): replace any with unknown in isRenderProp type guard (#1500)
This commit is contained in:
@@ -9,7 +9,7 @@ import type { HTMLProps, RenderProp } from './types';
|
||||
import { composeRefs } from './use-composed-refs';
|
||||
|
||||
/** Check if a value is a render prop (function or React element). */
|
||||
export function isRenderProp(value: unknown): value is RenderProp<any> {
|
||||
export function isRenderProp(value: unknown): value is RenderProp<unknown> {
|
||||
return isFunction(value) || isValidElement(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -1133,7 +1133,7 @@ function inlinePrivatePackages(source: string): { source: string; utilities: str
|
||||
}
|
||||
|
||||
utilities.push(
|
||||
"function isRenderProp(value: unknown): value is RenderProp<any> {\n return typeof value === 'function' || isValidElement(value);\n}"
|
||||
"function isRenderProp(value: unknown): value is RenderProp<unknown> {\n return typeof value === 'function' || isValidElement(value);\n}"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user