mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
b0e6c2574c
Preserve inline TypeScript enums as opaque pass-through HIR nodes, matching upstream React Compiler behavior. Apply Oxc-specific raw AST reference renaming, and skip compilation when passthrough would hide nested captures or flatten block-local bindings. AI-assisted: Codex was used to implement and validate this change.
26 lines
350 B
TypeScript
26 lines
350 B
TypeScript
function Component() {
|
|
let first;
|
|
let second;
|
|
|
|
{
|
|
enum NumberValue {
|
|
Value = 1,
|
|
}
|
|
first = NumberValue;
|
|
}
|
|
|
|
{
|
|
enum NumberValue {
|
|
Value = 2,
|
|
}
|
|
second = NumberValue;
|
|
}
|
|
|
|
return <span>{first === second ? 'same' : 'different'}</span>;
|
|
}
|
|
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: Component,
|
|
params: [],
|
|
};
|