Type alias ZipKeysWithValues<Keys, Values, Defaults>

ZipKeysWithValues<Keys, Values, Defaults>: Keys extends readonly [infer KHead, ...(infer KTail)]
    ? {
        readonly [k in EnsureSubtype<KHead, string>]: TypeOr<TupleHeadOr<Values, undefined>, TupleHeadOr<Defaults, undefined>>
    } & ZipKeysWithValues<EnsureSubtype<KTail, readonly string[]>, TupleTailOr<Values, []>, TupleTailOr<Defaults, []>>
    : {}

Zips a key tuple type and a value tuple type together into an object.

Type Parameters

  • Keys extends readonly string[]

    Keys of the resulting object.

  • Values extends readonly unknown[]

    Values of the resulting object. If a key corresponds to a Values member that is undefined or past the end, it defaults to the corresponding Defaults member.

  • Defaults extends readonly unknown[]

    Default values. If a key corresponds to a Defaults member that is past the end, the default falls back to undefined.

Generated using TypeDoc