Skip to content

Glossary: TypeScript Beyond the Basics

Result type

Also written: Result<T>, result types, ApiResult

A discriminated union holding either a value or an error, so the caller must check which it got. It puts failure into the return type instead of throwing.

Where the book teaches it

Related terms

Discriminated unionDefault type parameter