TypeScript Version: 2.1.4 / nightly (2.2.0-dev.20161227)
Code
tsconfig.json
{
"compileOnSave": true
}
hello.ts
console.log("hello")
console.log("world")
commands.txt
{"command":"open","arguments":{"file":"/Users/gunca/Code/typescript-emit-line-endings/hello.ts"}}
{"command":"compileOnSaveEmitFile","arguments":{"file":"/Users/gunca/Code/typescript-emit-line-endings/hello.ts"}}
$ tsc
$ file hello.js
hello.js: ASCII text
$ cat commands.txt | tsserver
Content-Length: 224
{"seq":0,"type":"event","event":"configFileDiag","body":{"triggerFile":"/Users/gunca/Code/typescript-emit-line-endings/hello.ts","configFile":"/Users/gunca/Code/typescript-emit-line-endings/tsconfig.json","diagnostics":[]}}
Content-Length: 105
{"seq":0,"type":"response","command":"compileOnSaveEmitFile","request_seq":0,"success":true,"body":true}
$ file hello.js
hello.js: ASCII text, with CRLF line terminators
Expected behavior:
Expected tsserver to match host's line endings style.
Actual behavior:
Files are always emitted with CRLF endings.
TypeScript Version: 2.1.4 / nightly (2.2.0-dev.20161227)
Code
tsconfig.json
{ "compileOnSave": true }hello.ts
commands.txt
{"command":"open","arguments":{"file":"/Users/gunca/Code/typescript-emit-line-endings/hello.ts"}} {"command":"compileOnSaveEmitFile","arguments":{"file":"/Users/gunca/Code/typescript-emit-line-endings/hello.ts"}}Expected behavior:
Expected tsserver to match host's line endings style.
Actual behavior:
Files are always emitted with CRLF endings.