Foundations
TypeScript · Beginner - the basics, step by step
- Why TypeScript, your first typed fileDiscover what TypeScript is, the problem it solves, and write your very first typed file.
- Primitive types, arrays and simple unionsLearn the three basic types, how to type an array, and how to create type unions.
- Objects and interfacesDescribe the shape of your objects with precise types, then make them reusable with interfaces.
- Typing functions: parameters, return, optionalsMake your functions safer by typing their parameters, their return value and their optional parameters.
- Inference, any and unknownLet TypeScript figure out types with inference, and understand why unknown beats the dangerous any.