May 07, 2021 20:00 0 Comment TypeScript
Install TypeScript, Install TypeScript, Create the first TypeScript file, Compile the code, Type annotation, Interface, Class, Run the TypeScript web application, TypeScript is a free and open source programming language developed by Microsoft., TypeScript is a superset of JavaScript, starting with the syntax an
May 07, 2021 20:00 0 Comment TypeScript
Null and underfined types, Null and underfined types, Type analysis based on the control flow, Mark the union type, never type, Read-only properties and index signatures, Specifies the this the function, tsconfig.json file wildcards, Module resolution increases: BaseUrl, path mapping, rootDirs, and tracking, Quick external module declaration, A wildcard in the module name, UMD module definitions are supported, Optional class properties, Private and protected constructors, Abstract properties and accessors, Implicit index signature, Compiling --lib contains built-in type declarations, Use --noUnusedParameters --noUnusedLocals claims, The module name .js to use the extension, Supports the compilation target : es5 module: es6 at the same time, Commas are supported at the end of the function parameter and argument list, New compilation parameter --skipLibCheck, Allow duplicate identifiers in declarations, The newly compiled --declarationDir, Introduction to TypeScript 2.0, Null and underfined types, TypeScript now has two special types: Null and Undefined, whose, null, and, undefined, Prev
May 07, 2021 20:00 0 Comment TypeScript
Introduction to TypeScript 2.1, Introduction to TypeScript 2.1, Introduction to TypeScript 2.1, Keyof and Lookup types, In JavaScript, it is fairly common to use APIs with expected property names as parameters, but
May 07, 2021 20:00 0 Comment TypeScript
Introduction to TypeScript 3.1, Introduction to TypeScript 3.1, Introduction to TypeScript 3.1, The type of map on the yuan and array, In TypeScript 3.1, the type of mapped object on the yuan and array now produces
May 07, 2021 20:00 0 Comment TypeScript
TypeScript base type, The underlying type, Introduced, In order for the program to be valuable, we need to be able to handle the simplest data units: numbers, strings, stru
May 07, 2021 21:00 0 Comment TypeScript
Scope rules, Scope rules, Variables get weird, Block scope, Redefining and masking, The acquisition of block-level scope variables, Deconstruct the array, The object is deconstructed, Function declaration, TypeScript, variable declaration, let, and, const, relatively new variable declarations in JavaScript. A, s we mentioned earlier,, let, is similar to,
May 07, 2021 21:00 0 Comment TypeScript
readonly vs const, readonly vs const, Implement the interface, The difference between the static part of the class and the instance part, TypeScript, interface, Introduced, One of typeScript's core principles is to type check the, shape, that the value has. I, t is sometimes referred to
May 07, 2021 21:00 0 Comment TypeScript
Introduction to the Typing Class, Introduction to the Typing Class, The default is public, Understand private, Understand protected, The argument property, The constructor, Use the class as an interface, Introduction to the, Typing, Class, Traditional JavaScript programs use functions and prototype-based inheritance to create reusable components, but i
May 07, 2021 21:00 0 Comment TypeScript
Define a type for a function, Define a type for a function, Write the full function type, Infer the type, this arrow functions, this parameter, The TypeScript, function, describes, Functions are the foundation of JavaScript applications. I, t helps you implement abstraction layers, simulation
May 07, 2021 21:00 0 Comment TypeScript
Use type parameters in generic constraints, Use type parameters in generic constraints, Use class types in generics, TypeScript, Generics Introduction, In software engineering, we should not only create a well-defined API, but also consider reusability., Components c
May 07, 2021 21:00 0 Comment TypeScript
TypeScript enumerity, TypeScript enumerity, Using enumerals, we can define some numeric constants with names., Enumerants, enum, the enum keyword., enum Direction {, Up = 1
May 07, 2021 21:00 0 Comment TypeScript
TypeScript type inference, TypeScript Type Inference, Introduction, This section introduces the type inferences in TypeScript., That is, where and how the type is inferred., Bas
May 07, 2021 21:00 0 Comment TypeScript
TypeScript Type Compatibility Introduction, TypeScript Type Compatibility Introduction, Notes on reliability, Function parameters are co-variable in both directions, Optional and remaining parameters, The function is overloaded, The private member of the class, Sub-types and assignments, TypeScript Type Compatibility, Introduction, Type compatibility in TypeScript is based on structural sub-types. A, structure type is a way to describe
May 07, 2021 21:00 0 Comment TypeScript
User-defined type protection, User-defined type protection, typeof type protection, instanceof type protection, Interface vs. type alias, Integrity checks, TypeScript, advanced type, Cross Types (Intersections), A cross-type is a combination of multiple types into one type. T, his allows us to overlay the
May 07, 2021 21:00 0 Comment TypeScript
Symbol.hasInstance, Symbol.hasInstance, Symbol.isConcatSpreadable, Symbol.iterator, Symbol.match, Symbol.replace, Symbol.search, Symbol.species, Symbol.split, Symbol.toPrimitive, Symbol.toStringTag, Symbol.unscopables, Introduction to TypeScript, Symbols, Since ECMAScript 2015,, symbol, become a new native type, just, number, string, string., symbol, of the symbol ty