From ee2d436999bb3fa10d27bc0f30656e2b249f4af4 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 20 Nov 2017 14:43:25 -0800 Subject: [PATCH] Always send a response to installTypings even if all types are cached --- src/harness/unittests/typingsInstaller.ts | 2 +- src/server/typingsInstaller/typingsInstaller.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/harness/unittests/typingsInstaller.ts b/src/harness/unittests/typingsInstaller.ts index 393d55a5ea..d0038902ae 100644 --- a/src/harness/unittests/typingsInstaller.ts +++ b/src/harness/unittests/typingsInstaller.ts @@ -1018,7 +1018,7 @@ namespace ts.projectSystem { } }; session.executeCommand(changeRequest); - host.checkTimeoutQueueLengthAndRun(0); // This enqueues the updategraph and refresh inferred projects + host.checkTimeoutQueueLengthAndRun(2); // This enqueues the updategraph and refresh inferred projects const version2 = proj.getCachedUnresolvedImportsPerFile_TestOnly().getVersion(); assert.equal(version1, version2, "set of unresolved imports should not change"); }); diff --git a/src/server/typingsInstaller/typingsInstaller.ts b/src/server/typingsInstaller/typingsInstaller.ts index 63bbc21978..3e8f79d0f1 100644 --- a/src/server/typingsInstaller/typingsInstaller.ts +++ b/src/server/typingsInstaller/typingsInstaller.ts @@ -257,8 +257,9 @@ namespace ts.server.typingsInstaller { const filteredTypings = this.filterTypings(typingsToInstall); if (filteredTypings.length === 0) { if (this.log.isEnabled()) { - this.log.writeLine(`All typings are known to be missing or invalid - no need to go any further`); + this.log.writeLine(`All typings are known to be missing or invalid - no need to install more typings`); } + this.sendResponse(this.createSetTypings(req, currentlyCachedTypings)); return; }