The great thing about asynchronous programming is that you can do multiple things in parallel. E.g. you can make multiple network requests, or read multiple files from the file system.
This lesson covers how to write parallel as well as serial async code.
Hi Basarat, Great course ! I just wonder how would I type the people object properly in the getUserDetails.ts file ? I created an interface like this interface Person { name: string; location: string; }
But don't really know how to type an Object that contains objects in Typescript.
Thank you !
You need an index signature: https://basarat.gitbook.io/typescript/type-system/index-signatures
interface Person { name: string; location: string; }
interface Persons { [person: string]: Person; }
Thank you @Basarat, really appreciate the help :)