(other: CommandModule)
| 17 | const topics = new Set<string>() |
| 18 | const subCommands: SubCommand[] = [] |
| 19 | const related = (other: CommandModule): false | string => { |
| 20 | if (!other.command) { |
| 21 | return false |
| 22 | } |
| 23 | |
| 24 | if (typeof other.command === 'string' && other.command.startsWith(topicName)) { |
| 25 | return other.command |
| 26 | } |
| 27 | if (typeof other.command === 'object') { |
| 28 | const match = other.command.find(name => name.startsWith(topicName)) |
| 29 | return match ?? false |
| 30 | } |
| 31 | |
| 32 | return false |
| 33 | } |
| 34 | for (const other of commands) { |
| 35 | const relatedCommandCommand = related(other) |
| 36 | if (relatedCommandCommand) { |
no outgoing calls
no test coverage detected