docs/libs/typescript.js
function tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state) {
        if (!onlyRecordFailures) {
            // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing
            var directory = ts.getDirectoryPath(candidate);
            if (directory) {
                onlyRecordFailures = !directoryProbablyExists(directory, state.host);
            }
        }
        return ts.forEach(extensions, function (ext) {
            return !(state.skipTsx && ts.isJsxOrTsxExtension(ext)) && tryFile(candidate + ext, failedLookupLocation, onlyRecordFailures, state);
        });
    }
function tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state) {
        if (!onlyRecordFailures) {
            // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing
            var directory = ts.getDirectoryPath(candidate);
            if (directory) {
                onlyRecordFailures = !directoryProbablyExists(directory, state.host);
            }
        }
        return ts.forEach(extensions, function (ext) {
            return !(state.skipTsx && ts.isJsxOrTsxExtension(ext)) && tryFile(candidate + ext, failedLookupLocation, onlyRecordFailures, state);
        });
    }
function tryAddingExtensions ( candidate , extensions , failedLookupLocation , onlyRecordFailures , state ) { if ( ! onlyRecordFailures ) { // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing var directory = ts . getDirectoryPath ( candidate ) ; if ( directory ) { onlyRecordFailures = ! directoryProbablyExists ( directory , state . host ) ; } } return ts . forEach ( extensions , function ( ext ) { return ! ( state . skipTsx && ts . isJsxOrTsxExtension ( ext ) ) && tryFile ( candidate + ext , failedLookupLocation , onlyRecordFailures , state ) ; } ) ; }
Try to return an existing file that adds one of the `extensions` to `candidate`.
Try to return an existing file that adds one of the extensions to candidate .