feat: typescript 3.6 support (#32946)

BREAKING CHANGE: typescript 3.4 and 3.5 are no longer supported, please update to typescript 3.6

Fixes #32380

PR Close #32946
This commit is contained in:
Igor Minar
2019-10-01 16:44:50 -07:00
committed by Matias Niemelä
parent 117ca7cf39
commit 86e1e6c082
89 changed files with 15550 additions and 5333 deletions

View File

@ -13,7 +13,7 @@ export class Client {
constructor(private readonly server: ChildProcess) {}
listen() {
this.server.stdout.on('data', (data: Buffer) => {
this.server.stdout!.on('data', (data: Buffer) => {
this.data = this.data ? Buffer.concat([this.data, data]) : data;
// tsserver could batch multiple responses together so we have to go
// through the entire buffer to keep looking for messages.
@ -62,7 +62,7 @@ export class Client {
command,
arguments: params
};
this.server.stdin.write(JSON.stringify(request) + '\r\n');
this.server.stdin!.write(JSON.stringify(request) + '\r\n');
return new Promise((resolve, reject) => {
this.responseEmitter.once(`${seq}`, resolve);
this.responseEmitter.once('error', reject);