1, TypeScript can use all the codes and coding concepts in JavaScript, and TypeScript was created to make the development of JavaScript easier. For example, TypeScript uses concepts such as types and interfaces to describe the data being used, which enables developers to quickly detect errors and debug applications.
2.TypeScript extends the JavaScript object model from the modeling of core language and class concepts.
3.JavaScript code can use TypeScript without any modification, and TypeScript code can be converted into JavaScript by compiler.
4.TypeScript provides static type checking at compile time through type annotation.
5. The data in 5.TypeScript needs clear type, but JavaScript doesn't.
6.TypeScript provides default parameter values for the function.
7.TypeScript introduces the concept of "class" which is not found in JavaScript.
8.TypeScript introduces the concept of module, which can encapsulate declarations, data, functions and classes in modules.