We define types using either type
keyword or interface
etc.
But sometimes we want to use a type, and conveninetly a type of similar properties already exist.
That is when we use Omit<main type| 'exclude property1', ...>
example
interface Product {
id: number;
name: string;
price: number;
brand: string;
stock: number;
}
type shoppingItem = Omit<Product, "stock">;
const apple: Omit<Product, "stock"> = {
id: 1,
name: "red apple",
price: 1000,
brand: "del"
};