Here is how to construct a type based on a subset of properties of another type in Typescript
In order to create a type from another type in TypeScript, used the Pick mapped type which will construct a type based on a subset of properties of another type as follows:- As you all can see Pick allows us to pick properties that require us to create our type from the original type! The…