Author: nish1013
-
keyof typeof Enum [TypeScript]
keyof typeof Enum [TypeScript]
-
Indexed Access Types [TypeScript]
The syntax id: User<TechDepartment>[‘id’]; is called “Indexed Access Types” in TypeScript. In this syntax, User<TechDepartment> is a generic type instantiation where User is a generic type that takes a parameter TechDepartment. The angle brackets < > are used to specify the generic type parameter. The part after the colon : is an example of an indexed access type. It is used to access a…
-
Keyof Type Operator [TypeScript]
Keyof Type Operator [TypeScript]