• Count the elements of a flat array belonging to a given parent — the children a cascading delete would take with it, used to warn before removing a zone or a part.

    Type Parameters

    • T

      The persisted element shape.

    Parameters

    • items: readonly T[]

      The flat array to scan.

    • group: string

      The parent code to count members of.

    • getGroup: (item: T) => string

      Reads an element's parent code.

    Returns number

    The number of elements naming group as their parent.