@abaplint/core
Version:
abaplint - Core API
39 lines • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultVersion = exports.Version = void 0;
exports.getPreviousVersion = getPreviousVersion;
var Version;
(function (Version) {
Version["OpenABAP"] = "open-abap";
Version["v700"] = "v700";
Version["v702"] = "v702";
Version["v740sp02"] = "v740sp02";
Version["v740sp05"] = "v740sp05";
Version["v740sp08"] = "v740sp08";
Version["v750"] = "v750";
Version["v751"] = "v751";
Version["v752"] = "v752";
Version["v753"] = "v753";
Version["v754"] = "v754";
Version["v755"] = "v755";
Version["v756"] = "v756";
Version["v757"] = "v757";
Version["v758"] = "v758";
Version["Cloud"] = "Cloud";
})(Version || (exports.Version = Version = {}));
exports.defaultVersion = Version.v758;
function getPreviousVersion(v) {
if (v === Version.OpenABAP) {
return Version.v702;
}
const all = Object.values(Version);
const found = all.indexOf(v);
if (found < 0) {
throw "Unknown version: " + v;
}
else if (found === 0) {
throw "Nothing lower: " + v;
}
return all[found - 1];
}
//# sourceMappingURL=version.js.map