Skip to content

Commit 0dd9c1a

Browse files
committed
Typing installerr location checks
1 parent a396450 commit 0dd9c1a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/server/project.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,13 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
15301530

15311531
/** @internal */
15321532
watchTypingLocations(files: readonly string[] | undefined): void {
1533+
// Skip watching typing locations for inferred project whose currentDirectory is not watchable or
1534+
// is same as server's current directory
1535+
if (this.currentDirectory === this.projectService.currentDirectory ||
1536+
!canWatchDirectoryOrFilePath(this.toPath(this.currentDirectory))) {
1537+
return;
1538+
}
1539+
15331540
if (!files) {
15341541
this.typingWatchers!.isInvoked = false;
15351542
return;

0 commit comments

Comments
 (0)