TypeScript Dictionary Type

The TypeScript dictionary type allows you to store data in a key-value format. TypeScript provides the dictionary functionality through the Map data type. In this post, we will learn about TypeScript Dictionary Type (Map) with multiple examples. Introduction The map data type allows you to store data in key-value pairs. …

TypeScript Dictionary Type Read More

TypeScript Array

The array in TypeScript allows you to store a collection of values of a single data type. TypeScript provides a number of functions to do various operations on an array. In this post, we will learn about the TypeScript array and its functions. Syntax Below is the syntax for declaring …

TypeScript Array Read More

Typescript Data Types

In this TypeScript tutorial, we will learn about TypeScripts data types. Data types helps you to write code just like you write in other OOPS languages like C# and Java. Data Types provides strongly typed code. A strongly typed code means all variables data types are known at compile time. Strongly typed code helps …

Typescript Data Types Read More

TypeScript Union Type

TypeScript Union Type is a hint to the compiler for possible data types for a variable. We use the union data type when we are not sure about the possible variable data types, but we know that the possible data types are limited. For example, we have a function named …

TypeScript Union Type Read More

TypeScript Switch Case

A switch case statement is used when we have to execute between different blocks of code based on a condition. It replaces the need for multiple if…elseif conditions and provides more clean code. Switch evaluates an expression and then matches it with different case clauses. If any value matches the case clause, …

TypeScript Switch Case Read More