SCALE: Only for low cardinality provisioning. Every value from init() will remain in the map for the lifetime of the heap. If a key object is GCed, its representative also remains.

  • Type Parameters

    • E extends {}

      Ephemeral state

    • K extends WeakKey

      key on which to provision

    Parameters

    • init: ((key: K) => E)
        • (key): E
        • Parameters

          • key: K

          Returns E

    Returns ((key: K) => E)

      • (key): E
      • Parameters

        • key: K

        Returns E