mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
28 lines
867 B
JavaScript
28 lines
867 B
JavaScript
|
"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
|