Skip to content

01. Type System

idavidov13 edited this page Apr 23, 2024 · 3 revisions

Core Types

image

Introduction to TypeScript

Official TypeScript Documentation

Why use TypeScript

Static Typing: Helps catch errors during development, improving code quality and reliability

Better Tooling: Enhanced code editor support with intelligent auto-completion, navigation, and refactoring

Readability and Maintainability: Type annotations provide self-documentation, making code easier to understand and maintain

Scalability: Suitable for large-scale applications with a strong type system

Key Features of TypeScript

Static Typing: Types are inferred or explicitly declared, catching type-related errors during development

Interfaces: Define contracts for object shapes, enhancing code readability and maintainability

Classes: Follow object-oriented principles with support for constructors, properties, and methods

Enums: Define a set of named constants for improved code readability

Generics: Write flexible and reusable code components

Modules: Organize code into logical and reusable units for better maintainability

TypeScript vs JavaScript

JavaScript: A dynamic, loosely typed language widely used for web development.

TypeScript: A statically typed superset of JavaScript that provides additional features and tools for better development experience.

Clone this wiki locally