loose-ts-check
Version:
Run TS type-check and ignore certain errors in some files
20 lines (19 loc) • 811 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateIgnoredErrorCodes = void 0;
const utils_1 = require("../../utils");
function updateIgnoredErrorCodes({ cliOptions, log, saveJSONFile, }, ignoredErrorCodes, updatedIgnoredErrorCodes) {
if ((0, utils_1.areSetsEqual)(ignoredErrorCodes, updatedIgnoredErrorCodes)) {
return;
}
log('Updating the list of ignored error codes...');
const error = saveJSONFile(cliOptions['ignored-error-codes'], Array.from(updatedIgnoredErrorCodes).sort());
if (error) {
log('Error when saving the list of ignored error codes');
log(error.message);
}
else {
log('The list of ignored error codes updated successfully');
}
}
exports.updateIgnoredErrorCodes = updateIgnoredErrorCodes;