A course on TypeScript async await fundamentals
async
/await
using TypeScriptDocs / Code to an accompanying video course on async/await with TypeScript.
npm install
What does this function return?
async function foo() { return 123; }
TypeScript knows :)
What does this function return:
declare function backend(): Promise<{key: string}>; async function foo() { return backend() .catch(err => { console.log('Backend failure:', err); }); }
I see this code out in the wild all the time.
Hopefully you can see that even for really simple codebases, when dealing with async await and promises, it is great to have TypeScript on your side.
Worth mentioning.