How to Use Custom Types Properly in TypeScript?

Mastering Custom data types in TypeScript

Harsha Vardhan
JavaScript in Plain English
3 min readMar 21, 2022

--

Photo by Tianyi Ma on Unsplash

JavaScript is not a strongly typed language. Whereas TypeScript is strongly typed, which means everything has a type, be it a variable or a function.

There are times when we want to make an object have a particular format or a function return a certain format. This is where we use custom…

--

--

Engineer, Photographer, Tech Blogger. Builds products and writes for developers. I love to code and love to help others code :)