"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var cp = __importStar(require("child_process"));
var BIN_DIR = process.cwd();
// https://github.com/theia-ide/typescript-language-server
var THEIA_LS_SERVER = {
    binary: BIN_DIR + "/../node_modules/.bin/typescript-language-server",
    args: ["--stdio", "--log-level", "4", "--tsserver-log-file=ts-logs.txt"]
};
// https://github.com/sourcegraph/javascript-typescript-langserver
var SOURCEGRAPH_LS_SERVER = {
    binary: BIN_DIR + "/../node_modules/.bin/javascript-typescript-stdio",
    args: []
};
var LS_SERVER = SOURCEGRAPH_LS_SERVER;
exports.spawnServer = function () {
    var binary = LS_SERVER.binary, args = LS_SERVER.args;
    return cp.fork(binary, args, { stdio: ["pipe", "pipe", "pipe", "ipc"] });
};
