Grokking TypeScript
Vote

0% completed

​

Working with Promises

An object that stands for a result that is not ready yet is called a promise. You receive the object immediately, and the result reaches the object later. Requesting data from an API or reading a file works this way, because the program can continue with other work while the runtime waits.

A promise is always in one of three states. It starts as pending, which means the task has not finished. It then moves to fulfilled, which means the task succeeded and the promise holds a value, or to rejected, which means the task failed and the promise holds a reason

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content