@tempots/dom

ToArrayOfMarks type

Converts a tuple type T into an array of ProviderMark types. If T is an empty tuple, returns an empty array. If T has only one element, returns an array with a single ProviderMark. If T has more than one element, recursively converts each element into a ProviderMark and returns an array.

Signature:

export type ToArrayOfMarks<T extends unknown[]> = T extends [] ? [] : T extends [infer K] ? [ProviderMark<K>] : T extends [infer K, ...infer R] ? [ProviderMark<K>, ...ToArrayOfMarks<R>] : never;

References: ProviderMark, ToArrayOfMarks