Basic types
Last updated
Last updated
We covered some features of the TypeScript type system in . In this section we will dive a bit deeper, laying a strong foundation so we can tackle more advanced topics to come.
First, it's worth repeating this point: the type system in TypeScript is completely optional. Therefore, vanilla JavaScript is still 100% valid TypeScript. In fact, you can think of JavaScript simply as TypeScript that hasn't been annotated yet. (Ok, that's a bit of an oversimplification.)
Secondly, remember that TypeScript's type enforcement happens during its compile time. Therefore, in your outputted JavaScript, the type annotations will be gone.
Now, let's start get started!