Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/ts-enum-inline-member-mutation.tsx
Boshen b0e6c2574c fix(react-compiler): match upstream inline enum handling (#25672)
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.
2026-08-15 03:45:50 +00:00

17 lines
326 B
TypeScript

function Child(props: {items: Array<number>}) {
return <span>{props.items.length}</span>;
}
function Component(props: {items: Array<number>}) {
enum Result {
Length = props.items.push(1),
}
return <Child items={props.items} />;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{items: []}],
};