(root: ViewNode)
| 250 | } |
| 251 | |
| 252 | function collectNativeScrollViews(root: ViewNode): NativeScrollView[] { |
| 253 | const results: NativeScrollView[] = []; |
| 254 | const stack = [root]; |
| 255 | while (stack.length > 0) { |
| 256 | const node = stack.pop() as ViewNode; |
| 257 | if (isScrollableType(node.className)) { |
| 258 | const nativeScrollView = toNativeScrollView(node); |
| 259 | if (nativeScrollView) { |
| 260 | results.push(nativeScrollView); |
| 261 | } |
| 262 | } |
| 263 | stack.push(...node.children); |
| 264 | } |
| 265 | return results; |
| 266 | } |
| 267 | |
| 268 | function toNativeScrollView(node: ViewNode): NativeScrollView | null { |
| 269 | const contentRoot = node.children[0]; |
no test coverage detected
searching dependent graphs…