"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReplCommand = void 0;
const tslib_1 = require("tslib");
function __assignType(fn, args) {
    fn.__type = args;
    return fn;
}
const app_1 = require("@deepkit/app");
const repl = tslib_1.__importStar(require("repl"));
const repl_context_1 = require("./repl-context");
let ReplCommand = class ReplCommand {
    constructor() { }
    async execute() {
        (0, repl_context_1.buildReplContext)();
        return (Promise.Ω = [['$']], new Promise(__assignType(resolve => {
            const replServer = repl.start();
            replServer.on('exit', () => {
                resolve();
            });
        }, ['resolve', '', 'P"2!"/"'])));
    }
};
exports.ReplCommand = ReplCommand;
ReplCommand.__type = ['constructor', 'execute', 'ReplCommand', 'P"0!P"0"5w#'];
exports.ReplCommand = ReplCommand = tslib_1.__decorate([
    app_1.cli.controller('repl', {
        description: 'Start a REPL'
    }),
    tslib_1.__metadata("design:paramtypes", [])
], ReplCommand);
//# sourceMappingURL=repl.js.map