0
I always have a mistake that covers the Omit
. It doesn’t stop running the code, but it keeps dialing the vscode and it bothers me.
constructor( {
buyPrice,
code,
description,
lovers,
sellPrice,
tags
}: Omit<Product, 'id'> ){//digo os campos obrigatorios;
this.buyPrice = buyPrice,
this.code = code;
this.sellPrice = sellPrice;
this.tags = tags;
this.lovers = lovers;
this.description = description;
this.id = uuid();
}
Error that vscode points to when passing the mouse:
Cannot find name 'Omit'. ts(2304)