Skip to content

Commit

Permalink
Port changes from #22172, provide a callback to fs.close
Browse files Browse the repository at this point in the history
  • Loading branch information
mhegazy committed Mar 8, 2018
1 parent 55bffba commit cd2b2ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace ts.server {

const fs: {
openSync(path: string, options: string): number;
close(fd: number): void;
close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number;
writeSync(fd: number, data: any, position?: number, enconding?: string): number;
statSync(path: string): Stats;
Expand Down Expand Up @@ -167,7 +167,7 @@ namespace ts.server {

close() {
if (this.fd >= 0) {
fs.close(this.fd);
fs.close(this.fd, noop);
}
}

Expand Down

0 comments on commit cd2b2ba

Please sign in to comment.