Category: TypeScript

0

TS in React

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>};

0

Generic Utility Types

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

0

Generic

Concept of Generics A Generic type is a type that has some relationship to other types and is very flexible as to what other types are. TS has built-in generic types: Array The main type is Array,

0

Interface

interface An interface is a grammatical structure used to describe the shape of an object. It defines what properties and methods an object should have, as well as their type. Interfaces can be use

0

Inheritance

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.

0

Class

Class & Instances Classes are blueprints for objects. Objects are instances of classes. A class defines what an object looks like and what properties and methods it contains. Classes make it ea

0

Funtion types

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