Skip to content

Commit 199e533

Browse files
committed
- Command line should use spaces between types instead of comma
- if entry.typings is empty use entry.typings for default typings to install
1 parent 456227b commit 199e533

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/server/typingsCache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace ts.server {
8282
}
8383

8484
const entry = this.perProjectCache[project.getProjectName()];
85-
const result: TypingsArray = entry ? entry.typings : <any>emptyArray;
85+
const result: TypingsArray = entry && entry.typings.length > 0 ? entry.typings : toTypingsArray(typingOptions.include);
8686
if (!entry || typingOptionsChanged(typingOptions, entry.typingOptions) || compilerOptionsChanged(project.getCompilerOptions(), entry.compilerOptions)) {
8787
// Note: entry is now poisoned since it does not really contain typings for a given combination of compiler options\typings options.
8888
// instead it acts as a placeholder to prevent issuing multiple requests

src/server/typingsInstaller/nodeTypingsInstaller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ namespace ts.server.typingsInstaller {
114114
protected runInstall(cachePath: string, typingsToInstall: string[], postInstallAction: (installedTypings: string[]) => void): void {
115115
const id = this.installRunCount;
116116
this.installRunCount++;
117-
const command = `npm install ${typingsToInstall.map(t => "@types/" + t)} --save-dev`;
117+
const command = `npm install ${typingsToInstall.map(t => "@types/" + t).join(" ")} --save-dev`;
118118
if (this.log.isEnabled()) {
119119
this.log.writeLine(`Running npm install @types ${id}, command '${command}'. cache path '${cachePath}'`);
120120
}

0 commit comments

Comments
 (0)