(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions)
| 122474 | return undefined; |
| 122475 | } |
| 122476 | function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) { |
| 122477 | var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, rootDirs, getCanonicalFileName); |
| 122478 | if (normalizedTargetPath === undefined) { |
| 122479 | return undefined; |
| 122480 | } |
| 122481 | var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, rootDirs, getCanonicalFileName); |
| 122482 | var relativePath = normalizedSourcePath !== undefined ? ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(normalizedSourcePath, normalizedTargetPath, getCanonicalFileName)) : normalizedTargetPath; |
| 122483 | return ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeJs |
| 122484 | ? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions) |
| 122485 | : ts.removeFileExtension(relativePath); |
| 122486 | } |
| 122487 | function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) { |
| 122488 | var path = _a.path, isRedirect = _a.isRedirect; |
| 122489 | var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory; |
no test coverage detected