Category TypeScript

TypeScript tutorial. TypeScript is a superset of JavaScript and supports the ECMAScript 6 standard (ES6 tutorial). TypeScript is a free and open source programming language developed by Microsoft. The design goal of TypeScript is to develop large-scale applications, which can be compiled into pure JavaScript, and the compiled JavaScript can run on any browser. Language Features TypeScript is a language extension that adds features to JavaScript.

TypeScript functions

TypeScript function is based on es6 function features added some back-end concepts: generalization, parameter type declaration, return value type declaration, overloading, decorators, etc.. Some other features: arrow functions, generators, async-await, promise, etc. are all added features of es6. Function Type…

Modifiers for typescript classes

Those who have learned java should understand it very well, but write it anyway! typescript gives us three modifiers when defining properties inside. public : public Accessed inside the current class, subclasses and outside the class protected : protected type…

typescript’s functions

1. Default Parameters Passing in a value will override the default parameter, and it is fine to pass no value. 2. Optional parameters Optional values may or may not be passed, but the optional parameters must be placed at the…

TypeScript type assertion

Through type assertion, you can tell the compiler, “Believe me, I know what I am doing”, you will know the detailed information of a certain value better than TypeScript, you clearly know that an entity has a more precise type…

Module references in TypeScript

ts (TypeScript) can be used in node environment and web environment, or before the es module comes out. Most of the packages follow commonjs, and most of these packages that follow commonjs still exist in nodejs, which is the reason…

In-depth comparison of TypeScript VS JavaScript

TypeScript and JavaScript are currently two popular scripting languages in project development. We are already familiar with TypeScript as a superset of JavaScript, but what is the difference between TypeScript and JavaScript? When choosing a development language, how should one…