* 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)
| 1221 | * line: `procedure(...) of object` for `TOnHelper =` above it. |
| 1222 | */ |
| 1223 | function aliasedTypeText(alias: Node, context: ResolutionContext): string { |
| 1224 | const lines = fileLines(alias.filePath, context); |
| 1225 | let text = ''; |
| 1226 | for (let i = alias.startLine - 1; i < alias.startLine + 2 && i < lines.length; i++) { |
| 1227 | text += ' ' + lines[i]!.replace(/\/\/.*$|\{[^}]*\}|\(\*.*?\*\)/g, ' '); |
| 1228 | const eq = text.indexOf('='); |
| 1229 | if (eq >= 0 && text.slice(eq + 1).trim()) return text.slice(eq + 1).trim(); |
| 1230 | } |
| 1231 | return ''; |
| 1232 | } |
| 1233 | |
| 1234 | /** A routine type written out: `procedure(...) of object`, `function: T`, `reference to procedure`. */ |
| 1235 | const PROCEDURAL_TYPE = /^(?:reference\s+to\s+)?(?:procedure|function)\b/i; |
no test coverage detected