Typescript Tutorial for Beginners in Hindi #1: What is Typescript | Introduction to Typescript Hindi

preview_player
Показать описание
Welcome all, we will see What is Typescript in Hindi. Introduction to Typescript in Hindi. Typescript tutorial for beginners in Hindi. What is TypeScript? TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.

First of all, TypeScript is typed. That doesn’t mean that you write TypeScript using a keyboard, it means that unlike JavaScript, TypeScript considers the types of variables, parameters, and functions. Many of us learned to code in a typed language, such as Java or C#. In statically typed languages such as these, the compiler checks our code at compile-time for type errors.

Secondly, TypeScript is a superset of JavaScript. In other words, the TypeScript language specification includes everything that is in JavaScript, with some additional syntax added. You could decide to use TypeScript and then just write everything in ‘plain’ JavaScript in your TypeScript file if you really wanted to. The TypeScript compiler would understand everything you had written, and just write the same script into a JavaScript file.

typescript tutorial in hindi

Working with TypeScript
In order to use TypeScript, we need the TypeScript compiler, and we need to write our script in files with a “.ts” extension. If you are coding using Visual Studio 2013 or 2015, then you are ready to go, as these environments include the TypeScript compiler. For other environments, you may need to download and install the TypeScript compiler. Details are on the website.

typescript tutorial in Hindi

The Benefits of Using TypeScript
The advantages of using TypeScript can be broadly divided into two categories.

Firstly, it offers type checking. This allows us to identify errors earlier, and potentially save hours of debugging our JavaScript code. As discussed in Crockford’s JavaScript: The Good Parts, JavaScript’s best features are also it's most dangerous. Dynamic typing offers flexibility, but it can also be conducive to bugs. With TypeScript, you could say we get the best of both worlds. If you want to take advantage of JavaScript’s dynamic typing, then just write plain JavaScript in your TypeScript file, but under most circumstances, we don’t need dynamic typing, and so we can make use of TypeScript’s type annotations.

Secondly, TypeScript allows and encourages us to write object-oriented code. The fundamental principles of object-oriented programming are often referred to as abstraction, encapsulation, inheritance, and polymorphism. TypeScript makes it easier for us to follow principles such as these. Class definition syntax helps us to abstract. Public and private access modifiers help with encapsulation, and TypeScript has inheritance syntax built-in. In short, if you believe in object-oriented programming, and you need to write JavaScript, then TypeScript may be for you. Even if you don’t understand the benefits of object-oriented programming, if that approach is all you know, then TypeScript will help you to write better JavaScript.

Aside from these technical advantages, the fact that TypeScript is a superset of JavaScript means that you can make the transition to using TypeScript gradually. Start writing plain JavaScript in TypeScript files, and gradually introduce more of TypeScript’s features as and when you learn and decide to use them.

The Disadvantages of Using TypeScript
I see very few if any disadvantages of using TypeScript. Some have complained that the compiler is slow, which may be the case for very large code bases

Another possible disadvantage is the problem of integrating with third-party libraries. How do you assign a variable to a “type” which is defined in a library? There are workarounds for this. One is to create a declaration file for the library.

Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.

Don't Forget to Follow me on all Social Network,

Рекомендации по теме
Комментарии
Автор

bhai reactjs use kar rhe ho tumhari file .js extension se hai, main ionic + reactjs mein kaam kar rha hun meri file extension .tsx hai or jab main javascipt ka code likhta hun to error show hota hai for example inline css k lie const cssStyle variable lia but baad mein color k lie option nhi aa rhi or error show ho rha hai 'color' property does not exist in {}
please help me

balkarit
Автор

Thanpa sahab sb kucch toh mast hai .. lekin mene aapke tutorials(Javascript & Typescript) me dekha ki sirf beginers ke liye hee hai.. usse advance kb ayega...

yogeshtiwari
Автор

Hii sir kalpesh your explanation towards javascript concepts are too good as i am moving to make a carrer in react plz upload a videos related to oops concept since typescript is used in react will cover all my concept plzz sir its my request to u
your all videos are nice it creates a mood to listen once again thanku so much being such a good helper to all of us.


god bless u
thanks once again

kalpeshshimpi
Автор

I think no need to learn typescript. what do you say Thapa bhai?.

secretcaptain
Автор

bhai angular 8 ke tutorials bhi bna de...

namanmalhotra
Автор

type script ke lieye java script ani chahiyeee??

shaileshbabras
Автор

JavaScript, EcmaScript, Typescript me kya difference hai

Saurav_rav
Автор

BHai PHP m ni daal data type glt bol rhe ho

ShivamSingh-whjj
visit shbcf.ru