(node: BaseNode)
| 227 | const final = isResolutionFinal() |
| 228 | const reached = new Set<BaseNode>() |
| 229 | const reaches = (node: BaseNode): boolean => { |
| 230 | if (node.userCode) return true |
| 231 | if (!node.hasAlias || reached.has(node)) return false |
| 232 | if (node.c.reachesUserCode !== undefined) return node.c.reachesUserCode |
| 233 | reached.add(node) |
| 234 | const found = |
| 235 | node.is("alias") ? |
| 236 | reaches(node.resolution) |
| 237 | : node.children.some(reaches) || |
| 238 | (!node.is("union") && node.otherRefs.some(reaches)) |
| 239 | if (found && final) node.c.reachesUserCode = true |
| 240 | return found |
| 241 | } |
| 242 | if (reaches(root)) return true |
| 243 | if (final) for (const node of reached) node.c.reachesUserCode = false |
| 244 | return false |
no test coverage detected