* A direct string-literal attribute (`source = "…"`, `component = "…"`) of a * module declaration, re-read from its file (project paths are stored * relative; node metadata isn't persisted, so the declaration's line span + * cached file lines are the durable carrier). Non-literal values (variable
(decl: Node, name: string, context: ResolutionContext)
| 218 | * expressions) return null — dynamic wiring is never guessed. |
| 219 | */ |
| 220 | function readModuleAttr(decl: Node, name: string, context: ResolutionContext): string | null { |
| 221 | return readNodeSpanMatch(decl, new RegExp(`^\\s*${name}\\s*=\\s*"([^"]+)"`), context); |
| 222 | } |
| 223 | |
| 224 | /** First capture of `re` across the node's line span, or null. */ |
| 225 | function readNodeSpanMatch(node: Node, re: RegExp, context: ResolutionContext): string | null { |
no test coverage detected