Interface EvalContext<Subject>

The evaluation context.

The context is queried during the evaluation of a node for property values.

Subject defaults to HDict for backwards compatibility. A different backing object can be used by supplying a matching adapter.

interface EvalContext<Subject = HDict> {
    adapter?: FilterAdapter<Subject>;
    dict: Subject;
    namespace?: HNamespace;
    resolve?: EvalContextResolve<Subject>;
}

Type Parameters

Properties

An optional adapter used to evaluate the filter against dict when it isn't a real HDict.

If not defined, dict is assumed to be a real HDict.

dict: Subject

The dict to evaluate the filter on.

namespace?: HNamespace

An optional namespace used for resolving def related queries.

Def related queries (isa and relationship filters) require dict to be a real HDict. They will not match against any other subject.

An optional method used to resolve a dict from a ref.

If not defined, the reference will not be resolved.

The ref to resolve.

The dict for the ref or undefined if not found.