MAIDR Documentation - v3.65.0
    Preparing search index...

    Function resolveAccessorOptional

    • Resolves a DataAccessor like resolveAccessor, but returns undefined instead of throwing when a string accessor references a property that is NOT present on the datum (in-operator semantics).

      Like resolveAccessor, falsy property values (0, '', false, null) are preserved — only an actually-missing key resolves to undefined. This matters because null and 0 are valid data values (e.g. an explicitly-null fill), distinct from "the property is absent".

      Function accessors are invoked unconditionally and their return value is passed through verbatim, including any undefined they return.

      Use this for optional fields such as fill, outlier arrays, or any datum shape variation where the binder should keep working when the property is absent. For required fields, prefer resolveAccessor so the missing property surfaces as an actionable "Available properties: …" error.

      Type Parameters

      • T

      Parameters

      Returns T | undefined