(fileName)
| 144605 | return file && file.resolvedPath === path ? file : undefined; |
| 144606 | } |
| 144607 | function getOrCreateSourceFileLike(fileName) { |
| 144608 | var path = toPath(fileName); |
| 144609 | var fileFromCache = sourceFileLike.get(path); |
| 144610 | if (fileFromCache !== undefined) |
| 144611 | return fileFromCache ? fileFromCache : undefined; |
| 144612 | if (!host.readFile || host.fileExists && !host.fileExists(path)) { |
| 144613 | sourceFileLike.set(path, false); |
| 144614 | return undefined; |
| 144615 | } |
| 144616 | // And failing that, check the disk |
| 144617 | var text = host.readFile(path); |
| 144618 | var file = text ? createSourceFileLike(text) : false; |
| 144619 | sourceFileLike.set(path, file); |
| 144620 | return file ? file : undefined; |
| 144621 | } |
| 144622 | // This can be called from source mapper in either source program or program that includes generated file |
| 144623 | function getSourceFileLike(fileName) { |
| 144624 | return !host.getSourceFileLike ? |
no test coverage detected