From c167dfa86bbdb61ee838a9a5b53709cd17f2b3ef Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 17 Nov 2025 19:38:37 +0000 Subject: [PATCH] refactor(transformer/typescript): correct comment (#15803) Follow-on after #15712. Correct a comment, based on AI review: https://github.com/oxc-project/oxc/pull/15712#discussion_r2535092266 --- crates/oxc_transformer/src/typescript/namespace.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/oxc_transformer/src/typescript/namespace.rs b/crates/oxc_transformer/src/typescript/namespace.rs index 838e8dbd84e43..1a21d62b221d0 100644 --- a/crates/oxc_transformer/src/typescript/namespace.rs +++ b/crates/oxc_transformer/src/typescript/namespace.rs @@ -206,8 +206,9 @@ impl<'a> TypeScriptNamespace<'a, '_> { self.handle_nested(decl, /* is_export */ false, &mut new_stmts, None, ctx); } Statement::TSGlobalDeclaration(_) => { - // Remove it - // TODO: Is it even possible for a`TSGlobalDeclaration` to be nested within a `TSModuleDeclaration`? + // Remove it. + // Note: It is legal to have a `TSGlobalDeclaration` nested within a `TSModuleDeclaration`, + // where identifier is a string literal: `declare module 'foo' { global {} }` } Statement::ExportNamedDeclaration(export_decl) => { // NB: `ExportNamedDeclaration` with no declaration (e.g. `export {x}`) is not