Understanding Typescript Generics and How to Implement Themby@amarachi
2,165 reads

Understanding Typescript Generics and How to Implement Them

tldt arrow
Read on Terminal Reader🖨️

Too Long; Didn't Read

Typescript Generics are a way to define flexible variables, functions, objects, arrays etc. They are a stricter, more syntactical superset of [JavaScript] The language has become quite popular for a number of reasons, some of which are: easier to read and understand. Sometimes we need a particular function or object to work with a wide range of types and not be restricted by the rigidity that comes with writing with typescript. We trade-off the type definition for flexibility by using the `any` keyword like the code block below.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Understanding Typescript Generics and How to Implement Them
Amarachi Iheanacho HackerNoon profile picture

@amarachi

Amarachi Iheanacho

About @amarachi
LEARN MORE ABOUT @AMARACHI'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa