(type: ts.Type, options: ts.CompilerOptions)
| 403 | } |
| 404 | |
| 405 | function findModule(type: ts.Type, options: ts.CompilerOptions) { |
| 406 | if (type.symbol && type.symbol.declarations) { |
| 407 | for (const decl of type.symbol.declarations) { |
| 408 | const file = decl.getSourceFile(); |
| 409 | if (file) { |
| 410 | const relative = path.relative(path.dirname(options.configFilePath as string), path.resolve(file.fileName)); |
| 411 | return toImportPath(relative); |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | return `./${type.symbol.name}`; |
| 416 | } |
| 417 | |
| 418 | return ''; |
| 419 | } |
no test coverage detected