Quick Programming
Published in

Quick Programming

Generics in TypeScript

Because we don’t know what type the user will use!

Photo by Emily Morter on Unsplash

Generics are a big part of programming. They allow us to write type-safe functions without even knowing what the actual type will look like. But we can set certain restraints on the types a programmer might use.

In this article, I will explain generics in TypeScript and how to use them. The only prerequisite of this article is a little bit of…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
mbvissers.eth

I occasionally write about programming and smart contracts. Follow me on Twitter @0xmbvissers