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

    Type Alias Items<S, T>

    Items: { inferred from <S, T> }

    Resolves the type of the items retrieved from a collection.

    Items are the array of frames that a slice retrieves from a collection. items extracts them from the match of the retrieval, so callers don't need to look up the collection in the holding resource. Each frame is restricted to the members the slice asks for.

    Items are always an array, whatever the shape and model, so they are accepted wherever an iterable of items is expected, even in code generic over both. The bare ResourceShape or a generic Template resolves to an array of any values, so any collection result is accepted where only a generic shape or model is known.

    Type Parameters

    • S extends Lazy<ResourceShape>

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

    • T extends object

      The slice, naming the collection property and the members wanted from each item, possibly with criteria; callers constrain it to the slice the shape allows, as with Match