(fix, importingFile, compilerOptions, toPath)
| 153470 | // (e.g. `export * from "../whatever"`) or are not named "index" (we don't even try to consider |
| 153471 | // this if we're in a resolution mode where you can't drop trailing "/index" from paths). |
| 153472 | function isFixPossiblyReExportingImportingFile(fix, importingFile, compilerOptions, toPath) { |
| 153473 | var _a; |
| 153474 | if (fix.isReExport && |
| 153475 | ((_a = fix.exportInfo) === null || _a === void 0 ? void 0 : _a.moduleFileName) && |
| 153476 | ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeJs && |
| 153477 | isIndexFileName(fix.exportInfo.moduleFileName)) { |
| 153478 | var reExportDir = toPath(ts.getDirectoryPath(fix.exportInfo.moduleFileName)); |
| 153479 | return ts.startsWith((importingFile.path), reExportDir); |
| 153480 | } |
| 153481 | return false; |
| 153482 | } |
| 153483 | function isIndexFileName(fileName) { |
| 153484 | return ts.getBaseFileName(fileName, [".js", ".jsx", ".d.ts", ".ts", ".tsx"], /*ignoreCase*/ true) === "index"; |
| 153485 | } |
no test coverage detected