A look into how to add types to variables in TypeScript

Welcome to the land of TypeScript! A superset of the JavaScript language where every value has a type associated with it.

In this article, we will get our feet wet with TypeScript by understanding the difference between type annotation and type inference. I will assume you have some JavaScript experience and know about basic types, like string, number, and boolean. If you are not familiar with types, have a look at the documentation below to get started.

Handbook — Basic Types

#javascript #programming #typescript

Type Annotation vs. Type Inference in TypeScript
2.05 GEEK