interface MyInterface {
id: number;
name: string;
properties: string[];
}
type MyShortType = Pick<MyInterface, 'name' | 'id'>;
Pick type interface
0
0
Giovanny Gongora
Construct a new type based on some properties of an interface with the Pick utility type
0 Comments
Add Comment
Log in to add a comment