From 38d5aa383312b27ac97e1a54992dc78807bdd13e Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Tue, 10 Jun 2025 22:14:05 +0700 Subject: [PATCH] feat(lib/utils/react): get type from predicate in `findInReactFiber` --- lib/utils/src/react.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/utils/src/react.ts b/lib/utils/src/react.ts index 4cc1b59..29d2a48 100644 --- a/lib/utils/src/react.ts +++ b/lib/utils/src/react.ts @@ -21,11 +21,11 @@ export function useReRender() { const ReactFiberWalkable = new Set(['props', 'children', 'child', 'sibling']) -export function findInReactFiber( - tree: Extract, - filter: SearchFilter, -): any { - return findInTree(tree, filter, { +export function findInReactFiber( + tree: Extract, + filter: F, +) { + return findInTree(tree, filter, { walkable: ReactFiberWalkable, }) }