mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
16 lines
No EOL
334 B
TypeScript
16 lines
No EOL
334 B
TypeScript
// Correct
|
|
async function asyncFunctionGood(): Promise<number> {}
|
|
const asyncFunctionGoo2 = async (): Promise<number> => {
|
|
return Promise.resolve(0);
|
|
}
|
|
|
|
|
|
// Need to explicit return type for async functions
|
|
// Incorrect
|
|
async function asyncFunction() {
|
|
return 42;
|
|
}
|
|
|
|
const asyncFunction2 = async () => {
|
|
return "Hello, World!";
|
|
} |