loose-ts-check
Version:
Run TS type-check and ignore certain errors in some files
17 lines (16 loc) • 771 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.reportTscErrorsThatCouldBeIgnored = void 0;
const chalk_1 = require("chalk");
function reportTscErrorsThatCouldBeIgnored({ log }, tscErrorsThatCouldBeIgnored) {
if (tscErrorsThatCouldBeIgnored.length === 0) {
return;
}
log(`${(0, chalk_1.yellow)(tscErrorsThatCouldBeIgnored.length)} errors could be ignored, as their error codes are ignored`);
tscErrorsThatCouldBeIgnored.forEach((tscError) => log(tscError.rawErrorLines.join('\n')));
log(`Use the ${(0, chalk_1.green)('--init')} option to add these file paths to the registry.`);
return {
shouldFail: true,
};
}
exports.reportTscErrorsThatCouldBeIgnored = reportTscErrorsThatCouldBeIgnored;