mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
Actually verify when dependency and main project is open
This commit is contained in:
@@ -2604,7 +2604,7 @@ namespace ts.server {
|
||||
|
||||
/** @internal */
|
||||
fileExists(fileName: NormalizedPath): boolean {
|
||||
return this.filenameToScriptInfo.has(fileName) || this.host.fileExists(fileName);
|
||||
return !!this.getScriptInfoForNormalizedPath(fileName) || this.host.fileExists(fileName);
|
||||
}
|
||||
|
||||
private findExternalProjectContainingOpenScriptInfo(info: ScriptInfo): ExternalProject | undefined {
|
||||
|
||||
@@ -759,7 +759,10 @@ namespace ts.server {
|
||||
}
|
||||
|
||||
containsScriptInfo(info: ScriptInfo): boolean {
|
||||
return this.isRoot(info) || (!!this.program && this.program.getSourceFileByPath(info.path) !== undefined);
|
||||
if (this.isRoot(info)) return true;
|
||||
if (!this.program) return false;
|
||||
const file = this.program.getSourceFileByPath(info.path);
|
||||
return !!file && file.resolvedPath === info.path;
|
||||
}
|
||||
|
||||
containsFile(filename: NormalizedPath, requireOpen?: boolean): boolean {
|
||||
|
||||
Reference in New Issue
Block a user