Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/nonoptional-load-from-optional-memberexpr.js
T
2026-08-27 21:09:14 +00:00

15 lines
345 B
JavaScript

// Note that `a?.b.c` is semantically different from `(a?.b).c`
// Here, 'props?.a` is an optional chain, and `.b` is an unconditional load
// (nullthrows if a is nullish)
function Component(props) {
let x = (props?.a).b;
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ['TodoAdd'],
isComponent: 'TodoAdd',
};