Getting Started with TypeScript – Part 8

Hi Friends,

In this section, we are going to see more of types. Basically, we’ll see how to extend the types. If you are coming from from C# or Java background, you must be familiar with extending or inheriting. Although, JavaScript, by default doesn’t support inheritance, but by using Prototypes, we can implement inheritance in JavaScript. I have already have one section dedicated to Prototype(Advanced) JavaScript, you can refer that as well. So, here we are going to see the same, means writing a base class and inheriting the same in the child class. Hence, without wasting time, let’s jump into demos.

Continue reading “Getting Started with TypeScript – Part 8” »

847 total views, no views today

Getting Started with TypeScript – Part 7

Hi Friends,

In this section, we are going to look creation and implementation of classes in TypeScript. TypeScript provides built in support for class. I have already discussed in the last post, if you are coming from the background C# or Java, then you must be familiar with class. Basically, a class is container whose role is to contain code means making a reusable stuff, such that same can be used time and again.

Now, a class can contain anything like

Functions

Fields

Properties

Constructors etc…

Continue reading “Getting Started with TypeScript – Part 7” »

758 total views, no views today

Getting Started with TypeScript – Part 6

Hi Friends,

In this section, we will continue from the last segment and delve further in TypeScript. In this section, we will look how to use interfaces with TypeScript. If you are coming from system’s language background say C# or JAVA, you must be knowing different OOPs terminology and Interfaces are one of the key concepts for enforcing constraints on implementing classes. Let us go ahead and jump at demos.

Continue reading “Getting Started with TypeScript – Part 6” »

889 total views, no views today

Getting Started With TypeScript – Part 4

Hi Friends,

In this section, we will continue from the last section. Here, we will delve further into types and see the same in action.  Like we have anonymous types in C#, where in compiler can’t figure-out the exact primitive type declared. Similarly, we have in JavaScript, any type as shown below in the example.

Now, if I hover on the same, it will show the type any.

49th

Continue reading “Getting Started With TypeScript – Part 4” »

829 total views, no views today

Getting Started with TypeScript – Part 3

Hi Friends,

In this section, we will continue from the last place and explore more into TypeScript. Here, we will be starting with basics of TypeScript, means very much around the syntax areas. Let us look at few samples around the same.

Now, if I hover on the x variable, it will show of type number as shown below.

Continue reading “Getting Started with TypeScript – Part 3” »

1,047 total views, 2 views today

Getting Started with TypeScript – Part 2

Hi Friends,

This is the continuation from the last segment. In this case, we will first gets started with Visual Studio Tooling support for Typescript. In order to download the same, you need to download from http://www.typescriptlang.org/#Download. Once you open the page, you will see the download options as shown below.

29th

Continue reading “Getting Started with TypeScript – Part 2” »

1,230 total views, no views today

Getting Started with TypeScript

Hi Friends,

In today’s discussion, we are going to discuss TypeScript. Basically, in Enterprise-Scale websites, you are writing tons of JavaScript, many a times it happens that it sounds very clumsy, I mean not a reusable and maintainable code unless you are following some of the predefined JavaScript Design Patterns. Still many people write JavaScript just to accomplish short term goal rather than stressing on its coding standard and which is why it sounds like image shown below

26th

Continue reading “Getting Started with TypeScript” »

1,281 total views, no views today

Inheritance in JavaScript using Prototype

Hi Friends,

In this section, we are going to discuss Inheritance in Javascript. Inheritance is one of the OOPs methodology. But, here we will implementing the same in JavaScript.

Therefore, in the above snippet, I have simply created one simple Parent Class and Child class with one properties and methods to it. Also note that both these two methods takes one dynamic argument and get returned with some concatenated expression, fairly simple. Now, we need to make child class inherit parent class properties using Prototype property.

Continue reading “Inheritance in JavaScript using Prototype” »

1,605 total views, no views today