mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Use get files affected by internally and hence use file paths as input
This commit is contained in:
@@ -448,18 +448,23 @@ namespace ts.server {
|
||||
computeHash: data =>
|
||||
this.projectService.host.createHash(data),
|
||||
shouldEmitFile: sourceFile =>
|
||||
!this.projectService.getScriptInfoForPath(sourceFile.path).isDynamicOrHasMixedContent()
|
||||
!this.shouldEmitFile(sourceFile)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private shouldEmitFile(sourceFile: SourceFile) {
|
||||
return !this.projectService.getScriptInfoForPath(sourceFile.path).isDynamicOrHasMixedContent();
|
||||
}
|
||||
|
||||
getCompileOnSaveAffectedFileList(scriptInfo: ScriptInfo): string[] {
|
||||
if (!this.languageServiceEnabled) {
|
||||
return [];
|
||||
}
|
||||
this.updateGraph();
|
||||
this.ensureBuilder();
|
||||
return this.builder.getFilesAffectedBy(this.program, scriptInfo.path);
|
||||
return mapDefined(this.builder.getFilesAffectedBy(this.program, scriptInfo.path),
|
||||
sourceFile => this.shouldEmitFile(sourceFile) ? sourceFile.fileName : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user