Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: split up
maybe_hoist_and_create_proxy
(and cache variant)
The functions `maybe_hoist_and_create_proxy` and `maybe_hoist_and_create_proxy_to_cache` are currently declared to accept an optional function declaration and/or an optional arrow function expression. Most of their implementation is then forked on whether either of those is passed in. However, all call sites always pass in either a well-defined function declaration or a well-defined arrow function expression, never both and never none. Therefore it makes sense to split up those functions, and avoid declaring the params and return types with `Option`.
- Loading branch information