UNPKG

bc-minecraft-bedrock-project

Version:

The typescript library responsible for reading/parsing minecraft bedrock data

25 lines 848 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomCommand = void 0; exports.toCommandContainer = toCommandContainer; const bc_minecraft_bedrock_shared_1 = require("bc-minecraft-bedrock-shared"); var CustomCommand; (function (CustomCommand) { function create(id, uri, syntaxes) { const line = syntaxes[0]?.source?.line ?? 0; return { id, syntaxes, location: bc_minecraft_bedrock_shared_1.Location.create(uri, line), }; } CustomCommand.create = create; })(CustomCommand || (exports.CustomCommand = CustomCommand = {})); function toCommandContainer(commands) { const output = {}; commands.forEach((command) => { output[command.id] = command.syntaxes; }); return output; } //# sourceMappingURL=custom-command.js.map