Use Utility Types To Extract a Promise's Result
Use Utility Types To Extract a Promise's Result
totaltypescript.com
Related
Highlights
Awaited helps you unwrap a promise. It's like calling await here. Without Awaited, if I remove this, then ReturnValue is just the promise again, but if I had it back, then we get the thing that's inside the promise, very, very useful.
Use Utility Types To Extract a Promise's Result
This shows you the two steps you need to go through. First extract the ReturnType and then await the ReturnType.
Use Utility Types To Extract a Promise's Result