This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
A mapped type is a loop over keys that produces an object or tuple type and looks as follows:
{[PropKey in PropKeyUnion]: PropValue}
In this blog post, we examine how mapped types work and see examples of using them. Their most importing use cases are transforming objects and mapping tuples.
This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer

Dr. Axel Rauschmayer | Sciencx (2025-02-14T00:00:00+00:00) Mapped types in TypeScript. Retrieved from https://www.scien.cx/2025/02/14/mapped-types-in-typescript-2/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.