mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
To handle d.ts emit errors that could affect other files, in incremental mode use d.ts emit text + diagnostics as signature of the file (#49543)
* Add test when declaration emit has errors and d.ts emit doesnt change which results in incorrect incremental behaviour * Refactor * Use declaration diagnostics in the d.ts signature for the file so it can be more accurate for detecting changes to file that could affect other files Fixes #49527 * Renames and clarifications * Simplify serialize declaration diagnostics for signature purpose Do not serialize file name if error is in same file we are emitting. this should avoid having to do file path computation in most cases. Locations are start and length instead of line and character. Do not use any indents * Fix baselines
This commit is contained in:
1 parent
8ed846c73b
commit
df21926976
11 files changed
+862
-118
No files matched your search
@@ -709,7 +709,8 @@ namespace ts.server {
|
||||
this.program!,
|
||||
scriptInfo.path,
|
||||
this.cancellationToken,
|
||||
maybeBind(this.projectService.host, this.projectService.host.createHash)
|
||||
maybeBind(this.projectService.host, this.projectService.host.createHash),
|
||||
this.getCanonicalFileName,
|
||||
),
|
||||
sourceFile => this.shouldEmitFile(this.projectService.getScriptInfoForPath(sourceFile.path)) ? sourceFile.fileName : undefined
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user