Skip to content

eggheadio-projects/async-await-using-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published