/learning-typescript

Repository dedicated to my studies on static typing with TypeScript, exploring concepts, best practices, and practical examples.

Primary LanguageTypeScript

Evolving in TypeScript!🐈‍⬛

This repository contains information and examples related to the study and evolution in the usage of TypeScript. TypeScript is a programming language that extends JavaScript by adding features like static typing, interfaces, and other tools that enhance the robustness and scalability of projects. In this document, we will cover the main topics studied during this journey of evolution.

Covered Topics

1. Introduction to TypeScript

In this section, we will provide an overview of what TypeScript is, its advantages, and how it relates to JavaScript. It will be an initial dive to familiarize you with the basic syntax and fundamental concepts.

2. Why Use TypeScript?

Here, we will explore the reasons for adopting TypeScript in your projects. We'll discuss topics such as compile-time error detection, increased team productivity, improved code maintenance, and interoperability with existing JavaScript libraries.

3. TypeScript Primitive Types

In this section, you will learn about the built-in primitive types in TypeScript, such as number, string, boolean, null, and undefined. We'll see how to declare variables with these types and how the TypeScript type system helps prevent common errors.

4. Control and Iteration Structures

We will cover conditional control structures like if, else, switch, as well as loops like for, while, and do-while. We'll demonstrate how to use types to enhance the security and clarity of these structures.

5. Functions

In this section, we'll discuss creating functions in TypeScript, including defining parameter types and return types. We will also explore anonymous functions, arrow functions, and higher-order functions.

6. Classes and Interfaces

Here, we will introduce the concept of classes and how they are used to create objects in TypeScript. Additionally, we'll see how interfaces define contracts for the structure of an object, enabling more organized and readable code.

7. Generics

Generics are a powerful feature of TypeScript that allows creating reusable and flexible components. We'll explore how to create generic functions and classes that can work with various data types, while maintaining type safety.

8. Modules in TypeScript

Modules are a way to organize and reuse code across multiple files. You will learn how to import and export modules, control element visibility, and handle folder structures in larger projects.

Examples and Code

All the examples and code presented in this repository are based on the official TypeScript documentation. This ensures that you have access to accurate and up-to-date information, following the best practices recommended by the team behind TypeScript.

Get in Touch ✉️

Reach out to me at joaoaugusto311016@gmail.com if you have any questions or suggestions!