Skip to content

Commit 42b4e46

Browse files
committed
Add comments for not handling the namespace's TSImportEqualsDeclaration
1 parent 0955b08 commit 42b4e46

File tree

1 file changed

+4
-0
lines changed
  • crates/oxc_transformer/src/typescript

1 file changed

+4
-0
lines changed

crates/oxc_transformer/src/typescript/module.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ impl<'a> TypeScriptModule<'a, '_> {
200200
/// import z = y.z // reference to y (unused)
201201
/// ```
202202
/// Processing `z` first marks `y`'s reference as Type, then `y` marks `x`, then `x` marks `foo`.
203+
///
204+
/// Note: `TSImportEqualsDeclaration` can appear at the top-level and inside namespaces.
205+
/// We only need to process top-level `Program` here because `TypeScriptNamespace`
206+
/// has special handling that already covers the case for import equals inside namespaces.
203207
pub fn mark_unused_import_equals_references_as_type(
204208
&self,
205209
stmts: &[Statement<'a>],

0 commit comments

Comments
 (0)