Skip to content

Commit

Permalink
typechecking inputs/outputs in action transform tests (#75935)
Browse files Browse the repository at this point in the history
This PR attempts to add typechecking to the server actions tests
fixtures in order to add an extra layer of validation against compiler
bugs. (there's a couple!). Unfortunately the tests were pretty
loosey-goosey around undefined variables, so there's a lot of noise in
adding missing imports for `Button` etc. i tried to call out the
interesting changes via PR comments.

Note that this is a bit limited, because we often have to rely on
typescript inferring some sensible types for the outputs -- see e.g. the
issue with `24/output.js` mentioned below. In case typescript can't
infer sensible types for something, we can just exclude that file from
checking. this seems to be pretty rare, so i think it's okay.

We should also definitely add typechecking to the other fixture folders,
but this PR is already big, so i want to do that piecemeal.

### TODO
- [x] invoke the typechecker in CI
- added a `check-compiler-fixtures` script that runs as part of
`types-and-precompiled` (open to feedback, maybe this isn't the right
place?)
- [x] figure out how to make `tsc` error on
`crates/next-custom-transforms/tests/fixture/server-actions/server-graph/51/output.js`,
where we're referencing a non-existent variable `$$RSC_SERVER_ACTION_0`.
right now, it emits no errors
- this is a compiler bug, and i want to catch bugs like this in the
future
  - solution: #75944
- [x] figure out why `tsc` is complaining about a type mismatch in
`crates/next-custom-transforms/tests/fixture/server-actions/server-graph/24/output.js`
- we can work around this by loosening the types for
`registerServerReference`, but i'd rather we didn't have to do that
- this seems to be a bizarre TS behavior where `fn.bind(...)` makes all
the params optional in JS files. ignoring this for now
  • Loading branch information
lubieowoce authored Feb 24, 2025
1 parent 871ca31 commit 669c52e
Show file tree
Hide file tree
Showing 56 changed files with 292 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use server'

export const { sampleFunction } = someObject
export const { sampleFunction2 } = fn()
export let { 0: sampleFunction3, 1: sampleFunction4 } = [g(), g()]
import ANYTHING from 'anything'

export const { sampleFunction } = ANYTHING
export const { sampleFunction2 } = ANYTHING()
export let { 0: sampleFunction3, 1: sampleFunction4 } = [ANYTHING(), ANYTHING()]
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export async function action0(b, c, ...g) {
return async function action1(d) {
'use server'
let f
// @ts-expect-error: window is not iterable
console.log(...window, { window })
console.log(a, b, action2)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="./next" />
/// <reference types="./modules" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
declare module 'database' {
export const db: {
serialize<T>(cb: () => T): T
run(
statement: string,
args: Record<string, any>,
onComplete: (this: { lastID: string }, error?: Error) => void
): void
}
}

declare module 'db' {
export default function deleteFromDb(arg: any, ...args: any[]): Promise<void>
}

declare module 'auth' {
export function validator<TFn extends (...args: any[]) => any>(fn: TFn): TFn
export function another<TFn extends (...args: any[]) => any>(fn: TFn): TFn
}

declare module 'anything' {
const ANYTHING: any
export default ANYTHING
}

declare module 'foo' {
const f: any
export default f
export const f1: any
export const f2: any
}

declare module 'components' {
import React from 'react'

export function Button(
props: {
action: () => Promise<any>
} & React.ComponentProps<'button'>
): React.ReactNode

export function Form(
props: React.PropsWithChildren<{ action: () => Promise<any> }>
): React.ReactNode

export function Client(props: Record<string, any>): React.ReactNode
}

declare module 'navigation' {
export function redirect(href: string): void
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
declare module 'private-next-rsc-action-encryption' {
export function encryptActionBoundArgs(
actionId: string,
...args: any[]
): Promise<string>

export function decryptActionBoundArgs(
actionId: string,
encryptedPromise: Promise<string>
): Promise<any[]>
}

declare module 'private-next-rsc-server-reference' {
export function registerServerReference<T extends (...args: any[]) => any>(
reference: T,
id: string,
exportName: string | null
): T
}

declare module 'private-next-rsc-action-client-wrapper' {
export function callServer(
actionId: string,
actionArgs: unknown[]
): Promise<unknown>

export function findSourceMapURL(filename: string): string | null

const createServerReference: (
id: string,
callServer: any,
encodeFormAction?: any,
findSourceMapURL?: any,
functionName?: string
) => (...args: unknown[]) => Promise<unknown>
}

declare module 'private-next-rsc-action-validate' {
function ensureServerEntryExports(actions: unknown[]): void
}

declare module 'private-next-rsc-cache-wrapper' {
export function cache<TFn extends (...args: any[]) => Promise<any>>(
kind: string,
id: string,
boundArgsLength: number,
fn: TFn
): TFn
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Button } from 'components'
import deleteFromDb from 'db'

export function Item({ id1, id2 }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"406a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","4090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import { Button } from 'components';
import deleteFromDb from 'db';
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Button } from 'components'
import deleteFromDb from 'db'

const v1 = 'v1'
Expand All @@ -13,7 +14,7 @@ export function Item({ id1, id2 }) {
return <Button action={deleteItem}>Delete</Button>
}

const f = (x) => {
let f = (x) => {
async function g(y, ...z) {
'use server'
return x + y + z[0]
Expand All @@ -23,6 +24,14 @@ const f = (x) => {
const g = (x) => {
f = async (y, ...z) => {
'use server'
return x + y + z[0]
return (
x +
y +
// can't be a `ts-expect-error` because the type of `z` changes to `any` in the output
// and it stops being an error
//
// @ts-ignore: incompatible argument types
z[0]
)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"406a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","7f1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91":"$$RSC_SERVER_ACTION_2","7f90b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import { Button } from 'components';
import deleteFromDb from 'db';
const v1 = 'v1';
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
Expand All @@ -17,12 +18,16 @@ export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = a
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("7f90b5db271335765a4b0eab01f044b381b5ebd5cd", $$ACTION_CLOSURE_BOUND);
return $$ACTION_ARG_0 + y + z[0];
};
const f = (x)=>{
let f = (x)=>{
var g = registerServerReference($$RSC_SERVER_ACTION_1, "7f90b5db271335765a4b0eab01f044b381b5ebd5cd", null).bind(null, encryptActionBoundArgs("7f90b5db271335765a4b0eab01f044b381b5ebd5cd", x));
};
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_2 = async function f($$ACTION_CLOSURE_BOUND, y, ...z) {
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("7f1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$ACTION_CLOSURE_BOUND);
return $$ACTION_ARG_0 + y + z[0];
return $$ACTION_ARG_0 + y + // can't be a `ts-expect-error` because the type of `z` changes to `any` in the output
// and it stops being an error
//
// @ts-ignore: incompatible argument types
z[0];
};
const g = (x)=>{
f = registerServerReference($$RSC_SERVER_ACTION_2, "7f1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", null).bind(null, encryptActionBoundArgs("7f1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", x));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Button } from 'components'
import deleteFromDb from 'db'

const v1 = 'v1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"406a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","4090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import { Button } from 'components';
import deleteFromDb from 'db';
const v1 = 'v1';
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Button } from 'components'

export function Item({ value }) {
return (
<>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"606a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import { Button } from 'components';
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND, value2) {
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
return $$ACTION_ARG_0 * value2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { validator } from 'auth'
import { Button } from 'components'

async function myAction(a, b, c) {
'use server'
console.log('a')
Expand All @@ -8,6 +11,6 @@ export default function Page() {
}

// TODO: should use `action` as function name?
export const action = withValidate(async () => {
export const action = validator(async () => {
'use server'
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ /* __next_internal_action_entry_do_not_use__ {"0090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1","706a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
/* __next_internal_action_entry_do_not_use__ {"0090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1","706a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
export const $$RSC_SERVER_ACTION_0 = async function myAction(a, b, c) {
import { validator } from 'auth';
import { Button } from 'components';
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function myAction(a, b, c) {
console.log('a');
};
var myAction = registerServerReference($$RSC_SERVER_ACTION_0, "706a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
Expand All @@ -9,4 +11,4 @@ export default function Page() {
}
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function() {};
// TODO: should use `action` as function name?
export const action = withValidate(registerServerReference($$RSC_SERVER_ACTION_1, "0090b5db271335765a4b0eab01f044b381b5ebd5cd", null));
export const action = validator(registerServerReference($$RSC_SERVER_ACTION_1, "0090b5db271335765a4b0eab01f044b381b5ebd5cd", null));
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use server'

/** @type {[any]} */
const [foo] = [null]
export default foo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"7fc18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
const [foo] = [
/** @type {[any]} */ const [foo] = [
null
];
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { validator, another } from 'auth'
import { Button } from 'components'

const x = 1

export default function Page() {
const y = 1
return (
<Foo
<Button
// TODO: should use `action` as function name?
action={validator(async function (z) {
'use server'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/* __next_internal_action_entry_do_not_use__ {"001c36b06e398c97abe5d5d7ae8c672bfddf4e1b91":"$$RSC_SERVER_ACTION_2","0090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1","606a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import { validator, another } from 'auth';
import { Button } from 'components';
const x = 1;
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function($$ACTION_CLOSURE_BOUND, z) {
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
return x + $$ACTION_ARG_0 + z;
};
export default function Page() {
const y = 1;
return <Foo // TODO: should use `action` as function name?
return <Button // TODO: should use `action` as function name?
action={validator(registerServerReference($$RSC_SERVER_ACTION_0, "606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", y)))}/>;
}
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function() {};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Button } from 'components'
import deleteFromDb from 'db'

export function Item({ id1, id2 }) {
Expand Down Expand Up @@ -26,6 +27,8 @@ export function Item2({ id1, id2 }) {

return temp

// FIXME: invalid transformation of hoisted functions (https://github.com/vercel/next.js/issues/57392)
// (remove output.js from `tsconfig.json#exclude` to see the error)
async function deleteItem() {
'use server'
await deleteFromDb(id1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"406a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","4090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import { Button } from 'components';
import deleteFromDb from 'db';
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
Expand All @@ -14,7 +15,9 @@ export function Item({ id1, id2 }) {
})();
var deleteItem = registerServerReference($$RSC_SERVER_ACTION_0, "406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", id1, id2));
}
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
export const // FIXME: invalid transformation of hoisted functions (https://github.com/vercel/next.js/issues/57392)
// (remove output.js from `tsconfig.json#exclude` to see the error)
/*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("4090b5db271335765a4b0eab01f044b381b5ebd5cd", $$ACTION_CLOSURE_BOUND);
await deleteFromDb($$ACTION_ARG_0);
await deleteFromDb($$ACTION_ARG_1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ function Comp(b, c, ...g) {
return async function action1(d) {
'use server'
let f
// @ts-expect-error: window is not iterable
console.log(...window, { window })
console.log(a, b, action2)

// FIXME: invalid transformation of hoisted functions (https://github.com/vercel/next.js/issues/57392)
// (remove output.js from `tsconfig.json#exclude` to see the error)
async function action2(e) {
'use server'
console.log(a, c, d, e, f, g)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* __next_internal_action_entry_do_not_use__ {"601c36b06e398c97abe5d5d7ae8c672bfddf4e1b91":"$$RSC_SERVER_ACTION_2","606a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","6090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
let a, f;
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action2($$ACTION_CLOSURE_BOUND, e) {
export const // FIXME: invalid transformation of hoisted functions (https://github.com/vercel/next.js/issues/57392)
// (remove output.js from `tsconfig.json#exclude` to see the error)
/*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action2($$ACTION_CLOSURE_BOUND, e) {
var [$$ACTION_ARG_0, $$ACTION_ARG_1, $$ACTION_ARG_2, $$ACTION_ARG_3] = await decryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
console.log(a, $$ACTION_ARG_0, $$ACTION_ARG_1, e, $$ACTION_ARG_2, $$ACTION_ARG_3);
};
Expand All @@ -13,6 +15,7 @@ export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = a
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_2 = async function action1($$ACTION_CLOSURE_BOUND, d) {
var [$$ACTION_ARG_0, $$ACTION_ARG_1, $$ACTION_ARG_2] = await decryptActionBoundArgs("601c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$ACTION_CLOSURE_BOUND);
let f;
// @ts-expect-error: window is not iterable
console.log(...window, {
window
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ export async function action0(b, c, ...g) {
return async function action1(d) {
'use server'
let f
// @ts-expect-error: window is not iterable
console.log(...window, { window })
console.log(a, b, action2)

// FIXME: invalid transformation of hoisted functions (https://github.com/vercel/next.js/issues/57392)
// (remove output.js from `tsconfig.json#exclude` to see the error)
async function action2(e) {
'use server'
console.log(a, c, d, e, f, g)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* __next_internal_action_entry_do_not_use__ {"601c36b06e398c97abe5d5d7ae8c672bfddf4e1b91":"$$RSC_SERVER_ACTION_2","606a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","6090b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1","7f0090eaf4e1f08a2d94f6be401e54a2ded399b87c":"action0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
let a, f;
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action2($$ACTION_CLOSURE_BOUND, e) {
export const // FIXME: invalid transformation of hoisted functions (https://github.com/vercel/next.js/issues/57392)
// (remove output.js from `tsconfig.json#exclude` to see the error)
/*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action2($$ACTION_CLOSURE_BOUND, e) {
var [$$ACTION_ARG_0, $$ACTION_ARG_1, $$ACTION_ARG_2, $$ACTION_ARG_3] = await decryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
console.log(a, $$ACTION_ARG_0, $$ACTION_ARG_1, e, $$ACTION_ARG_2, $$ACTION_ARG_3);
};
Expand All @@ -13,6 +15,7 @@ export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = a
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_2 = async function action1($$ACTION_CLOSURE_BOUND, d) {
var [$$ACTION_ARG_0, $$ACTION_ARG_1, $$ACTION_ARG_2] = await decryptActionBoundArgs("601c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$ACTION_CLOSURE_BOUND);
let f;
// @ts-expect-error: window is not iterable
console.log(...window, {
window
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ async function Component({ foo }) {
}

const data = await fn()
// @ts-expect-error: data is not a valid react child
return <div>{data}</div>
}
Loading

0 comments on commit 669c52e

Please sign in to comment.