TypeScript Infer keyword Explained

What is infer keyword? What are the use cases?

Sunny Sun
JavaScript in Plain English
4 min readJun 25, 2021

--

Photo by Jeremy Bishop on Unsplash

The Infer keyword can be perplexing and challenging to grasp. This article aims to provide a clear and straightforward explanation of this concept.

In the official documentation, infer is mentioned in the Conditional Types section:

Within the extends clause of a conditional…

--

--