Files
Hendrik LiebauandGitHub 958b9669fb Add test fixtures demonstrating export statement validation bugs (#75277)
The issues with the current export statement validation for app router
pages are documented in the added fixtures, see also the inline comments
in the diff.
2025-01-24 17:24:02 +01:00

31 lines
565 B
JavaScript

// Rules here:
// 1. Each exported function should still be exported, but as a reference `registerServerReference(...)`.
// 2. Actual action functions should be renamed to `$$ACTION_...` and got exported.
async function foo() {
'use server'
console.log(1)
}
export { foo }
export async function bar() {
'use server'
console.log(2)
}
export default async function baz() {
'use server'
console.log(3)
}
export const qux = async () => {
'use server'
console.log(4)
}
export const quux = async function quuux() {
'use server'
console.log(5)
}