Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add early bail on Ambient node flag
  • Loading branch information
weswigham committed May 1, 2024
commit 331d1f32fda414ae99dd7becd4989eab16335c7a
3 changes: 3 additions & 0 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29176,6 +29176,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (!canCollectSymbolAliasAccessabilityData) {
return;
}
if (location.flags & NodeFlags.Ambient) {
return; // References within types and declaration files are never going to contribute to retaining a JS import
}
switch (hint) {
case ReferenceHint.Identifier:
return markIdentifierAliasReferenced(location as Identifier);
Expand Down