Skip to content

Commit a14dec8

Browse files
committed
refactor(transformer/typescript): correct comment
1 parent cbb27fd commit a14dec8

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
@@ -207,8 +207,9 @@ impl<'a> TypeScriptNamespace<'a, '_> {
207207
self.handle_nested(decl, /* is_export */ false, &mut new_stmts, None, ctx);
208208
}
209209
Statement::TSGlobalDeclaration(_) => {
210-
// Remove it
211-
// TODO: Is it even possible for a`TSGlobalDeclaration` to be nested within a `TSModuleDeclaration`?
210+
// Remove it.
211+
// Note: It is legal to have a `TSGlobalDeclaration` nested within a `TSModuleDeclaration`,
212+
// where identifier is a string literal: `declare module 'foo' { global {} }`
212213
}
213214
Statement::ExportNamedDeclaration(export_decl) => {
214215
// NB: `ExportNamedDeclaration` with no declaration (e.g. `export {x}`) is not

0 commit comments

Comments
 (0)