( eq: (node: T) => boolean, tree: T )
| 150 | }; |
| 151 | |
| 152 | export const findParentNode = <T extends { id: string; childNodes: Array<T> }>( |
| 153 | eq: (node: T) => boolean, |
| 154 | tree: T |
| 155 | ): T | null => { |
| 156 | try { |
| 157 | return findParentNodeOrThrow(eq, tree); |
| 158 | } catch { |
| 159 | return null; |
| 160 | } |
| 161 | }; |
nothing calls this directly
no test coverage detected