Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2528,6 +2528,7 @@ function lowerExpression(
loc: expr.node.loc ?? GeneratedSource,
};
}
case 'TSInstantiationExpression':
case 'TSNonNullExpression': {
let expr = exprPath as NodePath<t.TSNonNullExpression>;
return lowerExpression(builder, expr.get('expression'));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

## Input

```javascript
import {identity, invoke} from 'shared-runtime';

function Test() {
const str = invoke(identity<string>, 'test');
return str;
}

export const FIXTURE_ENTRYPOINT = {
fn: Test,
params: [],
};

```

## Code

```javascript
import { c as _c } from "react/compiler-runtime";
import { identity, invoke } from "shared-runtime";

function Test() {
const $ = _c(1);
let t0;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t0 = invoke(identity, "test");
$[0] = t0;
} else {
t0 = $[0];
}
const str = t0;
return str;
}

export const FIXTURE_ENTRYPOINT = {
fn: Test,
params: [],
};

```

### Eval output
(kind: ok) "test"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {identity, invoke} from 'shared-runtime';

function Test() {
const str = invoke(identity<string>, 'test');
return str;
}

export const FIXTURE_ENTRYPOINT = {
fn: Test,
params: [],
};
Loading