2 Matching Annotations
  1. Dec 2023
    1. because the value isn't there yet. A promise is just a marker that it will be available at some point in the future. You cannot convert asynchronous code to synchronous, though. If you order a pizza, you get a receipt that tells you that you will have a pizza at some point in the future. You cannot treat that receipt as the pizza itself, though. When you get your number called you can "resolve" that receipt to a pizza. But what you're describing is trying to eat the receipt.
  2. Mar 2020