Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS transform: TSImportEqualsDeclaration in namespace is not transformed #8384

Open
overlookmotel opened this issue Jan 9, 2025 · 1 comment
Labels
A-transformer Area - Transformer / Transpiler C-bug Category - Bug

Comments

@overlookmotel
Copy link
Contributor

Input:

import Original from 'foo';

namespace foo {
  import Alias = Original;
  console.log(Alias);
}

Expected output:

import Original from 'foo';
var foo;
(function (foo) {
  var Alias = Original;
  console.log(Alias);
})(foo || (foo = {}));

TS Playground
Babel REPL

Actual output:

import Original from "foo";
let foo;
(function(_foo) {
  console.log(Alias);
})(foo || (foo = {}));

Oxc playground

@overlookmotel
Copy link
Contributor Author

Note: Neither #8355 nor #8275 has any effect on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

1 participant