Skip to content

Glossary: TypeScript Beyond the Basics

infer

A keyword used inside a conditional type to name a part of a type for TypeScript to work out. `ItemOf<T>` uses `infer E` to capture an array's item type.

Where the book teaches it

Related terms

Conditional typeAwaitedReturnType