diff --git a/src/tsserver/webServer.ts b/src/tsserver/webServer.ts index 704fd3d2887b4..18d9ab4d13e97 100644 --- a/src/tsserver/webServer.ts +++ b/src/tsserver/webServer.ts @@ -1,8 +1,12 @@ /*@internal*/ - -/// - 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, @@ -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) { @@ -105,7 +109,7 @@ namespace ts.server { exit() { this.logger.info("Exiting..."); this.projectService.closeLog(); - close(); + close(0); } listen() {