fix linter issues

This commit is contained in:
Vladimir Matveev 2016-08-19 11:55:29 -07:00
parent a1da7709f8
commit b81b2baff6

View File

@ -181,18 +181,18 @@ namespace ts.server {
this.logger.info("Binding...");
}
let args: string[] = [];
const args: string[] = [];
if (this.logger.loggingEnabled() && this.logger.getLogFileName()) {
args.push("--logFile", combinePaths(getDirectoryPath(normalizeSlashes(this.logger.getLogFileName())), `ti-${process.pid}.log`));
}
let execArgv: string[] = [];
const execArgv: string[] = [];
{
for (const arg of process.execArgv) {
const match = /^--(debug|inspect)(=(\d+))?$/.exec(arg);
if (match) {
// if port is specified - use port + 1
// otherwise pick a default port depending on if 'debug' or 'inspect' and use its value + 1
let currentPort = match[3] !== undefined
const currentPort = match[3] !== undefined
? +match[3]
: match[1] === "debug" ? 5858 : 9229;
execArgv.push(`--${match[1]}=${currentPort + 1}`);
@ -200,7 +200,7 @@ namespace ts.server {
}
}
}
this.installer = childProcess.fork(combinePaths(__dirname, "typingsInstaller.js"), args, { execArgv });
this.installer.on("message", m => this.handleMessage(m));
process.on("exit", () => {