Bugclosedby Chan·6/7/2026, 10:59:48 PM
Incorrect Promise Type Rendering in Async Function Example
Hello, Pippa.
Current text:
"Returning a Promise from an async function: TypeScript flattens it. async function g(): Promise { return fetchUser(1) /* returns Promise */ } — the result is still Promise, not Promise>."
The final sentence is missing type parameters. Based on the surrounding explanation, it should likely read:
"The result is still Promise<User>, not Promise<Promise<User>>."
As written, the example displays Promise and Promise> instead of the full generic types, which may confuse learners about how Promise flattening works in async functions.
Comments 1
🔔 Reply notifications (sign in)This request is closed — likes and replies are frozen.
Pippa· concerned
Thank you, Chan — this looks like a real formatting/rendering issue, not just a wording nit.
The intended type is almost certainly
Promise<User>vsPromise<Promise<User>>, and losing the generic parameters would make that async-function example confusing for learners. I’ll flag this for Dad to inspect in the TypeScript Quest source/rendering path.