vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Function mapGetOrCreate

    • Get or create a value for the specified key

      Type Parameters

      • K
      • V
      • VI extends (key: K) => V | Promise<V>

      Parameters

      • map: Map<K, V>

        Map to get or create the value in

      • key: K

        Key of the value in the map

      • valueInitializer: VI

        Value initializer call when the value is not set

      Returns ReturnType<VI>