Hi, I'm from the front , Today, I would like to share with you !


This article mainly introduces what is typeScript ? typeScript And javaScript What does it matter ? Why should we study typeScript ?

One 、 What is? typeScript ?

typeScript By Mircrosoft stay 2012 , launched in , Is a free and open source programming language . It is javaScript A strict superset of , And added optional static and class based object-oriented programming , Is a very popular language extension .

typeScript Often referred to as TS .typeScript Not only can they support javaScript and ES grammar , Can also support typeScript grammar , Finally compiled as javaScript perform .

Its characteristics :

  • Began in JS , belong to JS.
  • Powerful type system .
  • advanced javaScript .

Two 、typeScript And javaScript Relationship

typeScript yes javaScript Superset , It's a door built on javaScript Language based on . stay typeScript Can be used in javaScript Extended syntax beyond , At the same time with the help of typeScript Good support for object-oriented and static types , You can write more robust 、 Large projects with greater maintainability .

typeScript No javaScript substitute , It will make javaScript The pace of progress is more solid , More distant .

typeScript Provides static code analysis , It can intelligently prompt error messages before the code runs ,javaScript It's a weakly typed language , For reporting errors js Still able to compile successfully , An error will be reported only after running . comparison javaScript ,typeScript More efficient .

3、 ... and 、 Why should we study typeScript

typeScript The purpose of the design is to solve javaScript The pain points :javaScript Is a weak type and has no namespace , So lead to javaScript It's hard to modularize , Not suitable for large projects .

So far , The popular Vue、React、Angular All in use typeScript Development , Even Hongmeng's 3.0 It is also recommended to use javaScript Development and application , The latest development framework ArkUI Also fully embraced typeScript.

stay npm Upper typeScript Downloads double every year , end 2021 year 12 month 31 Japan , Its downloads have exceeded 2200 Ten thousand times .

We found that ,JavaScript Always first ,Python and Java Second and third, respectively , A firm position .

It is worth noting that TypeScript The heat soared all the way , Now we have arrived at Fourth place . I predict the future typeScript As the front-end, the knowledge reserve will become necessary , So start learning now !

all 2022 了 , Don't hurry to learn typeScript ? More articles about

  1. Phaser I don't know , Learn more about multithreading

    In the previous article we talked about CyclicBarrier.CountDownLatch Use , Let's go back to CountDownLatch It is mainly used when one thread is waiting for multiple threads to finish execution , and CyclicBarrier ...

  2. How to get started linux,linux You can still learn like this

    Preface There's only cangls And Xiaobai in their small room , There was a discussion about learning methods . The small white :cangls ah , I want to ask you a question , How do you remember so much linux Ordered . cangls: Me , Everyone else watched my little movie , ...

  3. Java You can still learn like this : How to deal with the collection class that must be tested in the interview

    Original statement The author of this article : Huang Xiaoxie For reprint, please indicate the source and the author at the beginning of the article . A series of articles This article is about < Learn in five minutes Java> One of a series of articles This series focuses on Java The core skills that programmers have to master , Combined with my personal three years ...

  4. Still struggling to learn any programming languages ?Python May be “ teach ” You are a man

    Why in recent years Python In China, it is very popular ? Python This East-West country , Probably from 2017 Beginning of the year , Suddenly, there was a fire . before , about Python, Even programming , It's mostly a topic for professionals , At the level of the general public ...

  5. The front end must learn TypeScript The first bullet ,st The base type !

    TypeScript It was developed by Microsoft JavaScript Superset ,TypeScript compatible JavaScript, You can load JavaScript The code then runs .TypeScript And JavaScript comparison ...

  6. I don't know about this kind of annotation , It's good to say that Spring Boot ?

    Preface I don't know you're using Spring Boot Has it been used in the daily development @Conditionalxxx annotation , such as @ConditionalOnMissingBean. Believe that read Spring Boot A friend of the source code ...

  7. all 2022 Years. , Your front-end toolset should have vueuse

    Abstract : Based on a Vue combined API Function toolset for . This article is shared from Huawei cloud community <vueuse: I'm not allowed to be vuer The front end of the , Your toolset is only lodash!>, author : Fish at the front . vueuse What is it? ? ...

  8. You Lian Nginx How to forward the request to you is not clear , It's good to say that you are not CRUD The engineer ?

    Catalog One .Nginx Working principle II .Nginx Process model three .Nginx Handle HTTP Request flow Nginx working principle Nginx It consists of kernel and module ,Nginx There is very little work done by itself , When it receives a HTTP When asked , It only ...

  9. SOLID I don't know the principle , I dare to say that I am engaged in development !

    object-oriented programming (OOP) It brings new design ideas to the field of software development . Many developers in the process of object-oriented programming , It tends to have the same purpose in a class / Function code together , Strive to solve the current problems in the fastest way . however , This programming method will lead to ...

  10. I found a official account that suits my taste , But it is troublesome to turn over too many articles , Fortunately, I learned Python

    Most of us will pay more or less attention to several official account. , If you find a number that suits your appetite The article in the official account must be read every single item. . Sometimes we notice that the treasure official account has been hundreds of thousands of articles. , And the author is only interested in ...

Random recommendation

  1. Java Garbage collection

    Garbage collection algorithm Reference count Each object in the heap has a reference count , When an object is referenced, the reference count is incremented 1, When the reference of an object is reassigned or exceeds the valid range, the reference count decreases 1, When an object is recycled , The reference of the object it refers to is subtracted 1. When an object is referenced ...

  2. WPF entrance Application

    1.WPF and Conventional WinForm similar , WPF You also need a Application To command some of the overall behavior and operation , And each Domain ( Application domain ) There can only be one of them Application Instance storage ...

  3. sudo Configuration temporary get root jurisdiction

    Ordinary users in the system sometimes need root Permission to perform an operation , If used su - root You have to know root Password , It's not safe , So there is sudo,root It can be done to /etc/sudoers Do a certain configuration , Let ordinary users ...

  4. Microsoft Azure Start supporting Docker technology

    Some time ago, I was still discussing the efficiency of media conversion services with Microsoft technicians , If the application Docker There will be a qualitative improvement , I didn't expect to be from abroad Azure Has begun to support , I believe that China Azure Support is not far away . Microsoft is trying to ensure that Azure Become development ...

  5. PHP obtain APP Client's IP Address method

    analysis php Get the client ip use php Access to clients ip, Everybody knows that , The code is as follows : /** *  Get the client ip * @param number $type * @return string */ func ...

  6. JAVA WEB Download set of mainstream development tools

    JAVA SEhttp://www.oracle.com/technetwor ... ownloads/index.html eclipsehttp://www.eclipse.org/downlo ...

  7. Xcode 7 Can you resist zateng more - Especially after self forced upgrade , Close it if you have nothing to do

    Xcode 7 Can you resist zateng more - Especially after self forced upgrade , Close it if you have nothing to do The beautiful life of Vulcan (http://blog.csdn.net/opengl_es) This article follows " A signature - Non commercial use ...

  8. sql The value of a column is if Judge

    select  if(area_id =350000, 1, 2)  as area_id from my_table Take the region number as 350000 It's set to 1, Other settings are 2

  9. hibernate Transaction configuration Aop aop:advisor Pattern

    <!-- Use HibernateTransactionManager management hibernate Business --> <bean id="txManager" class=&q ...

  10. java Precautions for shifting operation

    Have a simple stay java in , Shift is divided into signed shift and unsigned shift , If you move without a sign, whether you move left or right , Automatically make up in the low or high position 0 If it is a signed number to shift , You have to put