typescript-async

A course on TypeScript async await fundamentals

Stars
9

async/await using TypeScript

Docs / Code to an accompanying video course on async/await with TypeScript.

Setup

npm install

Lessons

Future

Why use TypeScript quiz:

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.

utils.promisify

Worth mentioning.