Loading topic
Promise<T> represents a value that is not available yet but is expected later. The type parameter T describes the value when the promise succeeds.2 min readPromise and async/await syntax. This chapter focuses on the return type of an async function and how callers use it.2 min readasync/await.2 min readasync/await. This chapter focuses on deriving the type produced by an asynchronous function instead of repeating that type manually.2 min readasync/await. This chapter focuses on errors from awaited promises and on the boundary between what TypeScript can check and what your program can throw at runtime.2 min readasync/await, union types, and type narrowing. This chapter focuses on how TypeScript infers the results of promise combinators, which combine several asynchronous operations.2 min readasync and await, union types, and basic TypeScript generics. This chapter focuses on a common problem: starting asynchronous work without waiting for it or handling its rejection.2 min readasync/await. A generic async helper is a reusable function whose input and resolved output types are connected by a type parameter.2 min readPromise and async/await. This chapter focuses on making expected failure visible in a function's return type.2 min readasync/await, and union-type narrowing. This chapter shows how to pass cancellation through asynchronous code without losing its types.2 min readasync/await. You should also know that Promise<T> represents a value that will arrive later. This chapter applies that model to sequences of values that arrive over time.2 min readPromise and async/await syntax. This chapter focuses on a boundary: a point where data enters your program from code that TypeScript cannot inspect, such as an HTTP response.2 min read