next.js
44cb7ddd - Consolidate `FnExpr` and `FnDecl` server function transforms (#72960)

Commit
1 year ago
Consolidate `FnExpr` and `FnDecl` server function transforms (#72960) By adding `visit_mut_function` we can deduplicate the code that's common between `visit_mut_fn_expr` and `visit_mut_fn_decl`. And more importantly, this prepares us for handling the transform of method props, which will also use `visit_mut_function`. As a positive side effect this brings two small improvements with it: - always highlight the whole function when `async` is missing, not only the identifier - assign a function name to an anonymous arrow function expression in a variable declaration
Author
Parents
Loading