* The class declaration among same-named nodes, not a forward declaration * (`TFoo = class;`, which names no members or ancestors): the longest one.
(classes: Node[])
| 1895 | * (`TFoo = class;`, which names no members or ancestors): the longest one. |
| 1896 | */ |
| 1897 | function declarationOf(classes: Node[]): Node | null { |
| 1898 | let best: Node | null = null; |
| 1899 | for (const c of classes) if (!best || c.endLine - c.startLine > best.endLine - best.startLine) best = c; |
| 1900 | return best; |
| 1901 | } |
| 1902 | |
| 1903 | /** The class a method belongs to: its qualified name's owner, declared in the method's own file. */ |
| 1904 | function classOfRoutine(routine: Node, context: ResolutionContext): Node | null { |
no outgoing calls
no test coverage detected