UNPKG

@chiper-inc/ecommerce-lib

Version:
15 lines (14 loc) 383 B
type QuantityErrorType = | "MinQuantity" | "MaxQuantity" | "Stock" | "MultipleQuantity"; export class ItemQuantityError extends Error { public readonly newQuantity: number; public readonly type: QuantityErrorType; constructor(message: string, quantity: number, type: QuantityErrorType) { super(message); this.newQuantity = quantity; this.type = type; } }