@metreeca/blue - v0.12.0
    Preparing search index...

    Function items

    • Resolves the items of a collection property from a retrieved resource.

      Reads the result of a retrieval made with a slice. The items, or the rows a projection computes over them, are returned as items, typed by the slice, without looking up the collection property on the match by name. A resource holding no items returns an empty array.

      Type Parameters

      • S extends Lazy<ResourceShape>

        The shape of the resource holding the collection, possibly deferred to break definition cycles

      • T extends Slice<S, T>

        The slice: the collection property and the members to retrieve from each item, or the projection to compute over the items, possibly with criteria

      Parameters

      • match: Match<S, T>

        The resource retrieved with slice

      • slice: T

        The slice used to retrieve match

      Returns Items<S, T>

      The items in the collection, or an empty array if there are none