()
| 42635 | } |
| 42636 | } |
| 42637 | function primaryLookup() { |
| 42638 | // Check primary library paths |
| 42639 | if (typeRoots && typeRoots.length) { |
| 42640 | if (traceEnabled) { |
| 42641 | trace(host, ts.Diagnostics.Resolving_with_primary_search_path_0, typeRoots.join(", ")); |
| 42642 | } |
| 42643 | return ts.firstDefined(typeRoots, function (typeRoot) { |
| 42644 | var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName); |
| 42645 | var candidateDirectory = ts.getDirectoryPath(candidate); |
| 42646 | var directoryExists = ts.directoryProbablyExists(candidateDirectory, host); |
| 42647 | if (!directoryExists && traceEnabled) { |
| 42648 | trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory); |
| 42649 | } |
| 42650 | return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, !directoryExists, moduleResolutionState)); |
| 42651 | }); |
| 42652 | } |
| 42653 | else { |
| 42654 | if (traceEnabled) { |
| 42655 | trace(host, ts.Diagnostics.Root_directory_cannot_be_determined_skipping_primary_search_paths); |
| 42656 | } |
| 42657 | } |
| 42658 | } |
| 42659 | function secondaryLookup() { |
| 42660 | var initialLocationForSecondaryLookup = containingFile && ts.getDirectoryPath(containingFile); |
| 42661 | if (initialLocationForSecondaryLookup !== undefined) { |
no test coverage detected