Files
vectorcraft/docs
dotCooCoo 66c71eeb8d JavaScript: modules export async function declarations
`export async function f() {}` stopped with "expected a declaration after
'export'", because the module parser checked only for `var`, `function`
and lexical declarations. `export default async function` read the
function as an expression bound to the default binding, so a named one
did not bind its name in the module and was not hoisted.

Both forms now parse as async function declarations, as ECMA-262 2017
section 15.2.3 (ExportDeclaration with HoistableDeclaration) gives.
Async generators stay syntax errors here, as in a plain declaration.

The export forms were missed when #9131 added async functions.
2026-12-02 14:24:43 -08:00
..