Describe the bug
Source code:
const typeNext = async () => {
await new Promise(resolve => setTimeout(resolve, 1000));
console.log('typeNext');
typeNext();
};
typeNext();
the compiled code (Target=es2015)
(function() {
var _ref = _asyncToGenerator(function* () {
yield new Promise((resolve) => setTimeout(resolve, 1e3));
console.log("typeNext");
typeNext();
});
return function typeNext() {
return _ref.apply(this, arguments);
};
})()();
Error: typeNext is not defined
Reproduction
https://stackblitz.com/edit/vitejs-vite-677ytex9?file=package.json
Steps to reproduce
Source code:
const typeNext = async () => {
await new Promise(resolve => setTimeout(resolve, 1000));
console.log('typeNext');
typeNext();
};
typeNext();
the compiled code (Target=es2015)
(function() {
var _ref = _asyncToGenerator(function* () {
yield new Promise((resolve) => setTimeout(resolve, 1e3));
console.log("typeNext");
typeNext();
});
return function typeNext() {
return _ref.apply(this, arguments);
};
})()();
Error: typeNext is not defined
System Info
Used Package Manager
pnpm
Logs
No response
Validations
Describe the bug
Source code:
the compiled code (Target=es2015)
Error: typeNext is not defined
Reproduction
https://stackblitz.com/edit/vitejs-vite-677ytex9?file=package.json
Steps to reproduce
Source code:
the compiled code (Target=es2015)
Error: typeNext is not defined
System Info
Used Package Manager
pnpm
Logs
No response
Validations