How to Implement Promise.race with Conditional Short Circuit in Node.js & TypeScript

Опубликовано: 31 Август 2023
на канале: Rowadz
239
10

Buy me a coffee if this is useful 😀
https://www.buymeacoffee.com/rowadz

race promises until a condition applies in Node.js & TypeScript 🚀⚡

Learn how to supercharge your asynchronous programming in this concise video

code:
https://gist.github.com/Rowadz/87cbb4...

Promises techniques 🎊:

   • Promises techniques 🎊  

HTTP requests orchestration techniques 🪄:

   • HTTP requests orchestration techniques 🪄  



00:00 Explaining the idea
02:25 Start writing the code
03:16 Creating a map to hold the promises's statuses
07:14 Calling Promise.race
07:58 Continuing the race
08:43 Testing
09:28 Testing with a delay
10:00 Testing with an error
11:02 Testing with a rejected promise


Смотрите видео How to Implement Promise.race with Conditional Short Circuit in Node.js & TypeScript онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Rowadz 31 Август 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 239 раз и оно понравилось 10 людям.