Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/object-literal-method-call-in-ternary-test.expect.md
2026-08-27 21:09:14 +00:00

58 lines
878 B
Markdown

## Input
```javascript
import {
createHookWrapper,
identity,
CONST_STRING0,
CONST_STRING1,
} from 'shared-runtime';
function useHook({value}) {
return {
getValue() {
return identity(value);
},
}.getValue()
? CONST_STRING0
: CONST_STRING1;
}
export const FIXTURE_ENTRYPOINT = {
fn: createHookWrapper(useHook),
params: [{value: 0}],
};
```
## Code
```javascript
import {
createHookWrapper,
identity,
CONST_STRING0,
CONST_STRING1,
} from "shared-runtime";
function useHook(t0) {
const { value } = t0;
return {
getValue() {
return identity(value);
},
}.getValue()
? CONST_STRING0
: CONST_STRING1;
}
export const FIXTURE_ENTRYPOINT = {
fn: createHookWrapper(useHook),
params: [{ value: 0 }],
};
```
### Eval output
(kind: ok) <div>{"result":"global string 1","shouldInvokeFns":true}</div>