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

    Type Alias Match<S, T>

    Match: { inferred from <S, T> }

    Resolves the type of the resource retrieved by a model.

    For a template, resolves to the state of the shape restricted to the members the template names, including those of nested templates. A collection requested with a projection holds the rows the projection computes. For a projection, resolves to the computed row, keyed by the name before each binding's =, with columns typed as any value a resource may hold. Depth, cardinality and optionality come from the shape: the model only selects which values to return. Filtering, ordering and pagination criteria don't affect the result type.

    Members the template omits are omitted from the match. Polymorphic members, localised members and projection columns keep the broad type the shape describes: callers needing the branch selected by a branch map, the tags selected by a language range, or the specific type an expression computes, must narrow it themselves. Under the bare ResourceShape, every member the template names resolves to any values; a generic Template, naming no member, resolves to an empty record.

    Type Parameters

    • S extends Lazy<ResourceShape>

      The shape the retrieval runs against, possibly deferred to break definition cycles

    • T extends object

      The template or projection model of the retrieval, possibly with criteria