Easy way to refer to the different properties and functions that a value has.
There's a lot of meaning in the statement right here so let's kind of break it apart piece by piece.
1. what is a value?
value in Javascript and typescript is anything that we can assign to a variable.
We can assign strings, numbers, boolean, null, undefined, objects, functions, classes, arrays and so on..
2. what does mean that an easy way to refer to the different properties and functions?
Let's look at the below.
"red"
=> It is a string / It is a value that has all the properties + methods that we assume that a string hasEvery value in typescript has a type!!
There are two different categories
of types.
There are two big reasons.
First, Types are used by the Typescript Compiler to analyze our code for errors. Second, Types allow other engineers to understand what value are flowing around our codebase