Your IT Tutor
Home
About Us
Courses
JavaScript
TypeScript
Java
C#
C++
Python
HTML
JSP
JSTL
PHP
SQL
net
JSON
XML
Software Testing
Cloud Computing
Pricing
Contact
Home
>
TypeScript
>
Introduction
TypeScript Tutorial
Fundamentals
Introduction
What TypeScript is and why it exists
Simple Types
The building blocks of TypeScript's type system
Special Types
Types that handle edge cases beyond standard values
Data Types Overview
How TypeScript categorises every kind of value
Variables
How TypeScript governs variable declaration and scope
Type Annotations
How to explicitly tell the compiler what a value is
Arrays
How TypeScript ensures type safety in ordered collections
Tuples
How to model fixed-structure, mixed-type sequences
Objects
How TypeScript describes and enforces object shapes
Type System
Type Inference
How the compiler deduces types without annotations
Explicit vs Inferred Types
When to annotate and when to let the compiler decide
Union Types
How to express values that can be one of several types
Intersection Types
How to produce a type that satisfies multiple contracts at once
Literal Types
How to restrict a value to one specific, exact type
Null & Undefined
How TypeScript handles the absence of a value
never Type
The type that represents code that can never be reached
unknown Type
How to safely accept any value without losing type safety
Type Aliases
How to give a reusable name to any type expression
Type Assertions
How to override the compiler's inferred type when you know better
Type Guards
How to narrow a type based on runtime checks
Type Casting
How to decide between assertions and runtime validation
Object Types & Structures
Introduction
How TypeScript models the shape of structured data
Interfaces
How to define a named contract for an object's shape
Aliases & Interfaces
How type aliases and interfaces differ and when to choose each
Enums
How to define a named set of related constant values
Index Signatures
How to type objects whose keys are not known in advance
Maps & Sets
How TypeScript types keyed and unique-value collections
Functions
Introduction
How TypeScript applies types to function signatures
Arrow Functions
How arrow functions differ from regular functions in TypeScript
Function Overloading
How to give one function multiple typed call signatures
Classes & OOP
Classes
How TypeScript extends JavaScript classes with type safety
Access Modifiers
How to control what parts of a class are visible to the outside
Abstract Classes
How to define a class that must be extended before it can be used
Inheritance
How derived classes reuse and extend their parent's behaviour
Declaration Merging
How TypeScript combines multiple declarations of the same name
Namespaces
How to organise related types and values under a single name
Generics
Introduction
How generics allow one piece of code to work with many types
Basic Generics
The foundational generic patterns every TypeScript developer needs
Generic Functions
How functions preserve type relationships across their inputs and outputs
Generic Classes
How a class can be written once and work with any type
Generic Interfaces
How to write a contract that adapts to the type it is given
Generic Constraints
How to restrict which types a generic will accept
Utility Types
TypeScript's built-in generic types for common transformations
keyof Operator
How to turn an object's property names into a type
Advanced Type System
Advanced Types
How TypeScript computes new types from existing ones
Conditional Types
How to select a type based on a type-level condition
Mapped Types
How to produce a new type by transforming every property of an existing one
Decorators
How to attach reusable behaviour to classes and their members
Asynchronous TypeScript
Async Programming
How JavaScript handles operations that take time to complete
Promises
How to represent and work with a value that arrives in the future
Async/Await
How to write asynchronous code that reads like synchronous code
Error Handling
How to deal with failures in a type-safe and structured way
Modules & Project Structure
Modules
How TypeScript organises code across files and boundaries
Configuration
How to control every aspect of TypeScript's compilation behaviour
Tooling
How to set up the tools that work alongside the TypeScript compiler
Compiler API
How to use the TypeScript compiler as a library in your own programs
Performance
How to keep large TypeScript projects fast to compile and run
Integration & Ecosystem
Node.js Integration
How TypeScript works with Node.js built-in APIs
TypeScript with Node.js
How to build a typed Node.js application from the ground up
React Integration
How TypeScript and React work together to type UI components
TypeScript with React
How to build a fully typed React application
DefinitelyTyped
How to add type safety to JavaScript libraries that ship without types
In JS Projects
How to bring TypeScript's benefits to an existing JavaScript codebase
Migration & Best Practices
Migration
How to move an existing JavaScript project to TypeScript incrementally
Best Practices
How to write TypeScript that is safe, readable, and maintainable
Testing
How to write and type tests for TypeScript code