Closed
Description
async function delay(millis: number): PromiseLike<void> {
return Promise.resolve(undefined);
}
The code above is not valid and is rejected by the compiler.
Could you explain why a PromiseLike is not sufficient as a return value. I looked at the generated code and I couldn't spot an obvious reason.