mobx-bonsai
    Preparing search index...

    Function objectToMapTransform

    • Transforms a record object (with string keys and values of type V) into a Map<string, V> (getter).

      Type Parameters

      • T extends { [k in string | number | symbol]?: null | Record<string, any> }

        Type of the containing object

      • K extends string | number | symbol

        Type of the property key in T that will be transformed

      Parameters

      • propName: K

        The name of the property to transform into a Map

      Returns (
          this: T,
      ) => Map<string, ExtractRecordValue<T[K]>> | Extract<T[K], undefined | null>

      A function that returns a Map backed by the key-value pairs from the record property