Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function generateEntryResolutionError(
importee: string,
importer: string,
options: NormalizedCompilerOptions
) {
const absPath = getAbsolutePath(importee, importer, options);
const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);
return caseIgnoredFilename
? generateCompilerError(ModuleResolutionErrors.FOLDER_AND_FILE_NAME_CASE_MISMATCH, {
messageArgs: [caseIgnoredFilename, importee],
origin: { filename: importer },
})
: generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FAILED, {
messageArgs: [importee],
origin: { filename: importer },
});
}
function generateEntryResolutionError(
importee: string,
importer: string,
options: NormalizedCompileOptions
) {
const absPath = getAbsolutePath(importee, importer, options);
const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);
return caseIgnoredFilename
? generateCompilerError(ModuleResolutionErrors.FOLDER_AND_FILE_NAME_CASE_MISMATCH, {
messageArgs: [caseIgnoredFilename, importee],
origin: { filename: importer },
})
: generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FAILED, {
messageArgs: [importee],
origin: { filename: importer },
});
}