Yes, all async functions return Promises.
The value returned by the async function is wrapped in a resolved Promise,
and any error thrown inside the function is wrapped in a rejected Promise.
Write a tiny async function that fetches data but doesn't use a return statement. When you call it without await, what do you get?
If an async function throws an exception before any return, what does the caller see when they try to .then or await it?
What will the console.log show for console.log(typeof myAsync()) if myAsync is declared with the async keyword but returns nothing?
We wrapped a callback‑based API in an async function, but some callers are getting undefined instead of a Promise, causing a crash. What could cause that behavior?
During debugging you notice an async function sometimes returns a plain object, breaking a .then chain. Explain why that can happen and how to fix it.
How would you refactor a utility that conditionally returns a value or a Promise so that it always returns a Promise when used with async/await?
Our service has many async functions, and we’re seeing unhandled rejections because some of them return custom thenables. How would you audit the codebase and enforce a consistent Promise return contract?
Design a TypeScript utility or ESLint rule that guarantees any function marked async has a return type of Promise<T>. What trade‑offs would you consider?
When integrating a third‑party library that sometimes returns a thenable instead of a native Promise, how does that affect async functions and what strategy would you use to normalize the behavior?
We’re migrating a large legacy codebase that mixes callbacks, Promise chains, and async/await. At an architectural level, how would you ensure all async entry points expose a uniform Promise API and prevent future regressions?
In a multi‑team microservices environment, some services expose async functions that return custom thenables. What long‑term maintenance risks does this pose, and how would you standardize the contract across teams?
Describe a phased rollout plan to replace existing callback‑based interfaces with async functions while guaranteeing backward compatibility and consistent Promise semantics.