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

    Function isVacuous

    • Checks if a value is vacuous per the template elision rule.

      A placeholder is vacuous when, after recursive elision, it carries no retrieval instructions and must be ignored as if the owning field were omitted from the enclosing template:

      • the absent marker undefined
      • an empty Template, Union, Locales, or Projection ({})
      • an object whose every entry is either a Selection key or a non-Selection key (Identifier, Binding, TagRange, variant-index, or "") mapping to a vacuous value — transitively elided per the rule, leaving at most a selection-only inner
      • an empty array, or an array whose every element is vacuous

      Primitive placeholders (Literal) are never vacuous — they are type markers for leaf retrieval.

      Parameters

      • value: unknown

        The value to check

      Returns value is object | undefined

      True if value reduces to a vacuous placeholder under recursive elision; false otherwise

      Vacuousness is a semantic property that crosscuts the template structural types and admits selection-only objects (for example { "<price": 100 }, whose slot value is itself non-vacuous), so there is no coherent type to narrow to. The guard therefore narrows only to undefined | object, the broadest sound target: a true result guarantees merely that value is not a primitive Literal leaf.