GoScrobble/web/node_modules/fork-ts-checker-webpack-plugin/lib/issue/IssueOrigin.js

28 lines
867 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var IssueOrigin = {
TYPESCRIPT: 'typescript',
ESLINT: 'eslint',
INTERNAL: 'internal'
};
exports.IssueOrigin = IssueOrigin;
function isIssueOrigin(value) {
return [
IssueOrigin.TYPESCRIPT,
IssueOrigin.ESLINT,
IssueOrigin.INTERNAL
].includes(value);
}
exports.isIssueOrigin = isIssueOrigin;
function compareIssueOrigins(originA, originB) {
var _a = [originA, originB].map(function (origin) {
return [
IssueOrigin.ESLINT /* 0 */,
IssueOrigin.TYPESCRIPT /* 1 */,
IssueOrigin.INTERNAL /* 2 */
].indexOf(origin);
}), priorityA = _a[0], priorityB = _a[1];
return Math.sign(priorityB - priorityA);
}
exports.compareIssueOrigins = compareIssueOrigins;
//# sourceMappingURL=IssueOrigin.js.map