Update source and declaration projects on update to declaration file or map file

TODO: add tests
This commit is contained in:
Sheetal Nandi
2018-11-30 16:29:21 -08:00
parent 56a39b754c
commit 751cb9e2c3
3 changed files with 86 additions and 23 deletions

View File

@@ -65,10 +65,11 @@ namespace ts.server {
}
private resetSourceMapInfo() {
this.info.mapper = undefined;
this.info.sourceFileLike = undefined;
this.info.mapInfo = undefined;
this.info.sourceMapFilePath = undefined;
this.info.declarationInfoPath = undefined;
this.info.sourceInfos = undefined;
this.info.mapper = undefined;
}
/** Public for testing */
@@ -305,13 +306,18 @@ namespace ts.server {
mTime?: number;
/*@internal*/
mapInfo?: ScriptInfo;
sourceFileLike?: SourceFileLike;
/*@internal*/
sourceMapFilePath?: Path | false;
// Present on sourceMapFile info
/*@internal*/
declarationInfoPath?: Path;
/*@internal*/
sourceInfos?: Map<true>;
/*@internal*/
mapper?: DocumentPositionMapper | false;
/*@internal*/
sourceFileLike: SourceFileLike | undefined;
constructor(
private readonly host: ServerHost,