Print number of files in the project when printing project

This commit is contained in:
Sheetal Nandi 2017-08-31 11:35:55 -07:00
parent 345f36d2ea
commit 2b97b2c04d

View File

@ -889,10 +889,11 @@ namespace ts.server {
filesToString() {
if (!this.program) {
return "";
return "\tFiles (0)\n";
}
let strBuilder = "";
for (const file of this.program.getSourceFiles()) {
const sourceFiles = this.program.getSourceFiles();
let strBuilder = `\tFiles (${sourceFiles.length})\n`;
for (const file of sourceFiles) {
strBuilder += `\t${file.fileName}\n`;
}
return strBuilder;