const vec3 = [1, 2, "halla"] as const
const vecc = sequenceMap<typeof vec3, [unknown, unknown, string], boolean>([
(v) => v + 4 > 0 ? true : false,
(v) => v + 3 > 100 ? true : false,
(s) => s === "halla" ? "hello" : "un-greetful"
], vec3)
console.debug(vecc) // [true, false, "hello"]
  • Type Parameters

    • A extends readonly unknown[]
    • U extends {
          [K in string | number | symbol]: any
      } = {
          [K in string | number | symbol]: unknown
      }
    • D extends unknown = unknown
    • F extends SequenceMapper<A, U, D> = SequenceMapper<A, U, D>

    Parameters

    • mapping_funcs: F
    • input_data: A

    Returns {
        [K in string | number | symbol]: ReturnType<F[K<K>]>
    }