@tempots/dom

ToProviders type

Represents a type that transforms a tuple of values into an object where each value is associated with a provider mark.

Signature:

export type ToProviders<T extends unknown[]> = T extends [] ? object : T extends [infer K] ? {
    [_ in ProviderMark<K>]: K;
} : T extends [infer K, ...infer R] ? {
    [_ in ProviderMark<K>]: K;
} & ToProviders<R> : never;

References: ProviderMark, ToProviders