@haraldki/jsonaccess
    Preparing search index...

    Function jsonUnionGetter

    • Creates an Extractor useful as a paramter of JsonAccess.jsonAsType or jsonGetType. The returned extractor, applied to some unknown data tries returns either the union type or a JsonAccessError.

      Type Parameters

      • PRIMITIVE extends string | number | boolean

      Parameters

      • field: string | number
      • values: readonly PRIMITIVE[]

      Returns Extractor<Maybe<PRIMITIVE>>