0
1
GGGiovanny Gongora
Construct a new type based on some properties of an interface with the Pick utility type
interface MyInterface {
id: number;
name: string;
properties: string[];
}
type MyShortType = Pick<MyInterface, 'name' | 'id'>;
0
1
GGGiovanny Gongora
Construct a new type based on some properties of an interface with the Pick utility type
interface MyInterface {
id: number;
name: string;
properties: string[];
}
type MyShortType = Pick<MyInterface, 'name' | 'id'>;