Appendix - Special characters in TS
_ Number separator The delimiter _ does not change the value of a numeric literal, but the logical grouping makes it easier to read the numbers at a glance. 12const inhabitantsOfMunich = 1_464_301
Derek Zhu
_ Number separator The delimiter _ does not change the value of a numeric literal, but the logical grouping makes it easier to read the numbers at a glance. 12const inhabitantsOfMunich = 1_464_301
React.FC Description is not a regular function, but a functional component. There must be a return value. 123const TodoList: React.FC = () => { return <div></div>};
Generic Utility Types Generic Utility Types Generic utility types can be used to process and transform different types of data. These generic utility types are generic because all they do is take t
Type Casting Type conversion tells TS that a value is of a specific type without TS being able to detect it on its own. TS cannot detect the type in some cases. For example, in HTML, id is used to
intersection types “&” intersection types allow us to combine other types. Use & to combine types. The combined type contains all properties and methods of those combined types. 123456789t
Inheritance Inheritance is used to create subclasses of a class. The subclass has the properties and methods of the parent class, and also has the exclusive properties and methods of the subclass.
Type of function In addition to the types of function parameters, the function itself (return result) also has a type. Function return result type TS is also inferred. You should not set the type