(dirname: string, toPath: string)
| 4 | import { FilePath } from '../project/FileManager'; |
| 5 | |
| 6 | function toAbsoluteImportPath(dirname: string, toPath: string): string { |
| 7 | if (toPath.startsWith('.') || toPath.startsWith('/')) { |
| 8 | return _path.resolve(dirname, toPath); |
| 9 | } else { |
| 10 | // Absolute import path |
| 11 | return _path.join('/', toPath); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | export class ImportPathResolver { |
| 16 | private resolvedPaths = new Map<string, string>(); |
no test coverage detected