function groupListingTypeError
groupListingTypeError(
allSiblings: readonly ListingWithCount[],
listingType: ListingType,
customisableDays: boolean,
excludeListingId?: number,
): string | null

The in-memory core of validateGroupListingType: given a group's already-loaded members, return the homogeneity error (or null). Callers that validate many groups at once batch the member reads (see getListingsByGroupIds) and drive this directly, so they never issue one sibling query per group and trip the N+1 read guard.

Parameters

allSiblings: readonly ListingWithCount[]
listingType: ListingType
customisableDays: boolean
optional
excludeListingId: number

Return Type

string | null

Usage

import { groupListingTypeError } from "docs/database.ts";