Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/constant-propagation-unary.js
T

36 lines
490 B
JavaScript
Raw Normal View History

2026-08-27 21:09:14 +00:00
import {Stringify} from 'shared-runtime';
function foo() {
let _b;
const b = true;
if (!b) {
_b = 'bar';
} else {
_b = 'baz';
}
return (
<Stringify
value={{
_b,
b0: !true,
n0: !0,
n1: !1,
n2: !2,
n3: !-1,
s0: !'',
s1: !'a',
s2: !'ab',
u: !undefined,
n: !null,
}}
/>
);
}
export const FIXTURE_ENTRYPOINT = {
fn: foo,
params: [],
isComponent: false,
};