@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 ToArrayOfMarksextends unknown[]> = T extends [] ? [] : T extends [infer K] ? [ProviderMark] : T extends [infer K, ...infer R] ? [ProviderMark, ...ToArrayOfMarks] : never;
References: ProviderMark, ToArrayOfMarks