UNPKG

@abaplint/transpiler

Version:
33 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HandleView = void 0; const chunk_1 = require("../chunk"); const transpile_types_1 = require("../transpile_types"); // view, much like the tables class HandleView { runObject(obj, reg) { const filename = obj.getXMLFile()?.getFilename().replace(".xml", ".mjs").toLowerCase(); if (filename === undefined) { return []; } const type = obj.parseType(reg); const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = { "objectType": "VIEW", "type": ${new transpile_types_1.TranspileTypes().toType(type)}, };`); // todo, "keyFields": ${JSON.stringify(obj.listKeys())}, const output = { object: { name: obj.getName(), type: obj.getType(), }, filename: filename, chunk: chunk, requires: [], exports: [], }; return [output]; } } exports.HandleView = HandleView; //# sourceMappingURL=handle_view.js.map