Skip to content

Commit

Permalink
Check if files is not a *.d.ts when compilation is done. See
Browse files Browse the repository at this point in the history
  • Loading branch information
angelozerr committed Jul 27, 2017
1 parent 1f06368 commit 566e841
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
Expand Down Expand Up @@ -476,7 +475,12 @@ private void collectTsFilesToCompile(String filename, ITypeScriptServiceClient c
List<String> affectedTsFilenames = affectedProject.getFileNames();
for (String affectedFilename : affectedTsFilenames) {
if (!tsFilesToCompile.contains(affectedFilename)) {
tsFilesToCompile.add(affectedFilename);
// In some case, tsserver returns *.d.ts files (see
// https://github.com/angelozerr/typescript.java/issues/190#issuecomment-317876026)
// those *.d.ts files must be ignored for compilation.
if (!TypeScriptResourceUtil.isDefinitionTsFile(affectedFilename)) {
tsFilesToCompile.add(affectedFilename);
}
}
}
}
Expand Down

0 comments on commit 566e841

Please sign in to comment.