* What a type declaration says after its `=`, which may start on the next * line: `procedure(...) of object` for `TOnHelper =` above it.
(alias: Node, context: ResolutionContext)
| 2757 | * line: `procedure(...) of object` for `TOnHelper =` above it. |
| 2758 | */ |
| 2759 | function aliasedTypeText(alias: Node, context: ResolutionContext): string { |
| 2760 | const lines = fileLines(alias.filePath, context); |
| 2761 | let text = ''; |
| 2762 | for (let i = alias.startLine - 1; i < alias.startLine + 2 && i < lines.length; i++) { |
| 2763 | text += ' ' + lines[i]!.replace(/\/\/.*$|\{[^}]*\}|\(\*.*?\*\)/g, ' '); |
| 2764 | const eq = text.indexOf('='); |
| 2765 | if (eq >= 0 && text.slice(eq + 1).trim()) return text.slice(eq + 1).trim(); |
| 2766 | } |
| 2767 | return ''; |
| 2768 | } |
| 2769 | |
| 2770 | /** A routine type written out: `procedure(...) of object`, `function: T`, `reference to procedure`. */ |
| 2771 | const PROCEDURAL_TYPE = /^(?:reference\s+to\s+)?(?:procedure|function)\b/i; |
no test coverage detected