PromoCursed/node_modules/fork-ts-checker-webpack-plugin/lib/issue/IssueSeverity.js

12 lines
498 B
JavaScript
Raw Normal View History

2024-08-20 23:25:37 +04:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function isIssueSeverity(value) {
return ['error', 'warning'].includes(value);
}
exports.isIssueSeverity = isIssueSeverity;
function compareIssueSeverities(severityA, severityB) {
const [priorityA, priorityB] = [severityA, severityB].map((severity) => ['warning' /* 0 */, 'error' /* 1 */].indexOf(severity));
return Math.sign(priorityB - priorityA);
}
exports.compareIssueSeverities = compareIssueSeverities;