Types - any, unknown, never
any The any type is the most flexible type specified in TS, and any basically ensures that the TS compiler cannot check anything. But any also takes away all the benefits brought by TS and should b
Derek Zhu
any The any type is the most flexible type specified in TS, and any basically ensures that the TS compiler cannot check anything. But any also takes away all the benefits brought by TS and should b
union union type The writing method is Parameter: Type 1|Type 2|Type 3.... indicates that the parameters can be assigned these types of values. like: 123function combine(input1: string | number, i
TS support for arrays The array type is written as array name: data type in array[], such as hobbies: string[]. Using arrays inside and outside objects is exactly the same. Another way to write it
Core Types Primitive types: number, string, boolean reference types: object, Array TS exclusive typs: Tuple, Enum, any Primitive types are written in TS as parameter: type, such as n1: number.
What is TypeScript TS is a superset of JavaScript. TS takes JS and adds new features and syntax to it. TS cannot be executed directly in JS environment (such as browser, node.js). TS is a programmi