Mastering TypeScript’s Mapped Types

Mastering TypeScript’s Mapped Types

Learn how to handle Typescript mapped types like a pro

Learn to handle Typescript mapped types like a pro

Typescript mapped types represented by a map and a compass

Photo by  Denise Jans on  Unsplash

TypeScript first appeared in October 2012, and it was one of those tools that at first I didn’t like. Personally, I didn’t see the need for it. It looked like it was killing the JavaScript spirit by trying to type everything. I was not the only one, and furthermore, it was introduced by the “evil” Microsoft. Of course, mapped types were not part of the first release — we would have to wait some time for them.

Mapped types first version arrived in TypeScript 2.1, which was released nearly four years after the first release.

I can confidently say that this feature is the one that really got me hooked. It drew my attention and made me try and experiment with it. Something that did add to my interest is that back then I was already using  Visual Studio Code. That IDE was already shipping with TypeScript support built-in. The fact that Microsoft nailed it with Visual Studio Code made TypeScript adoption easier.

Looking at Google Trends, we can see how interest started to grow in 2015 (Visual Studio Code release date) and then really took off in 2016. Mapped types and Angular 2 were released in 2016, which should account for that growth.

Google Trends chart showing the growth in interest in Visual Studio Code from 2012 to 2020

javascript typescript programming

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Object-Oriented Programming with Javascript — using Typescript

Object-Oriented Programming With JavaScript — Using Typescript. TypeScript lets you write JavaScript the way you really want to. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript is pure Object-oriented with classes, interfaces, and statically typed like C# or Java.

What is TypeScript? Why TypeScript? and Why Not TypeScript?

TypeScript extends JavaScript by adding Types. There are many great reasons to switch to TypeScript. Especially if your team uses JavaScript. There are some reasons to not use TypeScript as there are with any language or framework.

TypeScript Tutorial For JavaScript Developers - TypeScript Basics

TypeScript Tutorial For JavaScript Developers - TypeScript Basics. I will show you guys 4 example of JavaScript code, and how to convert it to TypeScript. This is a typescript beginners tutorial.

TypeScript: A Superset of JavaScript

Multi-paradigm, Functional, Generic, Imperative, Object-Oriented. In this article, I have shared the essential information about TypeScript programming language. This article contains a basic overview, brief history, features and applications of TypeScript. TypeScript is getting more popular in Full-stack development. In terms of popularity, in the last two years TypeScript pulled ahead of Ruby, Shell, and C.

How an Anti-TypeScript “JavaScript Developer” Like Me Became a TypeScript Fan

In this article, I will discuss my journey from being an anti-TypeScript developer to a developer who now couldn’t think of going back to the plain JavaScript world. Let's see How an Anti-TypeScript “JavaScript Developer” Like Me Became a TypeScript Fan.