Skip to content

Commit f8a7913

Browse files
authored
Dont filter type aquisition when its not enabled (#59351)
1 parent 121c5dd commit f8a7913

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/server/project.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
10771077
}
10781078

10791079
protected removeLocalTypingsFromTypeAcquisition(newTypeAcquisition: TypeAcquisition): TypeAcquisition {
1080-
if (!newTypeAcquisition || !newTypeAcquisition.include) {
1080+
if (!newTypeAcquisition.enable || !newTypeAcquisition.include) {
10811081
// Nothing to filter out, so just return as-is
10821082
return newTypeAcquisition;
10831083
}
@@ -1627,8 +1627,9 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
16271627
}
16281628

16291629
protected removeExistingTypings(include: string[]): string[] {
1630+
if (!include.length) return include;
16301631
const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost);
1631-
return include.filter(i => !existing.includes(i));
1632+
return filter(include, i => !existing.includes(i));
16321633
}
16331634

16341635
private updateGraphWorker() {

0 commit comments

Comments
 (0)