(identifier: string)
| 161 | const stack: Array<string> = [] |
| 162 | |
| 163 | function visit(identifier: string): void { |
| 164 | const current = state.get(identifier) ?? 0 |
| 165 | if (current === 1) { |
| 166 | const start = stack.indexOf(identifier) |
| 167 | for (let index = start; index < stack.length; index++) recursive.add(stack[index]) |
| 168 | return |
| 169 | } |
| 170 | if (current === 2) return |
| 171 | state.set(identifier, 1) |
| 172 | stack.push(identifier) |
| 173 | for (const dependency of dependencies.get(identifier)!) visit(dependency) |
| 174 | stack.pop() |
| 175 | state.set(identifier, 2) |
| 176 | } |
| 177 | |
| 178 | for (const identifier of identifiers) visit(identifier) |
| 179 |
no test coverage detected