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

    Type Alias Query<T>

    Query: T extends unknown
        ? {
            readonly [K in keyof T
            | keyof Criteria]?: T[K & keyof T] | Criteria[K & keyof Criteria]
        }
        : never

    Constrained retrieval node.

    Merges the Criteria constraining a collection into the node that retrieves it, so a multi-valued property states what to retrieve and which items to retrieve it for in one object. Reach for it to describe an entry that may address a collection: the merged form leaves every constraint key optional, so the same notation serves a single-valued property, which simply carries none.

    const items: Query<Placeholder> = {
    name: {}, // per-item keys
    ">=price": 50, // collection constraints
    "#": 25
    };

    The merge is admitted on every retrieval form, keeping one notation for every entry rather than carving out exceptions. Where a constraint key means anything is settled by the target rather than by the notation: only a multi-valued property is narrowed by Criteria. A constraint key reaching a target that admits none is an error rather than a key to ignore, and processors MUST reject it, reporting the offending key: on a single-valued property, which supplies no collection to constrain, and on a Locale, which is filtered by its own tag ranges.

    Type Parameters

    • T

      The retrieval form the constraints are merged into