mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Dont filter type aquisition when its not enabled (#59351)
This commit is contained in:
parent
121c5dd36b
commit
f8a7913c1e
@ -1077,7 +1077,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
}
|
||||
|
||||
protected removeLocalTypingsFromTypeAcquisition(newTypeAcquisition: TypeAcquisition): TypeAcquisition {
|
||||
if (!newTypeAcquisition || !newTypeAcquisition.include) {
|
||||
if (!newTypeAcquisition.enable || !newTypeAcquisition.include) {
|
||||
// Nothing to filter out, so just return as-is
|
||||
return newTypeAcquisition;
|
||||
}
|
||||
@ -1627,8 +1627,9 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
}
|
||||
|
||||
protected removeExistingTypings(include: string[]): string[] {
|
||||
if (!include.length) return include;
|
||||
const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost);
|
||||
return include.filter(i => !existing.includes(i));
|
||||
return filter(include, i => !existing.includes(i));
|
||||
}
|
||||
|
||||
private updateGraphWorker() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user