Skip to content

Commit

Permalink
Undo webworker change
Browse files Browse the repository at this point in the history
This change causes problems for project loading (even though it really shouldn't); revert it for now.
  • Loading branch information
jakebailey committed May 25, 2022
1 parent 92894d3 commit 8868894
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/tsserver/webServer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/*@internal*/

/// <reference lib="webworker" />

namespace ts.server {
declare const addEventListener: any;
declare const postMessage: any;
declare const close: any;
declare const location: any;
declare const XMLHttpRequest: any;
declare const self: any;

const nullLogger: Logger = {
close: noop,
hasLevel: returnFalse,
Expand Down Expand Up @@ -82,7 +86,7 @@ namespace ts.server {
}

function hrtime(previous?: [number, number]) {
const now = self.performance.now() * 1e-3;
const now = self.performance.now(performance) * 1e-3;
let seconds = Math.floor(now);
let nanoseconds = Math.floor((now % 1) * 1e9);
if (previous) {
Expand All @@ -105,7 +109,7 @@ namespace ts.server {
exit() {
this.logger.info("Exiting...");
this.projectService.closeLog();
close();
close(0);
}

listen() {
Expand Down

0 comments on commit 8868894

Please sign in to comment.