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

    Type Alias Frame<S, T>

    Frame: { inferred from <S, T> }

    Resolves the type of a single item retrieved from a collection.

    A frame is one of the items returned by a slice retrieval. For a template under the property, the item is restricted to the members the template names. For a projection, it is a computed row, keyed by the name before each binding's =. For an empty template, it is the item as stored, such as a reference. Filtering, ordering and pagination criteria don't affect the item type. The bare ResourceShape or a generic Template resolves to any value.

    Code generic over the shape and the slice uses this type to name a single item, for instance to type the items flattened out of several retrievals.

    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