Closed
Description
Given:
let x = async () => ()
Actual:
async function x(param) {}
Expected:
async function x() {}
I'd consider this a bug. While it shouldn't matter, some libraries try to be too clever and cause issues. Jest is one example I found:
● Simple_Test › async props
thrown: "Exceeded timeout of 5000 ms for a test while waiting for `done()` to be called.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
> 11 | test("async props", (async function (param) {
I don't use it, but I think Angular would be another example. They check function parameters for dependency injection.
Found the source:
Changing param
will change the output parameter name.
Metadata
Metadata
Assignees
Labels
No labels