<aside>
💡 Type - A set of values and the things you can do with them.
</aside>

any
- Don't use it unless you are completely out of options.
- Overrides the typechecking
<aside>
💡 TSC Flag: noImplicitAny
This is included in "strict" mode but will complain about implicit anys.
</aside>
unknown
- If you really don't know what type a value will have use this.
- You can compare (==, ===, ||, &&, ?) and negate (!)
- But you can't do things that assume type (.length, .map(), etc) before proving it is of this type (
if (typeof a === "string")
)
boolean
- You can annotate or allow TS to infer
- You can annotate as
true
, false
or boolean
.
<aside>
💡 Type literal: A type that represents a single value and nothing else.
</aside>
number
bigint
string
symbol
- Don't come up much in TS/JS
Objects