Skip to content

Commit c167dfa

Browse files
committed
refactor(transformer/typescript): correct comment (#15803)
Follow-on after #15712. Correct a comment, based on AI review: #15712 (comment)
1 parent fba31fa commit c167dfa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/oxc_transformer/src/typescript/namespace.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ impl<'a> TypeScriptNamespace<'a, '_> {
206206
self.handle_nested(decl, /* is_export */ false, &mut new_stmts, None, ctx);
207207
}
208208
Statement::TSGlobalDeclaration(_) => {
209-
// Remove it
210-
// TODO: Is it even possible for a`TSGlobalDeclaration` to be nested within a `TSModuleDeclaration`?
209+
// Remove it.
210+
// Note: It is legal to have a `TSGlobalDeclaration` nested within a `TSModuleDeclaration`,
211+
// where identifier is a string literal: `declare module 'foo' { global {} }`
211212
}
212213
Statement::ExportNamedDeclaration(export_decl) => {
213214
// NB: `ExportNamedDeclaration` with no declaration (e.g. `export {x}`) is not

0 commit comments

Comments
 (0)