Here is the structure that I am working with:
export interface VendorState extends PaginationViewModel {
vendors: CategoryVendorCommand[] | CategoryVendorCommand;
}
This is my model:
export interface CategoryVendorCommand {
id: string;
name: string;
description: string;
}
I am attempting to access this property:
this.patchValue({ name: item.vendors.name, description: item.vendors.description })
However, I am encountering an exception stating
Property 'name' and 'description' does not exist on type 'CategoryVendorCommand | CategoryVendorCommand[]'