Skip to content

Glossary: TypeScript Beyond the Basics

Default type parameter

Also written: default (type parameter), E = string

A type parameter can have a default that is used when no type is given. In `Result<T, E = string>`, `Result<Product>` means `Result<Product, string>`.

Where the book teaches it

Related terms

Type parameterResult type