Category: TypeScript

TypeScript Ambients or Declaration or Definition files:

In TypeScript the Ambients or Declaration or Definition files are used, when needed to include some external javascript library but at that time of compilation we do not need to convert the file from typescript to javascript and typescript can not understand its syntax also as not its pre defined in typescript and now there […]

Read More

TypaScript Modules:

The typescript module is to manage the code in some groups in an organized way. There are 2 types of modules in typeScript and they are: Internal Module and External Module Internal Module: The internal module is if you want to keep the module and its uses in the same file then it can be […]

Read More

TypeScript Namespace

The TypeScript Namespace is used to make the same group of code in an organized way, which can reduce the same type function from different files.In many programming languages like java, we can use some inbuilt namespace or can create a namespace and define some function there, and exporting the function from the namespace we […]

Read More

Class Tutorial of TypeScript:

Like all other object-oriented programming languages, the TypeScript class is also the blueprint for creating objects with specific functions. A class encapsulated the data for its object. In javascript es5 have or earlier have not the concept of classes, The concept of classes is started on typescript es6. How to create a class in typescript: […]

Read More

Interface tutorial of TypeScript

Like the other popular object-oriented programming languages interface is a collection of related properties, But the interface does not initialize the property or implemented the property. if we want to use a variable and if there are a lot of variables to pass through a function then we have to define all the types to […]

Read More

Object in TypeScript

The object is a set of variables or functions or array or scalar value, Which we can use as a normal or also can be able to pass through a function. to declare an object first we have to take a variable using the keyword var or let and then have to provide the variable […]

Read More

Union in TypeScript

In some cases, we can not determine whether the variable or an array will be in which type, and in that case, separated by a pipe we can make a multi-type variable or array.But using the union we can not assign a multi-type value at a time, for that we have to replace all the […]

Read More

Tuples in TypeScript

In the case of an array, we can not insert multiple file types as elements of the same array. So Type script introduced a tuple in which we can pass multiple data types like number string etc in the same tuple. The works of supply are the same as an array. To declare a tuple […]

Read More

The Array type variable and object in TypeScript

An array is a special type of variable which is used to store multiple data sequentially. In an array, the type of data stored must be the same. The limitation of variables can be solved by using an array. Variables are scaller in nature in that one variable contains only a single data at a […]

Read More

Typescript String Tutorial

A string is a collection of characters, that wraps the string primitive data type with a number of helper methods. We are going to discuss the method and helper of typescript below, String Object’s method There is 3 string object method available and they are: Constructor, Length, Prototype 1. Constructor: The constructor returns a reference […]

Read More