Clear the module resolution cache when new @types appear

This commit is contained in:
Ryan Cavanaugh
2017-12-12 16:11:37 -08:00
parent d01f4d140a
commit bd3a27ed52
+2
View File
@@ -547,9 +547,11 @@ namespace ts.server {
}
switch (response.kind) {
case ActionSet:
project.resolutionCache.clear();
this.typingsCache.updateTypingsForProject(response.projectName, response.compilerOptions, response.typeAcquisition, response.unresolvedImports, response.typings);
break;
case ActionInvalidate:
project.resolutionCache.clear();
this.typingsCache.deleteTypingsForProject(response.projectName);
break;
}